Skip to main content

rustc_target/asm/
mips.rs

1use std::fmt;
2
3use rustc_span::Symbol;
4
5use super::{InlineAsmArch, InlineAsmType, ModifierInfo};
6
7#[allow(non_camel_case_types)]
pub enum MipsInlineAsmRegClass { reg, freg, wreg, }
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::marker::Copy for MipsInlineAsmRegClass { }
#[automatically_derived]#[doc(hidden)]#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for MipsInlineAsmRegClass { }
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::clone::Clone for MipsInlineAsmRegClass {
    #[inline]
    fn clone(&self) -> Self { *self }
}
const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MipsInlineAsmRegClass {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MipsInlineAsmRegClass::reg => { 0usize }
                        MipsInlineAsmRegClass::freg => { 1usize }
                        MipsInlineAsmRegClass::wreg => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
            }
        }
    };
const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MipsInlineAsmRegClass {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MipsInlineAsmRegClass::reg }
                    1usize => { MipsInlineAsmRegClass::freg }
                    2usize => { MipsInlineAsmRegClass::wreg }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MipsInlineAsmRegClass`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for MipsInlineAsmRegClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                MipsInlineAsmRegClass::reg => "reg",
                MipsInlineAsmRegClass::freg => "freg",
                MipsInlineAsmRegClass::wreg => "wreg",
            })
    }
}
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for MipsInlineAsmRegClass { }
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for MipsInlineAsmRegClass { }
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for MipsInlineAsmRegClass {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::cmp::PartialOrd for MipsInlineAsmRegClass {
    #[inline]
    fn partial_cmp(&self, other: &Self)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::cmp::PartialOrd::partial_cmp(&::core::intrinsics::discriminant_value(self),
            &::core::intrinsics::discriminant_value(other))
    }
}
#[automatically_derived]#[allow(non_camel_case_types)]
impl ::core::hash::Hash for MipsInlineAsmRegClass {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
            state)
    }
}
const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            MipsInlineAsmRegClass {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                match *self {
                    MipsInlineAsmRegClass::reg =>
                        0u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmRegClass::freg =>
                        1u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmRegClass::wreg =>
                        2u8.stable_hash(__hcx, __hasher),
                }
                match *self {
                    MipsInlineAsmRegClass::reg => {}
                    MipsInlineAsmRegClass::freg => {}
                    MipsInlineAsmRegClass::wreg => {}
                }
            }
        }
    };
impl MipsInlineAsmRegClass {
    pub fn name(self) -> rustc_span::Symbol {
        match self {
            Self::reg => rustc_span::sym::reg,
            Self::freg => rustc_span::sym::freg,
            Self::wreg => rustc_span::sym::wreg,
        }
    }
    pub fn parse(name: rustc_span::Symbol)
        -> Result<Self, &'static [rustc_span::Symbol]> {
        match name {
            rustc_span::sym::reg => Ok(Self::reg),
            rustc_span::sym::freg => Ok(Self::freg),
            rustc_span::sym::wreg => Ok(Self::wreg),
            _ =>
                Err(&[rustc_span::sym::reg, rustc_span::sym::freg,
                                rustc_span::sym::wreg]),
        }
    }
}
pub(super) fn regclass_map()
    ->
        rustc_data_structures::fx::FxHashMap<super::InlineAsmRegClass,
        rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>> {
    use rustc_data_structures::fx::FxHashMap;
    use rustc_data_structures::fx::FxIndexSet;
    use super::InlineAsmRegClass;
    let mut map = FxHashMap::default();
    map.insert(InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg),
        FxIndexSet::default());
    map
}def_reg_class! {
8    Mips MipsInlineAsmRegClass {
9        reg,
10        freg,
11        wreg,
12    }
13}
14
15impl MipsInlineAsmRegClass {
16    pub fn valid_modifiers(self, _arch: super::InlineAsmArch) -> &'static [char] {
17        match self {
18            Self::reg => &[],
19            Self::freg => &['w'],
20            // LLVM doesn't currently support displaying vector registers holding vector types as
21            // float registers.
22            Self::wreg => &[],
23        }
24    }
25
26    pub fn suggest_class(self, _arch: InlineAsmArch, _ty: InlineAsmType) -> Option<Self> {
27        None
28    }
29
30    pub fn suggest_modifier(
31        self,
32        _arch: InlineAsmArch,
33        _ty: InlineAsmType,
34    ) -> Option<ModifierInfo> {
35        None
36    }
37
38    pub fn default_modifier(self, _arch: InlineAsmArch) -> Option<ModifierInfo> {
39        None
40    }
41
42    pub fn supported_types(
43        self,
44        arch: InlineAsmArch,
45    ) -> &'static [(InlineAsmType, Option<Symbol>)] {
46        match (self, arch) {
47            (Self::reg, InlineAsmArch::Mips64) => {
    use super::InlineAsmType::*;
    &[(I8, None), (I16, None), (I32, None), (I64, None), (F16, None),
                (F32, None), (F64, None)]
}types! { _: I8, I16, I32, I64, F16, F32, F64; },
48            (Self::reg, _) => {
    use super::InlineAsmType::*;
    &[(I8, None), (I16, None), (I32, None), (F16, None), (F32, None)]
}types! { _: I8, I16, I32, F16, F32; },
49            (Self::freg, _) => {
    use super::InlineAsmType::*;
    &[(F16, None), (F32, None), (F64, None)]
}types! { _: F16, F32, F64; },
50            (Self::wreg, _) => {
51                {
    use super::InlineAsmType::*;
    &[(F16, Some(rustc_span::sym::msa)), (F32, Some(rustc_span::sym::msa)),
                (F64, Some(rustc_span::sym::msa)),
                (VecI8(16), Some(rustc_span::sym::msa)),
                (VecI16(8), Some(rustc_span::sym::msa)),
                (VecI32(4), Some(rustc_span::sym::msa)),
                (VecI64(2), Some(rustc_span::sym::msa)),
                (VecF16(8), Some(rustc_span::sym::msa)),
                (VecF32(4), Some(rustc_span::sym::msa)),
                (VecF64(2), Some(rustc_span::sym::msa))]
}types! { msa: F16, F32, F64, VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2); }
52            }
53        }
54    }
55}
56
57// The reserved registers are somewhat taken from
58// <https://github.com/llvm/llvm-project/blob/deb8f8bcf31540c657716ea5242183b0792702a1/llvm/lib/Target/Mips/MipsRegisterInfo.cpp#L150>.
59#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
pub enum MipsInlineAsmReg {
    r2,
    r3,
    r4,
    r5,
    r6,
    r7,
    r8,
    r9,
    r10,
    r11,
    r12,
    r13,
    r14,
    r15,
    r16,
    r17,
    r18,
    r19,
    r20,
    r21,
    r22,
    r23,
    r24,
    r25,
    f0,
    f1,
    f2,
    f3,
    f4,
    f5,
    f6,
    f7,
    f8,
    f9,
    f10,
    f11,
    f12,
    f13,
    f14,
    f15,
    f16,
    f17,
    f18,
    f19,
    f20,
    f21,
    f22,
    f23,
    f24,
    f25,
    f26,
    f27,
    f28,
    f29,
    f30,
    f31,
    w0,
    w1,
    w2,
    w3,
    w4,
    w5,
    w6,
    w7,
    w8,
    w9,
    w10,
    w11,
    w12,
    w13,
    w14,
    w15,
    w16,
    w17,
    w18,
    w19,
    w20,
    w21,
    w22,
    w23,
    w24,
    w25,
    w26,
    w27,
    w28,
    w29,
    w30,
    w31,
}
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for MipsInlineAsmReg { }
#[automatically_derived]#[doc(hidden)]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for MipsInlineAsmReg { }
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for MipsInlineAsmReg {
    #[inline]
    fn clone(&self) -> Self { *self }
}
const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MipsInlineAsmReg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MipsInlineAsmReg::r2 => { 0usize }
                        MipsInlineAsmReg::r3 => { 1usize }
                        MipsInlineAsmReg::r4 => { 2usize }
                        MipsInlineAsmReg::r5 => { 3usize }
                        MipsInlineAsmReg::r6 => { 4usize }
                        MipsInlineAsmReg::r7 => { 5usize }
                        MipsInlineAsmReg::r8 => { 6usize }
                        MipsInlineAsmReg::r9 => { 7usize }
                        MipsInlineAsmReg::r10 => { 8usize }
                        MipsInlineAsmReg::r11 => { 9usize }
                        MipsInlineAsmReg::r12 => { 10usize }
                        MipsInlineAsmReg::r13 => { 11usize }
                        MipsInlineAsmReg::r14 => { 12usize }
                        MipsInlineAsmReg::r15 => { 13usize }
                        MipsInlineAsmReg::r16 => { 14usize }
                        MipsInlineAsmReg::r17 => { 15usize }
                        MipsInlineAsmReg::r18 => { 16usize }
                        MipsInlineAsmReg::r19 => { 17usize }
                        MipsInlineAsmReg::r20 => { 18usize }
                        MipsInlineAsmReg::r21 => { 19usize }
                        MipsInlineAsmReg::r22 => { 20usize }
                        MipsInlineAsmReg::r23 => { 21usize }
                        MipsInlineAsmReg::r24 => { 22usize }
                        MipsInlineAsmReg::r25 => { 23usize }
                        MipsInlineAsmReg::f0 => { 24usize }
                        MipsInlineAsmReg::f1 => { 25usize }
                        MipsInlineAsmReg::f2 => { 26usize }
                        MipsInlineAsmReg::f3 => { 27usize }
                        MipsInlineAsmReg::f4 => { 28usize }
                        MipsInlineAsmReg::f5 => { 29usize }
                        MipsInlineAsmReg::f6 => { 30usize }
                        MipsInlineAsmReg::f7 => { 31usize }
                        MipsInlineAsmReg::f8 => { 32usize }
                        MipsInlineAsmReg::f9 => { 33usize }
                        MipsInlineAsmReg::f10 => { 34usize }
                        MipsInlineAsmReg::f11 => { 35usize }
                        MipsInlineAsmReg::f12 => { 36usize }
                        MipsInlineAsmReg::f13 => { 37usize }
                        MipsInlineAsmReg::f14 => { 38usize }
                        MipsInlineAsmReg::f15 => { 39usize }
                        MipsInlineAsmReg::f16 => { 40usize }
                        MipsInlineAsmReg::f17 => { 41usize }
                        MipsInlineAsmReg::f18 => { 42usize }
                        MipsInlineAsmReg::f19 => { 43usize }
                        MipsInlineAsmReg::f20 => { 44usize }
                        MipsInlineAsmReg::f21 => { 45usize }
                        MipsInlineAsmReg::f22 => { 46usize }
                        MipsInlineAsmReg::f23 => { 47usize }
                        MipsInlineAsmReg::f24 => { 48usize }
                        MipsInlineAsmReg::f25 => { 49usize }
                        MipsInlineAsmReg::f26 => { 50usize }
                        MipsInlineAsmReg::f27 => { 51usize }
                        MipsInlineAsmReg::f28 => { 52usize }
                        MipsInlineAsmReg::f29 => { 53usize }
                        MipsInlineAsmReg::f30 => { 54usize }
                        MipsInlineAsmReg::f31 => { 55usize }
                        MipsInlineAsmReg::w0 => { 56usize }
                        MipsInlineAsmReg::w1 => { 57usize }
                        MipsInlineAsmReg::w2 => { 58usize }
                        MipsInlineAsmReg::w3 => { 59usize }
                        MipsInlineAsmReg::w4 => { 60usize }
                        MipsInlineAsmReg::w5 => { 61usize }
                        MipsInlineAsmReg::w6 => { 62usize }
                        MipsInlineAsmReg::w7 => { 63usize }
                        MipsInlineAsmReg::w8 => { 64usize }
                        MipsInlineAsmReg::w9 => { 65usize }
                        MipsInlineAsmReg::w10 => { 66usize }
                        MipsInlineAsmReg::w11 => { 67usize }
                        MipsInlineAsmReg::w12 => { 68usize }
                        MipsInlineAsmReg::w13 => { 69usize }
                        MipsInlineAsmReg::w14 => { 70usize }
                        MipsInlineAsmReg::w15 => { 71usize }
                        MipsInlineAsmReg::w16 => { 72usize }
                        MipsInlineAsmReg::w17 => { 73usize }
                        MipsInlineAsmReg::w18 => { 74usize }
                        MipsInlineAsmReg::w19 => { 75usize }
                        MipsInlineAsmReg::w20 => { 76usize }
                        MipsInlineAsmReg::w21 => { 77usize }
                        MipsInlineAsmReg::w22 => { 78usize }
                        MipsInlineAsmReg::w23 => { 79usize }
                        MipsInlineAsmReg::w24 => { 80usize }
                        MipsInlineAsmReg::w25 => { 81usize }
                        MipsInlineAsmReg::w26 => { 82usize }
                        MipsInlineAsmReg::w27 => { 83usize }
                        MipsInlineAsmReg::w28 => { 84usize }
                        MipsInlineAsmReg::w29 => { 85usize }
                        MipsInlineAsmReg::w30 => { 86usize }
                        MipsInlineAsmReg::w31 => { 87usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
            }
        }
    };
const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MipsInlineAsmReg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MipsInlineAsmReg::r2 }
                    1usize => { MipsInlineAsmReg::r3 }
                    2usize => { MipsInlineAsmReg::r4 }
                    3usize => { MipsInlineAsmReg::r5 }
                    4usize => { MipsInlineAsmReg::r6 }
                    5usize => { MipsInlineAsmReg::r7 }
                    6usize => { MipsInlineAsmReg::r8 }
                    7usize => { MipsInlineAsmReg::r9 }
                    8usize => { MipsInlineAsmReg::r10 }
                    9usize => { MipsInlineAsmReg::r11 }
                    10usize => { MipsInlineAsmReg::r12 }
                    11usize => { MipsInlineAsmReg::r13 }
                    12usize => { MipsInlineAsmReg::r14 }
                    13usize => { MipsInlineAsmReg::r15 }
                    14usize => { MipsInlineAsmReg::r16 }
                    15usize => { MipsInlineAsmReg::r17 }
                    16usize => { MipsInlineAsmReg::r18 }
                    17usize => { MipsInlineAsmReg::r19 }
                    18usize => { MipsInlineAsmReg::r20 }
                    19usize => { MipsInlineAsmReg::r21 }
                    20usize => { MipsInlineAsmReg::r22 }
                    21usize => { MipsInlineAsmReg::r23 }
                    22usize => { MipsInlineAsmReg::r24 }
                    23usize => { MipsInlineAsmReg::r25 }
                    24usize => { MipsInlineAsmReg::f0 }
                    25usize => { MipsInlineAsmReg::f1 }
                    26usize => { MipsInlineAsmReg::f2 }
                    27usize => { MipsInlineAsmReg::f3 }
                    28usize => { MipsInlineAsmReg::f4 }
                    29usize => { MipsInlineAsmReg::f5 }
                    30usize => { MipsInlineAsmReg::f6 }
                    31usize => { MipsInlineAsmReg::f7 }
                    32usize => { MipsInlineAsmReg::f8 }
                    33usize => { MipsInlineAsmReg::f9 }
                    34usize => { MipsInlineAsmReg::f10 }
                    35usize => { MipsInlineAsmReg::f11 }
                    36usize => { MipsInlineAsmReg::f12 }
                    37usize => { MipsInlineAsmReg::f13 }
                    38usize => { MipsInlineAsmReg::f14 }
                    39usize => { MipsInlineAsmReg::f15 }
                    40usize => { MipsInlineAsmReg::f16 }
                    41usize => { MipsInlineAsmReg::f17 }
                    42usize => { MipsInlineAsmReg::f18 }
                    43usize => { MipsInlineAsmReg::f19 }
                    44usize => { MipsInlineAsmReg::f20 }
                    45usize => { MipsInlineAsmReg::f21 }
                    46usize => { MipsInlineAsmReg::f22 }
                    47usize => { MipsInlineAsmReg::f23 }
                    48usize => { MipsInlineAsmReg::f24 }
                    49usize => { MipsInlineAsmReg::f25 }
                    50usize => { MipsInlineAsmReg::f26 }
                    51usize => { MipsInlineAsmReg::f27 }
                    52usize => { MipsInlineAsmReg::f28 }
                    53usize => { MipsInlineAsmReg::f29 }
                    54usize => { MipsInlineAsmReg::f30 }
                    55usize => { MipsInlineAsmReg::f31 }
                    56usize => { MipsInlineAsmReg::w0 }
                    57usize => { MipsInlineAsmReg::w1 }
                    58usize => { MipsInlineAsmReg::w2 }
                    59usize => { MipsInlineAsmReg::w3 }
                    60usize => { MipsInlineAsmReg::w4 }
                    61usize => { MipsInlineAsmReg::w5 }
                    62usize => { MipsInlineAsmReg::w6 }
                    63usize => { MipsInlineAsmReg::w7 }
                    64usize => { MipsInlineAsmReg::w8 }
                    65usize => { MipsInlineAsmReg::w9 }
                    66usize => { MipsInlineAsmReg::w10 }
                    67usize => { MipsInlineAsmReg::w11 }
                    68usize => { MipsInlineAsmReg::w12 }
                    69usize => { MipsInlineAsmReg::w13 }
                    70usize => { MipsInlineAsmReg::w14 }
                    71usize => { MipsInlineAsmReg::w15 }
                    72usize => { MipsInlineAsmReg::w16 }
                    73usize => { MipsInlineAsmReg::w17 }
                    74usize => { MipsInlineAsmReg::w18 }
                    75usize => { MipsInlineAsmReg::w19 }
                    76usize => { MipsInlineAsmReg::w20 }
                    77usize => { MipsInlineAsmReg::w21 }
                    78usize => { MipsInlineAsmReg::w22 }
                    79usize => { MipsInlineAsmReg::w23 }
                    80usize => { MipsInlineAsmReg::w24 }
                    81usize => { MipsInlineAsmReg::w25 }
                    82usize => { MipsInlineAsmReg::w26 }
                    83usize => { MipsInlineAsmReg::w27 }
                    84usize => { MipsInlineAsmReg::w28 }
                    85usize => { MipsInlineAsmReg::w29 }
                    86usize => { MipsInlineAsmReg::w30 }
                    87usize => { MipsInlineAsmReg::w31 }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MipsInlineAsmReg`, expected 0..88, actual {0}",
                                n));
                    }
                }
            }
        }
    };
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for MipsInlineAsmReg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_c_like_enum_write_str(f,
            "r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 f30 f31 w0 w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 w31",
            match self {
                MipsInlineAsmReg::r2 => 0usize,
                MipsInlineAsmReg::r3 => 3usize,
                MipsInlineAsmReg::r4 => 6usize,
                MipsInlineAsmReg::r5 => 9usize,
                MipsInlineAsmReg::r6 => 12usize,
                MipsInlineAsmReg::r7 => 15usize,
                MipsInlineAsmReg::r8 => 18usize,
                MipsInlineAsmReg::r9 => 21usize,
                MipsInlineAsmReg::r10 => 24usize,
                MipsInlineAsmReg::r11 => 28usize,
                MipsInlineAsmReg::r12 => 32usize,
                MipsInlineAsmReg::r13 => 36usize,
                MipsInlineAsmReg::r14 => 40usize,
                MipsInlineAsmReg::r15 => 44usize,
                MipsInlineAsmReg::r16 => 48usize,
                MipsInlineAsmReg::r17 => 52usize,
                MipsInlineAsmReg::r18 => 56usize,
                MipsInlineAsmReg::r19 => 60usize,
                MipsInlineAsmReg::r20 => 64usize,
                MipsInlineAsmReg::r21 => 68usize,
                MipsInlineAsmReg::r22 => 72usize,
                MipsInlineAsmReg::r23 => 76usize,
                MipsInlineAsmReg::r24 => 80usize,
                MipsInlineAsmReg::r25 => 84usize,
                MipsInlineAsmReg::f0 => 88usize,
                MipsInlineAsmReg::f1 => 91usize,
                MipsInlineAsmReg::f2 => 94usize,
                MipsInlineAsmReg::f3 => 97usize,
                MipsInlineAsmReg::f4 => 100usize,
                MipsInlineAsmReg::f5 => 103usize,
                MipsInlineAsmReg::f6 => 106usize,
                MipsInlineAsmReg::f7 => 109usize,
                MipsInlineAsmReg::f8 => 112usize,
                MipsInlineAsmReg::f9 => 115usize,
                MipsInlineAsmReg::f10 => 118usize,
                MipsInlineAsmReg::f11 => 122usize,
                MipsInlineAsmReg::f12 => 126usize,
                MipsInlineAsmReg::f13 => 130usize,
                MipsInlineAsmReg::f14 => 134usize,
                MipsInlineAsmReg::f15 => 138usize,
                MipsInlineAsmReg::f16 => 142usize,
                MipsInlineAsmReg::f17 => 146usize,
                MipsInlineAsmReg::f18 => 150usize,
                MipsInlineAsmReg::f19 => 154usize,
                MipsInlineAsmReg::f20 => 158usize,
                MipsInlineAsmReg::f21 => 162usize,
                MipsInlineAsmReg::f22 => 166usize,
                MipsInlineAsmReg::f23 => 170usize,
                MipsInlineAsmReg::f24 => 174usize,
                MipsInlineAsmReg::f25 => 178usize,
                MipsInlineAsmReg::f26 => 182usize,
                MipsInlineAsmReg::f27 => 186usize,
                MipsInlineAsmReg::f28 => 190usize,
                MipsInlineAsmReg::f29 => 194usize,
                MipsInlineAsmReg::f30 => 198usize,
                MipsInlineAsmReg::f31 => 202usize,
                MipsInlineAsmReg::w0 => 206usize,
                MipsInlineAsmReg::w1 => 209usize,
                MipsInlineAsmReg::w2 => 212usize,
                MipsInlineAsmReg::w3 => 215usize,
                MipsInlineAsmReg::w4 => 218usize,
                MipsInlineAsmReg::w5 => 221usize,
                MipsInlineAsmReg::w6 => 224usize,
                MipsInlineAsmReg::w7 => 227usize,
                MipsInlineAsmReg::w8 => 230usize,
                MipsInlineAsmReg::w9 => 233usize,
                MipsInlineAsmReg::w10 => 236usize,
                MipsInlineAsmReg::w11 => 240usize,
                MipsInlineAsmReg::w12 => 244usize,
                MipsInlineAsmReg::w13 => 248usize,
                MipsInlineAsmReg::w14 => 252usize,
                MipsInlineAsmReg::w15 => 256usize,
                MipsInlineAsmReg::w16 => 260usize,
                MipsInlineAsmReg::w17 => 264usize,
                MipsInlineAsmReg::w18 => 268usize,
                MipsInlineAsmReg::w19 => 272usize,
                MipsInlineAsmReg::w20 => 276usize,
                MipsInlineAsmReg::w21 => 280usize,
                MipsInlineAsmReg::w22 => 284usize,
                MipsInlineAsmReg::w23 => 288usize,
                MipsInlineAsmReg::w24 => 292usize,
                MipsInlineAsmReg::w25 => 296usize,
                MipsInlineAsmReg::w26 => 300usize,
                MipsInlineAsmReg::w27 => 304usize,
                MipsInlineAsmReg::w28 => 308usize,
                MipsInlineAsmReg::w29 => 312usize,
                MipsInlineAsmReg::w30 => 316usize,
                MipsInlineAsmReg::w31 => 320usize,
            })
    }
}
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for MipsInlineAsmReg { }
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for MipsInlineAsmReg { }
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for MipsInlineAsmReg {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialOrd for MipsInlineAsmReg {
    #[inline]
    fn partial_cmp(&self, other: &Self)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::cmp::PartialOrd::partial_cmp(&::core::intrinsics::discriminant_value(self),
            &::core::intrinsics::discriminant_value(other))
    }
}
#[automatically_derived]#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for MipsInlineAsmReg {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
            state)
    }
}
const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            MipsInlineAsmReg {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                match *self {
                    MipsInlineAsmReg::r2 => 0u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r3 => 1u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r4 => 2u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r5 => 3u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r6 => 4u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r7 => 5u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r8 => 6u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r9 => 7u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r10 => 8u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r11 => 9u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r12 => 10u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r13 => 11u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r14 => 12u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r15 => 13u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r16 => 14u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r17 => 15u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r18 => 16u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r19 => 17u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r20 => 18u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r21 => 19u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r22 => 20u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r23 => 21u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r24 => 22u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::r25 => 23u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f0 => 24u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f1 => 25u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f2 => 26u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f3 => 27u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f4 => 28u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f5 => 29u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f6 => 30u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f7 => 31u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f8 => 32u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f9 => 33u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f10 => 34u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f11 => 35u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f12 => 36u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f13 => 37u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f14 => 38u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f15 => 39u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f16 => 40u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f17 => 41u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f18 => 42u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f19 => 43u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f20 => 44u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f21 => 45u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f22 => 46u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f23 => 47u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f24 => 48u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f25 => 49u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f26 => 50u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f27 => 51u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f28 => 52u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f29 => 53u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f30 => 54u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::f31 => 55u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w0 => 56u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w1 => 57u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w2 => 58u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w3 => 59u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w4 => 60u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w5 => 61u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w6 => 62u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w7 => 63u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w8 => 64u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w9 => 65u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w10 => 66u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w11 => 67u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w12 => 68u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w13 => 69u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w14 => 70u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w15 => 71u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w16 => 72u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w17 => 73u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w18 => 74u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w19 => 75u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w20 => 76u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w21 => 77u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w22 => 78u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w23 => 79u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w24 => 80u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w25 => 81u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w26 => 82u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w27 => 83u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w28 => 84u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w29 => 85u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w30 => 86u8.stable_hash(__hcx, __hasher),
                    MipsInlineAsmReg::w31 => 87u8.stable_hash(__hcx, __hasher),
                }
                match *self {
                    MipsInlineAsmReg::r2 => {}
                    MipsInlineAsmReg::r3 => {}
                    MipsInlineAsmReg::r4 => {}
                    MipsInlineAsmReg::r5 => {}
                    MipsInlineAsmReg::r6 => {}
                    MipsInlineAsmReg::r7 => {}
                    MipsInlineAsmReg::r8 => {}
                    MipsInlineAsmReg::r9 => {}
                    MipsInlineAsmReg::r10 => {}
                    MipsInlineAsmReg::r11 => {}
                    MipsInlineAsmReg::r12 => {}
                    MipsInlineAsmReg::r13 => {}
                    MipsInlineAsmReg::r14 => {}
                    MipsInlineAsmReg::r15 => {}
                    MipsInlineAsmReg::r16 => {}
                    MipsInlineAsmReg::r17 => {}
                    MipsInlineAsmReg::r18 => {}
                    MipsInlineAsmReg::r19 => {}
                    MipsInlineAsmReg::r20 => {}
                    MipsInlineAsmReg::r21 => {}
                    MipsInlineAsmReg::r22 => {}
                    MipsInlineAsmReg::r23 => {}
                    MipsInlineAsmReg::r24 => {}
                    MipsInlineAsmReg::r25 => {}
                    MipsInlineAsmReg::f0 => {}
                    MipsInlineAsmReg::f1 => {}
                    MipsInlineAsmReg::f2 => {}
                    MipsInlineAsmReg::f3 => {}
                    MipsInlineAsmReg::f4 => {}
                    MipsInlineAsmReg::f5 => {}
                    MipsInlineAsmReg::f6 => {}
                    MipsInlineAsmReg::f7 => {}
                    MipsInlineAsmReg::f8 => {}
                    MipsInlineAsmReg::f9 => {}
                    MipsInlineAsmReg::f10 => {}
                    MipsInlineAsmReg::f11 => {}
                    MipsInlineAsmReg::f12 => {}
                    MipsInlineAsmReg::f13 => {}
                    MipsInlineAsmReg::f14 => {}
                    MipsInlineAsmReg::f15 => {}
                    MipsInlineAsmReg::f16 => {}
                    MipsInlineAsmReg::f17 => {}
                    MipsInlineAsmReg::f18 => {}
                    MipsInlineAsmReg::f19 => {}
                    MipsInlineAsmReg::f20 => {}
                    MipsInlineAsmReg::f21 => {}
                    MipsInlineAsmReg::f22 => {}
                    MipsInlineAsmReg::f23 => {}
                    MipsInlineAsmReg::f24 => {}
                    MipsInlineAsmReg::f25 => {}
                    MipsInlineAsmReg::f26 => {}
                    MipsInlineAsmReg::f27 => {}
                    MipsInlineAsmReg::f28 => {}
                    MipsInlineAsmReg::f29 => {}
                    MipsInlineAsmReg::f30 => {}
                    MipsInlineAsmReg::f31 => {}
                    MipsInlineAsmReg::w0 => {}
                    MipsInlineAsmReg::w1 => {}
                    MipsInlineAsmReg::w2 => {}
                    MipsInlineAsmReg::w3 => {}
                    MipsInlineAsmReg::w4 => {}
                    MipsInlineAsmReg::w5 => {}
                    MipsInlineAsmReg::w6 => {}
                    MipsInlineAsmReg::w7 => {}
                    MipsInlineAsmReg::w8 => {}
                    MipsInlineAsmReg::w9 => {}
                    MipsInlineAsmReg::w10 => {}
                    MipsInlineAsmReg::w11 => {}
                    MipsInlineAsmReg::w12 => {}
                    MipsInlineAsmReg::w13 => {}
                    MipsInlineAsmReg::w14 => {}
                    MipsInlineAsmReg::w15 => {}
                    MipsInlineAsmReg::w16 => {}
                    MipsInlineAsmReg::w17 => {}
                    MipsInlineAsmReg::w18 => {}
                    MipsInlineAsmReg::w19 => {}
                    MipsInlineAsmReg::w20 => {}
                    MipsInlineAsmReg::w21 => {}
                    MipsInlineAsmReg::w22 => {}
                    MipsInlineAsmReg::w23 => {}
                    MipsInlineAsmReg::w24 => {}
                    MipsInlineAsmReg::w25 => {}
                    MipsInlineAsmReg::w26 => {}
                    MipsInlineAsmReg::w27 => {}
                    MipsInlineAsmReg::w28 => {}
                    MipsInlineAsmReg::w29 => {}
                    MipsInlineAsmReg::w30 => {}
                    MipsInlineAsmReg::w31 => {}
                }
            }
        }
    };
impl MipsInlineAsmReg {
    pub fn name(self) -> &'static str {
        match self {
            Self::r2 => "$2",
            Self::r3 => "$3",
            Self::r4 => "$4",
            Self::r5 => "$5",
            Self::r6 => "$6",
            Self::r7 => "$7",
            Self::r8 => "$8",
            Self::r9 => "$9",
            Self::r10 => "$10",
            Self::r11 => "$11",
            Self::r12 => "$12",
            Self::r13 => "$13",
            Self::r14 => "$14",
            Self::r15 => "$15",
            Self::r16 => "$16",
            Self::r17 => "$17",
            Self::r18 => "$18",
            Self::r19 => "$19",
            Self::r20 => "$20",
            Self::r21 => "$21",
            Self::r22 => "$22",
            Self::r23 => "$23",
            Self::r24 => "$24",
            Self::r25 => "$25",
            Self::f0 => "$f0",
            Self::f1 => "$f1",
            Self::f2 => "$f2",
            Self::f3 => "$f3",
            Self::f4 => "$f4",
            Self::f5 => "$f5",
            Self::f6 => "$f6",
            Self::f7 => "$f7",
            Self::f8 => "$f8",
            Self::f9 => "$f9",
            Self::f10 => "$f10",
            Self::f11 => "$f11",
            Self::f12 => "$f12",
            Self::f13 => "$f13",
            Self::f14 => "$f14",
            Self::f15 => "$f15",
            Self::f16 => "$f16",
            Self::f17 => "$f17",
            Self::f18 => "$f18",
            Self::f19 => "$f19",
            Self::f20 => "$f20",
            Self::f21 => "$f21",
            Self::f22 => "$f22",
            Self::f23 => "$f23",
            Self::f24 => "$f24",
            Self::f25 => "$f25",
            Self::f26 => "$f26",
            Self::f27 => "$f27",
            Self::f28 => "$f28",
            Self::f29 => "$f29",
            Self::f30 => "$f30",
            Self::f31 => "$f31",
            Self::w0 => "$w0",
            Self::w1 => "$w1",
            Self::w2 => "$w2",
            Self::w3 => "$w3",
            Self::w4 => "$w4",
            Self::w5 => "$w5",
            Self::w6 => "$w6",
            Self::w7 => "$w7",
            Self::w8 => "$w8",
            Self::w9 => "$w9",
            Self::w10 => "$w10",
            Self::w11 => "$w11",
            Self::w12 => "$w12",
            Self::w13 => "$w13",
            Self::w14 => "$w14",
            Self::w15 => "$w15",
            Self::w16 => "$w16",
            Self::w17 => "$w17",
            Self::w18 => "$w18",
            Self::w19 => "$w19",
            Self::w20 => "$w20",
            Self::w21 => "$w21",
            Self::w22 => "$w22",
            Self::w23 => "$w23",
            Self::w24 => "$w24",
            Self::w25 => "$w25",
            Self::w26 => "$w26",
            Self::w27 => "$w27",
            Self::w28 => "$w28",
            Self::w29 => "$w29",
            Self::w30 => "$w30",
            Self::w31 => "$w31",
        }
    }
    pub fn reg_class(self) -> MipsInlineAsmRegClass {
        match self {
            Self::r2 => MipsInlineAsmRegClass::reg,
            Self::r3 => MipsInlineAsmRegClass::reg,
            Self::r4 => MipsInlineAsmRegClass::reg,
            Self::r5 => MipsInlineAsmRegClass::reg,
            Self::r6 => MipsInlineAsmRegClass::reg,
            Self::r7 => MipsInlineAsmRegClass::reg,
            Self::r8 => MipsInlineAsmRegClass::reg,
            Self::r9 => MipsInlineAsmRegClass::reg,
            Self::r10 => MipsInlineAsmRegClass::reg,
            Self::r11 => MipsInlineAsmRegClass::reg,
            Self::r12 => MipsInlineAsmRegClass::reg,
            Self::r13 => MipsInlineAsmRegClass::reg,
            Self::r14 => MipsInlineAsmRegClass::reg,
            Self::r15 => MipsInlineAsmRegClass::reg,
            Self::r16 => MipsInlineAsmRegClass::reg,
            Self::r17 => MipsInlineAsmRegClass::reg,
            Self::r18 => MipsInlineAsmRegClass::reg,
            Self::r19 => MipsInlineAsmRegClass::reg,
            Self::r20 => MipsInlineAsmRegClass::reg,
            Self::r21 => MipsInlineAsmRegClass::reg,
            Self::r22 => MipsInlineAsmRegClass::reg,
            Self::r23 => MipsInlineAsmRegClass::reg,
            Self::r24 => MipsInlineAsmRegClass::reg,
            Self::r25 => MipsInlineAsmRegClass::reg,
            Self::f0 => MipsInlineAsmRegClass::freg,
            Self::f1 => MipsInlineAsmRegClass::freg,
            Self::f2 => MipsInlineAsmRegClass::freg,
            Self::f3 => MipsInlineAsmRegClass::freg,
            Self::f4 => MipsInlineAsmRegClass::freg,
            Self::f5 => MipsInlineAsmRegClass::freg,
            Self::f6 => MipsInlineAsmRegClass::freg,
            Self::f7 => MipsInlineAsmRegClass::freg,
            Self::f8 => MipsInlineAsmRegClass::freg,
            Self::f9 => MipsInlineAsmRegClass::freg,
            Self::f10 => MipsInlineAsmRegClass::freg,
            Self::f11 => MipsInlineAsmRegClass::freg,
            Self::f12 => MipsInlineAsmRegClass::freg,
            Self::f13 => MipsInlineAsmRegClass::freg,
            Self::f14 => MipsInlineAsmRegClass::freg,
            Self::f15 => MipsInlineAsmRegClass::freg,
            Self::f16 => MipsInlineAsmRegClass::freg,
            Self::f17 => MipsInlineAsmRegClass::freg,
            Self::f18 => MipsInlineAsmRegClass::freg,
            Self::f19 => MipsInlineAsmRegClass::freg,
            Self::f20 => MipsInlineAsmRegClass::freg,
            Self::f21 => MipsInlineAsmRegClass::freg,
            Self::f22 => MipsInlineAsmRegClass::freg,
            Self::f23 => MipsInlineAsmRegClass::freg,
            Self::f24 => MipsInlineAsmRegClass::freg,
            Self::f25 => MipsInlineAsmRegClass::freg,
            Self::f26 => MipsInlineAsmRegClass::freg,
            Self::f27 => MipsInlineAsmRegClass::freg,
            Self::f28 => MipsInlineAsmRegClass::freg,
            Self::f29 => MipsInlineAsmRegClass::freg,
            Self::f30 => MipsInlineAsmRegClass::freg,
            Self::f31 => MipsInlineAsmRegClass::freg,
            Self::w0 => MipsInlineAsmRegClass::wreg,
            Self::w1 => MipsInlineAsmRegClass::wreg,
            Self::w2 => MipsInlineAsmRegClass::wreg,
            Self::w3 => MipsInlineAsmRegClass::wreg,
            Self::w4 => MipsInlineAsmRegClass::wreg,
            Self::w5 => MipsInlineAsmRegClass::wreg,
            Self::w6 => MipsInlineAsmRegClass::wreg,
            Self::w7 => MipsInlineAsmRegClass::wreg,
            Self::w8 => MipsInlineAsmRegClass::wreg,
            Self::w9 => MipsInlineAsmRegClass::wreg,
            Self::w10 => MipsInlineAsmRegClass::wreg,
            Self::w11 => MipsInlineAsmRegClass::wreg,
            Self::w12 => MipsInlineAsmRegClass::wreg,
            Self::w13 => MipsInlineAsmRegClass::wreg,
            Self::w14 => MipsInlineAsmRegClass::wreg,
            Self::w15 => MipsInlineAsmRegClass::wreg,
            Self::w16 => MipsInlineAsmRegClass::wreg,
            Self::w17 => MipsInlineAsmRegClass::wreg,
            Self::w18 => MipsInlineAsmRegClass::wreg,
            Self::w19 => MipsInlineAsmRegClass::wreg,
            Self::w20 => MipsInlineAsmRegClass::wreg,
            Self::w21 => MipsInlineAsmRegClass::wreg,
            Self::w22 => MipsInlineAsmRegClass::wreg,
            Self::w23 => MipsInlineAsmRegClass::wreg,
            Self::w24 => MipsInlineAsmRegClass::wreg,
            Self::w25 => MipsInlineAsmRegClass::wreg,
            Self::w26 => MipsInlineAsmRegClass::wreg,
            Self::w27 => MipsInlineAsmRegClass::wreg,
            Self::w28 => MipsInlineAsmRegClass::wreg,
            Self::w29 => MipsInlineAsmRegClass::wreg,
            Self::w30 => MipsInlineAsmRegClass::wreg,
            Self::w31 => MipsInlineAsmRegClass::wreg,
        }
    }
    pub fn parse(name: &str) -> Result<Self, &'static str> {
        match name {
            "$2" => Ok(Self::r2),
            "$3" => Ok(Self::r3),
            "$4" => Ok(Self::r4),
            "$5" => Ok(Self::r5),
            "$6" => Ok(Self::r6),
            "$7" => Ok(Self::r7),
            "$8" => Ok(Self::r8),
            "$9" => Ok(Self::r9),
            "$10" => Ok(Self::r10),
            "$11" => Ok(Self::r11),
            "$12" => Ok(Self::r12),
            "$13" => Ok(Self::r13),
            "$14" => Ok(Self::r14),
            "$15" => Ok(Self::r15),
            "$16" => Ok(Self::r16),
            "$17" => Ok(Self::r17),
            "$18" => Ok(Self::r18),
            "$19" => Ok(Self::r19),
            "$20" => Ok(Self::r20),
            "$21" => Ok(Self::r21),
            "$22" => Ok(Self::r22),
            "$23" => Ok(Self::r23),
            "$24" => Ok(Self::r24),
            "$25" => Ok(Self::r25),
            "$f0" => Ok(Self::f0),
            "$f1" => Ok(Self::f1),
            "$f2" => Ok(Self::f2),
            "$f3" => Ok(Self::f3),
            "$f4" => Ok(Self::f4),
            "$f5" => Ok(Self::f5),
            "$f6" => Ok(Self::f6),
            "$f7" => Ok(Self::f7),
            "$f8" => Ok(Self::f8),
            "$f9" => Ok(Self::f9),
            "$f10" => Ok(Self::f10),
            "$f11" => Ok(Self::f11),
            "$f12" => Ok(Self::f12),
            "$f13" => Ok(Self::f13),
            "$f14" => Ok(Self::f14),
            "$f15" => Ok(Self::f15),
            "$f16" => Ok(Self::f16),
            "$f17" => Ok(Self::f17),
            "$f18" => Ok(Self::f18),
            "$f19" => Ok(Self::f19),
            "$f20" => Ok(Self::f20),
            "$f21" => Ok(Self::f21),
            "$f22" => Ok(Self::f22),
            "$f23" => Ok(Self::f23),
            "$f24" => Ok(Self::f24),
            "$f25" => Ok(Self::f25),
            "$f26" => Ok(Self::f26),
            "$f27" => Ok(Self::f27),
            "$f28" => Ok(Self::f28),
            "$f29" => Ok(Self::f29),
            "$f30" => Ok(Self::f30),
            "$f31" => Ok(Self::f31),
            "$w0" => Ok(Self::w0),
            "$w1" => Ok(Self::w1),
            "$w2" => Ok(Self::w2),
            "$w3" => Ok(Self::w3),
            "$w4" => Ok(Self::w4),
            "$w5" => Ok(Self::w5),
            "$w6" => Ok(Self::w6),
            "$w7" => Ok(Self::w7),
            "$w8" => Ok(Self::w8),
            "$w9" => Ok(Self::w9),
            "$w10" => Ok(Self::w10),
            "$w11" => Ok(Self::w11),
            "$w12" => Ok(Self::w12),
            "$w13" => Ok(Self::w13),
            "$w14" => Ok(Self::w14),
            "$w15" => Ok(Self::w15),
            "$w16" => Ok(Self::w16),
            "$w17" => Ok(Self::w17),
            "$w18" => Ok(Self::w18),
            "$w19" => Ok(Self::w19),
            "$w20" => Ok(Self::w20),
            "$w21" => Ok(Self::w21),
            "$w22" => Ok(Self::w22),
            "$w23" => Ok(Self::w23),
            "$w24" => Ok(Self::w24),
            "$w25" => Ok(Self::w25),
            "$w26" => Ok(Self::w26),
            "$w27" => Ok(Self::w27),
            "$w28" => Ok(Self::w28),
            "$w29" => Ok(Self::w29),
            "$w30" => Ok(Self::w30),
            "$w31" => Ok(Self::w31),
            "$0" =>
                Err("constant zero cannot be used as an operand for inline asm"),
            "$1" => Err("reserved for assembler (Assembler Temp)"),
            "$26" =>
                Err("OS-reserved register cannot be used as an operand for inline asm"),
            "$27" =>
                Err("OS-reserved register cannot be used as an operand for inline asm"),
            "$28" =>
                Err("the global pointer cannot be used as an operand for inline asm"),
            "$29" =>
                Err("the stack pointer cannot be used as an operand for inline asm"),
            "$30" =>
                Err("the frame pointer cannot be used as an operand for inline asm"),
            "$31" =>
                Err("the return address register cannot be used as an operand for inline asm"),
            _ => Err("unknown register"),
        }
    }
    pub fn validate(self, _arch: super::InlineAsmArch,
        _reloc_model: crate::spec::RelocModel,
        _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
        _target: &crate::spec::Target, _is_clobber: bool)
        -> Result<(), &'static str> {
        match self {
            Self::r2 => { Ok(()) }
            Self::r3 => { Ok(()) }
            Self::r4 => { Ok(()) }
            Self::r5 => { Ok(()) }
            Self::r6 => { Ok(()) }
            Self::r7 => { Ok(()) }
            Self::r8 => { Ok(()) }
            Self::r9 => { Ok(()) }
            Self::r10 => { Ok(()) }
            Self::r11 => { Ok(()) }
            Self::r12 => { Ok(()) }
            Self::r13 => { Ok(()) }
            Self::r14 => { Ok(()) }
            Self::r15 => { Ok(()) }
            Self::r16 => { Ok(()) }
            Self::r17 => { Ok(()) }
            Self::r18 => { Ok(()) }
            Self::r19 => { Ok(()) }
            Self::r20 => { Ok(()) }
            Self::r21 => { Ok(()) }
            Self::r22 => { Ok(()) }
            Self::r23 => { Ok(()) }
            Self::r24 => { Ok(()) }
            Self::r25 => { Ok(()) }
            Self::f0 => { Ok(()) }
            Self::f1 => { Ok(()) }
            Self::f2 => { Ok(()) }
            Self::f3 => { Ok(()) }
            Self::f4 => { Ok(()) }
            Self::f5 => { Ok(()) }
            Self::f6 => { Ok(()) }
            Self::f7 => { Ok(()) }
            Self::f8 => { Ok(()) }
            Self::f9 => { Ok(()) }
            Self::f10 => { Ok(()) }
            Self::f11 => { Ok(()) }
            Self::f12 => { Ok(()) }
            Self::f13 => { Ok(()) }
            Self::f14 => { Ok(()) }
            Self::f15 => { Ok(()) }
            Self::f16 => { Ok(()) }
            Self::f17 => { Ok(()) }
            Self::f18 => { Ok(()) }
            Self::f19 => { Ok(()) }
            Self::f20 => { Ok(()) }
            Self::f21 => { Ok(()) }
            Self::f22 => { Ok(()) }
            Self::f23 => { Ok(()) }
            Self::f24 => { Ok(()) }
            Self::f25 => { Ok(()) }
            Self::f26 => { Ok(()) }
            Self::f27 => { Ok(()) }
            Self::f28 => { Ok(()) }
            Self::f29 => { Ok(()) }
            Self::f30 => { Ok(()) }
            Self::f31 => { Ok(()) }
            Self::w0 => { Ok(()) }
            Self::w1 => { Ok(()) }
            Self::w2 => { Ok(()) }
            Self::w3 => { Ok(()) }
            Self::w4 => { Ok(()) }
            Self::w5 => { Ok(()) }
            Self::w6 => { Ok(()) }
            Self::w7 => { Ok(()) }
            Self::w8 => { Ok(()) }
            Self::w9 => { Ok(()) }
            Self::w10 => { Ok(()) }
            Self::w11 => { Ok(()) }
            Self::w12 => { Ok(()) }
            Self::w13 => { Ok(()) }
            Self::w14 => { Ok(()) }
            Self::w15 => { Ok(()) }
            Self::w16 => { Ok(()) }
            Self::w17 => { Ok(()) }
            Self::w18 => { Ok(()) }
            Self::w19 => { Ok(()) }
            Self::w20 => { Ok(()) }
            Self::w21 => { Ok(()) }
            Self::w22 => { Ok(()) }
            Self::w23 => { Ok(()) }
            Self::w24 => { Ok(()) }
            Self::w25 => { Ok(()) }
            Self::w26 => { Ok(()) }
            Self::w27 => { Ok(()) }
            Self::w28 => { Ok(()) }
            Self::w29 => { Ok(()) }
            Self::w30 => { Ok(()) }
            Self::w31 => { Ok(()) }
        }
    }
}
pub(super) fn fill_reg_map(_arch: super::InlineAsmArch,
    _reloc_model: crate::spec::RelocModel,
    _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
    _target: &crate::spec::Target,
    _map:
        &mut rustc_data_structures::fx::FxHashMap<super::InlineAsmRegClass,
        rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>>) {
    #[allow(unused_imports)]
    use super::{InlineAsmReg, InlineAsmRegClass};
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r7));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r8));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r9));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r10));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r11));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r12));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r13));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r14));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r16));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r17));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r18));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r19));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r20));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r21));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r22));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r23));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r24));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::r25));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f7));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f8));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f9));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f10));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f11));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f12));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f13));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f14));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f16));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f17));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f18));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f19));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f20));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f21));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f22));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f23));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f24));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f25));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f26));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f27));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f28));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f29));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f30));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::freg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::f31));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w7));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w8));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w9));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w10));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w11));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w12));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w13));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w14));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w16));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w17));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w18));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w19));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w20));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w21));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w22));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w23));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w24));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w25));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w26));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w27));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w28));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w29));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w30));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::Mips(MipsInlineAsmRegClass::wreg))
            {
            set.insert(InlineAsmReg::Mips(MipsInlineAsmReg::w31));
        }
    }
}def_regs! {
60    Mips MipsInlineAsmReg MipsInlineAsmRegClass {
61        r2: reg = ["$2"],
62        r3: reg = ["$3"],
63        r4: reg = ["$4"],
64        r5: reg = ["$5"],
65        r6: reg = ["$6"],
66        r7: reg = ["$7"],
67        // FIXME: Reserve $t0, $t1 if in mips16 mode.
68        r8: reg = ["$8"],
69        r9: reg = ["$9"],
70        r10: reg = ["$10"],
71        r11: reg = ["$11"],
72        r12: reg = ["$12"],
73        r13: reg = ["$13"],
74        r14: reg = ["$14"],
75        r15: reg = ["$15"],
76        r16: reg = ["$16"],
77        r17: reg = ["$17"],
78        r18: reg = ["$18"],
79        r19: reg = ["$19"],
80        r20: reg = ["$20"],
81        r21: reg = ["$21"],
82        r22: reg = ["$22"],
83        r23: reg = ["$23"],
84        r24: reg = ["$24"],
85        r25: reg = ["$25"],
86        f0: freg = ["$f0"],
87        f1: freg = ["$f1"],
88        f2: freg = ["$f2"],
89        f3: freg = ["$f3"],
90        f4: freg = ["$f4"],
91        f5: freg = ["$f5"],
92        f6: freg = ["$f6"],
93        f7: freg = ["$f7"],
94        f8: freg = ["$f8"],
95        f9: freg = ["$f9"],
96        f10: freg = ["$f10"],
97        f11: freg = ["$f11"],
98        f12: freg = ["$f12"],
99        f13: freg = ["$f13"],
100        f14: freg = ["$f14"],
101        f15: freg = ["$f15"],
102        f16: freg = ["$f16"],
103        f17: freg = ["$f17"],
104        f18: freg = ["$f18"],
105        f19: freg = ["$f19"],
106        f20: freg = ["$f20"],
107        f21: freg = ["$f21"],
108        f22: freg = ["$f22"],
109        f23: freg = ["$f23"],
110        f24: freg = ["$f24"],
111        f25: freg = ["$f25"],
112        f26: freg = ["$f26"],
113        f27: freg = ["$f27"],
114        f28: freg = ["$f28"],
115        f29: freg = ["$f29"],
116        f30: freg = ["$f30"],
117        f31: freg = ["$f31"],
118        w0: wreg = ["$w0"],
119        w1: wreg = ["$w1"],
120        w2: wreg = ["$w2"],
121        w3: wreg = ["$w3"],
122        w4: wreg = ["$w4"],
123        w5: wreg = ["$w5"],
124        w6: wreg = ["$w6"],
125        w7: wreg = ["$w7"],
126        w8: wreg = ["$w8"],
127        w9: wreg = ["$w9"],
128        w10: wreg = ["$w10"],
129        w11: wreg = ["$w11"],
130        w12: wreg = ["$w12"],
131        w13: wreg = ["$w13"],
132        w14: wreg = ["$w14"],
133        w15: wreg = ["$w15"],
134        w16: wreg = ["$w16"],
135        w17: wreg = ["$w17"],
136        w18: wreg = ["$w18"],
137        w19: wreg = ["$w19"],
138        w20: wreg = ["$w20"],
139        w21: wreg = ["$w21"],
140        w22: wreg = ["$w22"],
141        w23: wreg = ["$w23"],
142        w24: wreg = ["$w24"],
143        w25: wreg = ["$w25"],
144        w26: wreg = ["$w26"],
145        w27: wreg = ["$w27"],
146        w28: wreg = ["$w28"],
147        w29: wreg = ["$w29"],
148        w30: wreg = ["$w30"],
149        w31: wreg = ["$w31"],
150        #error = ["$0"] =>
151            "constant zero cannot be used as an operand for inline asm",
152        #error = ["$1"] =>
153            "reserved for assembler (Assembler Temp)",
154        #error = ["$26"] =>
155            "OS-reserved register cannot be used as an operand for inline asm",
156        #error = ["$27"] =>
157            "OS-reserved register cannot be used as an operand for inline asm",
158        #error = ["$28"] =>
159            "the global pointer cannot be used as an operand for inline asm",
160        #error = ["$29"] =>
161            "the stack pointer cannot be used as an operand for inline asm",
162        #error = ["$30"] =>
163            "the frame pointer cannot be used as an operand for inline asm",
164        #error = ["$31"] =>
165            "the return address register cannot be used as an operand for inline asm",
166    }
167}
168
169impl MipsInlineAsmReg {
170    pub fn emit(
171        self,
172        out: &mut dyn fmt::Write,
173        _arch: InlineAsmArch,
174        _modifier: Option<char>,
175    ) -> fmt::Result {
176        out.write_str(self.name())
177    }
178
179    pub fn overlapping_regs(self, mut cb: impl FnMut(MipsInlineAsmReg)) {
180        cb(self);
181
182        macro_rules! reg_conflicts {
183            (
184                $(
185                    $full:ident : $($field:ident)*
186                ),*;
187            ) => {
188                match self {
189                    $(
190                        Self::$full => {
191                            $(cb(Self::$field);)*
192                        }
193                        $(Self::$field)|* => cb(Self::$full),
194                    )*
195                    _ => {}
196                }
197            };
198        }
199
200        // Float registers overlap the first half of vector registers.
201        match self {
    Self::w0 => { cb(Self::f0); }
    Self::f0 => cb(Self::w0),
    Self::w1 => { cb(Self::f1); }
    Self::f1 => cb(Self::w1),
    Self::w2 => { cb(Self::f2); }
    Self::f2 => cb(Self::w2),
    Self::w3 => { cb(Self::f3); }
    Self::f3 => cb(Self::w3),
    Self::w4 => { cb(Self::f4); }
    Self::f4 => cb(Self::w4),
    Self::w5 => { cb(Self::f5); }
    Self::f5 => cb(Self::w5),
    Self::w6 => { cb(Self::f6); }
    Self::f6 => cb(Self::w6),
    Self::w7 => { cb(Self::f7); }
    Self::f7 => cb(Self::w7),
    Self::w8 => { cb(Self::f8); }
    Self::f8 => cb(Self::w8),
    Self::w9 => { cb(Self::f9); }
    Self::f9 => cb(Self::w9),
    Self::w10 => { cb(Self::f10); }
    Self::f10 => cb(Self::w10),
    Self::w11 => { cb(Self::f11); }
    Self::f11 => cb(Self::w11),
    Self::w12 => { cb(Self::f12); }
    Self::f12 => cb(Self::w12),
    Self::w13 => { cb(Self::f13); }
    Self::f13 => cb(Self::w13),
    Self::w14 => { cb(Self::f14); }
    Self::f14 => cb(Self::w14),
    Self::w15 => { cb(Self::f15); }
    Self::f15 => cb(Self::w15),
    Self::w16 => { cb(Self::f16); }
    Self::f16 => cb(Self::w16),
    Self::w17 => { cb(Self::f17); }
    Self::f17 => cb(Self::w17),
    Self::w18 => { cb(Self::f18); }
    Self::f18 => cb(Self::w18),
    Self::w19 => { cb(Self::f19); }
    Self::f19 => cb(Self::w19),
    Self::w20 => { cb(Self::f20); }
    Self::f20 => cb(Self::w20),
    Self::w21 => { cb(Self::f21); }
    Self::f21 => cb(Self::w21),
    Self::w22 => { cb(Self::f22); }
    Self::f22 => cb(Self::w22),
    Self::w23 => { cb(Self::f23); }
    Self::f23 => cb(Self::w23),
    Self::w24 => { cb(Self::f24); }
    Self::f24 => cb(Self::w24),
    Self::w25 => { cb(Self::f25); }
    Self::f25 => cb(Self::w25),
    Self::w26 => { cb(Self::f26); }
    Self::f26 => cb(Self::w26),
    Self::w27 => { cb(Self::f27); }
    Self::f27 => cb(Self::w27),
    Self::w28 => { cb(Self::f28); }
    Self::f28 => cb(Self::w28),
    Self::w29 => { cb(Self::f29); }
    Self::f29 => cb(Self::w29),
    Self::w30 => { cb(Self::f30); }
    Self::f30 => cb(Self::w30),
    Self::w31 => { cb(Self::f31); }
    Self::f31 => cb(Self::w31),
    _ => {}
}reg_conflicts! {
202            w0: f0,
203            w1: f1,
204            w2: f2,
205            w3: f3,
206            w4: f4,
207            w5: f5,
208            w6: f6,
209            w7: f7,
210            w8: f8,
211            w9: f9,
212            w10: f10,
213            w11: f11,
214            w12: f12,
215            w13: f13,
216            w14: f14,
217            w15: f15,
218            w16: f16,
219            w17: f17,
220            w18: f18,
221            w19: f19,
222            w20: f20,
223            w21: f21,
224            w22: f22,
225            w23: f23,
226            w24: f24,
227            w25: f25,
228            w26: f26,
229            w27: f27,
230            w28: f28,
231            w29: f29,
232            w30: f30,
233            w31: f31;
234        }
235    }
236}