rustc_target/asm/
x86.rs

1use std::fmt;
2
3use rustc_data_structures::fx::FxIndexSet;
4use rustc_span::Symbol;
5
6use super::{InlineAsmArch, InlineAsmType, ModifierInfo};
7use crate::spec::{RelocModel, Target};
8
9#[allow(non_camel_case_types)]
pub enum X86InlineAsmRegClass {
    reg,
    reg_abcd,
    reg_byte,
    xmm_reg,
    ymm_reg,
    zmm_reg,
    kreg,
    kreg0,
    mmx_reg,
    x87_reg,
    tmm_reg,
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for X86InlineAsmRegClass { }
#[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for X86InlineAsmRegClass { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for X86InlineAsmRegClass {
    #[inline]
    fn clone(&self) -> X86InlineAsmRegClass { *self }
}
const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for X86InlineAsmRegClass {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        X86InlineAsmRegClass::reg => { 0usize }
                        X86InlineAsmRegClass::reg_abcd => { 1usize }
                        X86InlineAsmRegClass::reg_byte => { 2usize }
                        X86InlineAsmRegClass::xmm_reg => { 3usize }
                        X86InlineAsmRegClass::ymm_reg => { 4usize }
                        X86InlineAsmRegClass::zmm_reg => { 5usize }
                        X86InlineAsmRegClass::kreg => { 6usize }
                        X86InlineAsmRegClass::kreg0 => { 7usize }
                        X86InlineAsmRegClass::mmx_reg => { 8usize }
                        X86InlineAsmRegClass::x87_reg => { 9usize }
                        X86InlineAsmRegClass::tmm_reg => { 10usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    X86InlineAsmRegClass::reg => {}
                    X86InlineAsmRegClass::reg_abcd => {}
                    X86InlineAsmRegClass::reg_byte => {}
                    X86InlineAsmRegClass::xmm_reg => {}
                    X86InlineAsmRegClass::ymm_reg => {}
                    X86InlineAsmRegClass::zmm_reg => {}
                    X86InlineAsmRegClass::kreg => {}
                    X86InlineAsmRegClass::kreg0 => {}
                    X86InlineAsmRegClass::mmx_reg => {}
                    X86InlineAsmRegClass::x87_reg => {}
                    X86InlineAsmRegClass::tmm_reg => {}
                }
            }
        }
    };
const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for X86InlineAsmRegClass {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { X86InlineAsmRegClass::reg }
                    1usize => { X86InlineAsmRegClass::reg_abcd }
                    2usize => { X86InlineAsmRegClass::reg_byte }
                    3usize => { X86InlineAsmRegClass::xmm_reg }
                    4usize => { X86InlineAsmRegClass::ymm_reg }
                    5usize => { X86InlineAsmRegClass::zmm_reg }
                    6usize => { X86InlineAsmRegClass::kreg }
                    7usize => { X86InlineAsmRegClass::kreg0 }
                    8usize => { X86InlineAsmRegClass::mmx_reg }
                    9usize => { X86InlineAsmRegClass::x87_reg }
                    10usize => { X86InlineAsmRegClass::tmm_reg }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `X86InlineAsmRegClass`, expected 0..11, actual {0}",
                                n));
                    }
                }
            }
        }
    };
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for X86InlineAsmRegClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                X86InlineAsmRegClass::reg => "reg",
                X86InlineAsmRegClass::reg_abcd => "reg_abcd",
                X86InlineAsmRegClass::reg_byte => "reg_byte",
                X86InlineAsmRegClass::xmm_reg => "xmm_reg",
                X86InlineAsmRegClass::ymm_reg => "ymm_reg",
                X86InlineAsmRegClass::zmm_reg => "zmm_reg",
                X86InlineAsmRegClass::kreg => "kreg",
                X86InlineAsmRegClass::kreg0 => "kreg0",
                X86InlineAsmRegClass::mmx_reg => "mmx_reg",
                X86InlineAsmRegClass::x87_reg => "x87_reg",
                X86InlineAsmRegClass::tmm_reg => "tmm_reg",
            })
    }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for X86InlineAsmRegClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {}
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for X86InlineAsmRegClass { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for X86InlineAsmRegClass {
    #[inline]
    fn eq(&self, other: &X86InlineAsmRegClass) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialOrd for X86InlineAsmRegClass {
    #[inline]
    fn partial_cmp(&self, other: &X86InlineAsmRegClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for X86InlineAsmRegClass {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}
const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for X86InlineAsmRegClass where __CTX: crate::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    X86InlineAsmRegClass::reg => {}
                    X86InlineAsmRegClass::reg_abcd => {}
                    X86InlineAsmRegClass::reg_byte => {}
                    X86InlineAsmRegClass::xmm_reg => {}
                    X86InlineAsmRegClass::ymm_reg => {}
                    X86InlineAsmRegClass::zmm_reg => {}
                    X86InlineAsmRegClass::kreg => {}
                    X86InlineAsmRegClass::kreg0 => {}
                    X86InlineAsmRegClass::mmx_reg => {}
                    X86InlineAsmRegClass::x87_reg => {}
                    X86InlineAsmRegClass::tmm_reg => {}
                }
            }
        }
    };
impl X86InlineAsmRegClass {
    pub fn name(self) -> rustc_span::Symbol {
        match self {
            Self::reg => rustc_span::sym::reg,
            Self::reg_abcd => rustc_span::sym::reg_abcd,
            Self::reg_byte => rustc_span::sym::reg_byte,
            Self::xmm_reg => rustc_span::sym::xmm_reg,
            Self::ymm_reg => rustc_span::sym::ymm_reg,
            Self::zmm_reg => rustc_span::sym::zmm_reg,
            Self::kreg => rustc_span::sym::kreg,
            Self::kreg0 => rustc_span::sym::kreg0,
            Self::mmx_reg => rustc_span::sym::mmx_reg,
            Self::x87_reg => rustc_span::sym::x87_reg,
            Self::tmm_reg => rustc_span::sym::tmm_reg,
        }
    }
    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::reg_abcd => Ok(Self::reg_abcd),
            rustc_span::sym::reg_byte => Ok(Self::reg_byte),
            rustc_span::sym::xmm_reg => Ok(Self::xmm_reg),
            rustc_span::sym::ymm_reg => Ok(Self::ymm_reg),
            rustc_span::sym::zmm_reg => Ok(Self::zmm_reg),
            rustc_span::sym::kreg => Ok(Self::kreg),
            rustc_span::sym::kreg0 => Ok(Self::kreg0),
            rustc_span::sym::mmx_reg => Ok(Self::mmx_reg),
            rustc_span::sym::x87_reg => Ok(Self::x87_reg),
            rustc_span::sym::tmm_reg => Ok(Self::tmm_reg),
            _ =>
                Err(&[rustc_span::sym::reg, rustc_span::sym::reg_abcd,
                                rustc_span::sym::reg_byte, rustc_span::sym::xmm_reg,
                                rustc_span::sym::ymm_reg, rustc_span::sym::zmm_reg,
                                rustc_span::sym::kreg, rustc_span::sym::kreg0,
                                rustc_span::sym::mmx_reg, rustc_span::sym::x87_reg,
                                rustc_span::sym::tmm_reg]),
        }
    }
}
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::X86(X86InlineAsmRegClass::reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_abcd),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg0),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg),
        FxIndexSet::default());
    map.insert(InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg),
        FxIndexSet::default());
    map
}def_reg_class! {
10    X86 X86InlineAsmRegClass {
11        reg,
12        reg_abcd,
13        reg_byte,
14        xmm_reg,
15        ymm_reg,
16        zmm_reg,
17        kreg,
18        kreg0,
19        mmx_reg,
20        x87_reg,
21        tmm_reg,
22    }
23}
24
25impl X86InlineAsmRegClass {
26    pub fn valid_modifiers(self, arch: super::InlineAsmArch) -> &'static [char] {
27        match self {
28            Self::reg => {
29                if arch == InlineAsmArch::X86_64 {
30                    &['l', 'x', 'e', 'r']
31                } else {
32                    &['x', 'e']
33                }
34            }
35            Self::reg_abcd => {
36                if arch == InlineAsmArch::X86_64 {
37                    &['l', 'h', 'x', 'e', 'r']
38                } else {
39                    &['l', 'h', 'x', 'e']
40                }
41            }
42            Self::reg_byte => &[],
43            Self::xmm_reg | Self::ymm_reg | Self::zmm_reg => &['x', 'y', 'z'],
44            Self::kreg | Self::kreg0 => &[],
45            Self::mmx_reg | Self::x87_reg => &[],
46            Self::tmm_reg => &[],
47        }
48    }
49
50    pub fn suggest_class(self, _arch: InlineAsmArch, ty: InlineAsmType) -> Option<Self> {
51        match self {
52            Self::reg | Self::reg_abcd if ty.size().bits() == 8 => Some(Self::reg_byte),
53            _ => None,
54        }
55    }
56
57    pub fn suggest_modifier(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<ModifierInfo> {
58        match self {
59            Self::reg => match ty.size().bits() {
60                16 => Some(('x', "ax", 16).into()),
61                32 if arch == InlineAsmArch::X86_64 => Some(('e', "eax", 32).into()),
62                _ => None,
63            },
64            Self::reg_abcd => match ty.size().bits() {
65                16 => Some(('x', "ax", 16).into()),
66                32 if arch == InlineAsmArch::X86_64 => Some(('e', "eax", 32).into()),
67                _ => None,
68            },
69            Self::reg_byte => None,
70            Self::xmm_reg => None,
71            Self::ymm_reg => match ty.size().bits() {
72                256 => None,
73                _ => Some(('x', "xmm0", 128).into()),
74            },
75            Self::zmm_reg => match ty.size().bits() {
76                512 => None,
77                256 => Some(('y', "ymm0", 256).into()),
78                _ => Some(('x', "xmm0", 128).into()),
79            },
80            Self::kreg | Self::kreg0 => None,
81            Self::mmx_reg | Self::x87_reg => None,
82            Self::tmm_reg => None,
83        }
84    }
85
86    pub fn default_modifier(self, arch: InlineAsmArch) -> Option<ModifierInfo> {
87        match self {
88            Self::reg | Self::reg_abcd => {
89                if arch == InlineAsmArch::X86_64 {
90                    Some(('r', "rax", 64).into())
91                } else {
92                    Some(('e', "eax", 32).into())
93                }
94            }
95            Self::reg_byte => None,
96            Self::xmm_reg => Some(('x', "xmm0", 128).into()),
97            Self::ymm_reg => Some(('y', "ymm0", 256).into()),
98            Self::zmm_reg => Some(('z', "zmm0", 512).into()),
99            Self::kreg | Self::kreg0 => None,
100            Self::mmx_reg | Self::x87_reg => None,
101            Self::tmm_reg => None,
102        }
103    }
104
105    pub fn supported_types(
106        self,
107        arch: InlineAsmArch,
108    ) -> &'static [(InlineAsmType, Option<Symbol>)] {
109        match self {
110            Self::reg | Self::reg_abcd => {
111                if arch == InlineAsmArch::X86_64 {
112                    {
    use super::InlineAsmType::*;
    &[(I16, None), (I32, None), (I64, None), (F16, None), (F32, None),
                (F64, None)]
}types! { _: I16, I32, I64, F16, F32, F64; }
113                } else {
114                    {
    use super::InlineAsmType::*;
    &[(I16, None), (I32, None), (F16, None), (F32, None)]
}types! { _: I16, I32, F16, F32; }
115                }
116            }
117            Self::reg_byte => {
    use super::InlineAsmType::*;
    &[(I8, None)]
}types! { _: I8; },
118            Self::xmm_reg => {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::sse)), (I64, Some(rustc_span::sym::sse)),
                (F16, Some(rustc_span::sym::sse)),
                (F32, Some(rustc_span::sym::sse)),
                (F64, Some(rustc_span::sym::sse)),
                (F128, Some(rustc_span::sym::sse)),
                (VecI8(16), Some(rustc_span::sym::sse)),
                (VecI16(8), Some(rustc_span::sym::sse)),
                (VecI32(4), Some(rustc_span::sym::sse)),
                (VecI64(2), Some(rustc_span::sym::sse)),
                (VecF16(8), Some(rustc_span::sym::sse)),
                (VecF32(4), Some(rustc_span::sym::sse)),
                (VecF64(2), Some(rustc_span::sym::sse))]
}types! {
119                sse: I32, I64, F16, F32, F64, F128,
120                  VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2);
121            },
122            Self::ymm_reg => {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::avx)), (I64, Some(rustc_span::sym::avx)),
                (F16, Some(rustc_span::sym::avx)),
                (F32, Some(rustc_span::sym::avx)),
                (F64, Some(rustc_span::sym::avx)),
                (F128, Some(rustc_span::sym::avx)),
                (VecI8(16), Some(rustc_span::sym::avx)),
                (VecI16(8), Some(rustc_span::sym::avx)),
                (VecI32(4), Some(rustc_span::sym::avx)),
                (VecI64(2), Some(rustc_span::sym::avx)),
                (VecF16(8), Some(rustc_span::sym::avx)),
                (VecF32(4), Some(rustc_span::sym::avx)),
                (VecF64(2), Some(rustc_span::sym::avx)),
                (VecI8(32), Some(rustc_span::sym::avx)),
                (VecI16(16), Some(rustc_span::sym::avx)),
                (VecI32(8), Some(rustc_span::sym::avx)),
                (VecI64(4), Some(rustc_span::sym::avx)),
                (VecF16(16), Some(rustc_span::sym::avx)),
                (VecF32(8), Some(rustc_span::sym::avx)),
                (VecF64(4), Some(rustc_span::sym::avx))]
}types! {
123                avx: I32, I64, F16, F32, F64, F128,
124                    VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
125                    VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4);
126            },
127            Self::zmm_reg => {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::avx512f)),
                (I64, Some(rustc_span::sym::avx512f)),
                (F16, Some(rustc_span::sym::avx512f)),
                (F32, Some(rustc_span::sym::avx512f)),
                (F64, Some(rustc_span::sym::avx512f)),
                (F128, Some(rustc_span::sym::avx512f)),
                (VecI8(16), Some(rustc_span::sym::avx512f)),
                (VecI16(8), Some(rustc_span::sym::avx512f)),
                (VecI32(4), Some(rustc_span::sym::avx512f)),
                (VecI64(2), Some(rustc_span::sym::avx512f)),
                (VecF16(8), Some(rustc_span::sym::avx512f)),
                (VecF32(4), Some(rustc_span::sym::avx512f)),
                (VecF64(2), Some(rustc_span::sym::avx512f)),
                (VecI8(32), Some(rustc_span::sym::avx512f)),
                (VecI16(16), Some(rustc_span::sym::avx512f)),
                (VecI32(8), Some(rustc_span::sym::avx512f)),
                (VecI64(4), Some(rustc_span::sym::avx512f)),
                (VecF16(16), Some(rustc_span::sym::avx512f)),
                (VecF32(8), Some(rustc_span::sym::avx512f)),
                (VecF64(4), Some(rustc_span::sym::avx512f)),
                (VecI8(64), Some(rustc_span::sym::avx512f)),
                (VecI16(32), Some(rustc_span::sym::avx512f)),
                (VecI32(16), Some(rustc_span::sym::avx512f)),
                (VecI64(8), Some(rustc_span::sym::avx512f)),
                (VecF16(32), Some(rustc_span::sym::avx512f)),
                (VecF32(16), Some(rustc_span::sym::avx512f)),
                (VecF64(8), Some(rustc_span::sym::avx512f))]
}types! {
128                avx512f: I32, I64, F16, F32, F64, F128,
129                    VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
130                    VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4),
131                    VecI8(64), VecI16(32), VecI32(16), VecI64(8), VecF16(32), VecF32(16), VecF64(8);
132            },
133            Self::kreg => {
    use super::InlineAsmType::*;
    &[(I8, Some(rustc_span::sym::avx512f)),
                (I16, Some(rustc_span::sym::avx512f)),
                (I32, Some(rustc_span::sym::avx512bw)),
                (I64, Some(rustc_span::sym::avx512bw))]
}types! {
134                avx512f: I8, I16;
135                avx512bw: I32, I64;
136            },
137            Self::kreg0 => &[],
138            Self::mmx_reg | Self::x87_reg => &[],
139            Self::tmm_reg => &[],
140        }
141    }
142}
143
144fn x86_64_only(
145    arch: InlineAsmArch,
146    _reloc_model: RelocModel,
147    _target_features: &FxIndexSet<Symbol>,
148    _target: &Target,
149    _is_clobber: bool,
150) -> Result<(), &'static str> {
151    match arch {
152        InlineAsmArch::X86 => Err("register is only available on x86_64"),
153        InlineAsmArch::X86_64 => Ok(()),
154        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
155    }
156}
157
158fn high_byte(
159    arch: InlineAsmArch,
160    _reloc_model: RelocModel,
161    _target_features: &FxIndexSet<Symbol>,
162    _target: &Target,
163    _is_clobber: bool,
164) -> Result<(), &'static str> {
165    match arch {
166        InlineAsmArch::X86_64 => Err("high byte registers cannot be used as an operand on x86_64"),
167        _ => Ok(()),
168    }
169}
170
171fn rbx_reserved(
172    arch: InlineAsmArch,
173    _reloc_model: RelocModel,
174    _target_features: &FxIndexSet<Symbol>,
175    _target: &Target,
176    _is_clobber: bool,
177) -> Result<(), &'static str> {
178    match arch {
179        InlineAsmArch::X86 => Ok(()),
180        InlineAsmArch::X86_64 => {
181            Err("rbx is used internally by LLVM and cannot be used as an operand for inline asm")
182        }
183        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
184    }
185}
186
187fn esi_reserved(
188    arch: InlineAsmArch,
189    _reloc_model: RelocModel,
190    _target_features: &FxIndexSet<Symbol>,
191    _target: &Target,
192    _is_clobber: bool,
193) -> Result<(), &'static str> {
194    match arch {
195        InlineAsmArch::X86 => {
196            Err("esi is used internally by LLVM and cannot be used as an operand for inline asm")
197        }
198        InlineAsmArch::X86_64 => Ok(()),
199        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
200    }
201}
202
203#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
pub enum X86InlineAsmReg {
    ax,
    bx,
    cx,
    dx,
    si,
    di,
    r8,
    r9,
    r10,
    r11,
    r12,
    r13,
    r14,
    r15,
    al,
    ah,
    bl,
    bh,
    cl,
    ch,
    dl,
    dh,
    sil,
    dil,
    r8b,
    r9b,
    r10b,
    r11b,
    r12b,
    r13b,
    r14b,
    r15b,
    xmm0,
    xmm1,
    xmm2,
    xmm3,
    xmm4,
    xmm5,
    xmm6,
    xmm7,
    xmm8,
    xmm9,
    xmm10,
    xmm11,
    xmm12,
    xmm13,
    xmm14,
    xmm15,
    ymm0,
    ymm1,
    ymm2,
    ymm3,
    ymm4,
    ymm5,
    ymm6,
    ymm7,
    ymm8,
    ymm9,
    ymm10,
    ymm11,
    ymm12,
    ymm13,
    ymm14,
    ymm15,
    zmm0,
    zmm1,
    zmm2,
    zmm3,
    zmm4,
    zmm5,
    zmm6,
    zmm7,
    zmm8,
    zmm9,
    zmm10,
    zmm11,
    zmm12,
    zmm13,
    zmm14,
    zmm15,
    zmm16,
    zmm17,
    zmm18,
    zmm19,
    zmm20,
    zmm21,
    zmm22,
    zmm23,
    zmm24,
    zmm25,
    zmm26,
    zmm27,
    zmm28,
    zmm29,
    zmm30,
    zmm31,
    k0,
    k1,
    k2,
    k3,
    k4,
    k5,
    k6,
    k7,
    mm0,
    mm1,
    mm2,
    mm3,
    mm4,
    mm5,
    mm6,
    mm7,
    st0,
    st1,
    st2,
    st3,
    st4,
    st5,
    st6,
    st7,
    tmm0,
    tmm1,
    tmm2,
    tmm3,
    tmm4,
    tmm5,
    tmm6,
    tmm7,
}
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for X86InlineAsmReg { }
#[automatically_derived]
#[doc(hidden)]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for X86InlineAsmReg { }
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for X86InlineAsmReg {
    #[inline]
    fn clone(&self) -> X86InlineAsmReg { *self }
}
const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for X86InlineAsmReg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        X86InlineAsmReg::ax => { 0usize }
                        X86InlineAsmReg::bx => { 1usize }
                        X86InlineAsmReg::cx => { 2usize }
                        X86InlineAsmReg::dx => { 3usize }
                        X86InlineAsmReg::si => { 4usize }
                        X86InlineAsmReg::di => { 5usize }
                        X86InlineAsmReg::r8 => { 6usize }
                        X86InlineAsmReg::r9 => { 7usize }
                        X86InlineAsmReg::r10 => { 8usize }
                        X86InlineAsmReg::r11 => { 9usize }
                        X86InlineAsmReg::r12 => { 10usize }
                        X86InlineAsmReg::r13 => { 11usize }
                        X86InlineAsmReg::r14 => { 12usize }
                        X86InlineAsmReg::r15 => { 13usize }
                        X86InlineAsmReg::al => { 14usize }
                        X86InlineAsmReg::ah => { 15usize }
                        X86InlineAsmReg::bl => { 16usize }
                        X86InlineAsmReg::bh => { 17usize }
                        X86InlineAsmReg::cl => { 18usize }
                        X86InlineAsmReg::ch => { 19usize }
                        X86InlineAsmReg::dl => { 20usize }
                        X86InlineAsmReg::dh => { 21usize }
                        X86InlineAsmReg::sil => { 22usize }
                        X86InlineAsmReg::dil => { 23usize }
                        X86InlineAsmReg::r8b => { 24usize }
                        X86InlineAsmReg::r9b => { 25usize }
                        X86InlineAsmReg::r10b => { 26usize }
                        X86InlineAsmReg::r11b => { 27usize }
                        X86InlineAsmReg::r12b => { 28usize }
                        X86InlineAsmReg::r13b => { 29usize }
                        X86InlineAsmReg::r14b => { 30usize }
                        X86InlineAsmReg::r15b => { 31usize }
                        X86InlineAsmReg::xmm0 => { 32usize }
                        X86InlineAsmReg::xmm1 => { 33usize }
                        X86InlineAsmReg::xmm2 => { 34usize }
                        X86InlineAsmReg::xmm3 => { 35usize }
                        X86InlineAsmReg::xmm4 => { 36usize }
                        X86InlineAsmReg::xmm5 => { 37usize }
                        X86InlineAsmReg::xmm6 => { 38usize }
                        X86InlineAsmReg::xmm7 => { 39usize }
                        X86InlineAsmReg::xmm8 => { 40usize }
                        X86InlineAsmReg::xmm9 => { 41usize }
                        X86InlineAsmReg::xmm10 => { 42usize }
                        X86InlineAsmReg::xmm11 => { 43usize }
                        X86InlineAsmReg::xmm12 => { 44usize }
                        X86InlineAsmReg::xmm13 => { 45usize }
                        X86InlineAsmReg::xmm14 => { 46usize }
                        X86InlineAsmReg::xmm15 => { 47usize }
                        X86InlineAsmReg::ymm0 => { 48usize }
                        X86InlineAsmReg::ymm1 => { 49usize }
                        X86InlineAsmReg::ymm2 => { 50usize }
                        X86InlineAsmReg::ymm3 => { 51usize }
                        X86InlineAsmReg::ymm4 => { 52usize }
                        X86InlineAsmReg::ymm5 => { 53usize }
                        X86InlineAsmReg::ymm6 => { 54usize }
                        X86InlineAsmReg::ymm7 => { 55usize }
                        X86InlineAsmReg::ymm8 => { 56usize }
                        X86InlineAsmReg::ymm9 => { 57usize }
                        X86InlineAsmReg::ymm10 => { 58usize }
                        X86InlineAsmReg::ymm11 => { 59usize }
                        X86InlineAsmReg::ymm12 => { 60usize }
                        X86InlineAsmReg::ymm13 => { 61usize }
                        X86InlineAsmReg::ymm14 => { 62usize }
                        X86InlineAsmReg::ymm15 => { 63usize }
                        X86InlineAsmReg::zmm0 => { 64usize }
                        X86InlineAsmReg::zmm1 => { 65usize }
                        X86InlineAsmReg::zmm2 => { 66usize }
                        X86InlineAsmReg::zmm3 => { 67usize }
                        X86InlineAsmReg::zmm4 => { 68usize }
                        X86InlineAsmReg::zmm5 => { 69usize }
                        X86InlineAsmReg::zmm6 => { 70usize }
                        X86InlineAsmReg::zmm7 => { 71usize }
                        X86InlineAsmReg::zmm8 => { 72usize }
                        X86InlineAsmReg::zmm9 => { 73usize }
                        X86InlineAsmReg::zmm10 => { 74usize }
                        X86InlineAsmReg::zmm11 => { 75usize }
                        X86InlineAsmReg::zmm12 => { 76usize }
                        X86InlineAsmReg::zmm13 => { 77usize }
                        X86InlineAsmReg::zmm14 => { 78usize }
                        X86InlineAsmReg::zmm15 => { 79usize }
                        X86InlineAsmReg::zmm16 => { 80usize }
                        X86InlineAsmReg::zmm17 => { 81usize }
                        X86InlineAsmReg::zmm18 => { 82usize }
                        X86InlineAsmReg::zmm19 => { 83usize }
                        X86InlineAsmReg::zmm20 => { 84usize }
                        X86InlineAsmReg::zmm21 => { 85usize }
                        X86InlineAsmReg::zmm22 => { 86usize }
                        X86InlineAsmReg::zmm23 => { 87usize }
                        X86InlineAsmReg::zmm24 => { 88usize }
                        X86InlineAsmReg::zmm25 => { 89usize }
                        X86InlineAsmReg::zmm26 => { 90usize }
                        X86InlineAsmReg::zmm27 => { 91usize }
                        X86InlineAsmReg::zmm28 => { 92usize }
                        X86InlineAsmReg::zmm29 => { 93usize }
                        X86InlineAsmReg::zmm30 => { 94usize }
                        X86InlineAsmReg::zmm31 => { 95usize }
                        X86InlineAsmReg::k0 => { 96usize }
                        X86InlineAsmReg::k1 => { 97usize }
                        X86InlineAsmReg::k2 => { 98usize }
                        X86InlineAsmReg::k3 => { 99usize }
                        X86InlineAsmReg::k4 => { 100usize }
                        X86InlineAsmReg::k5 => { 101usize }
                        X86InlineAsmReg::k6 => { 102usize }
                        X86InlineAsmReg::k7 => { 103usize }
                        X86InlineAsmReg::mm0 => { 104usize }
                        X86InlineAsmReg::mm1 => { 105usize }
                        X86InlineAsmReg::mm2 => { 106usize }
                        X86InlineAsmReg::mm3 => { 107usize }
                        X86InlineAsmReg::mm4 => { 108usize }
                        X86InlineAsmReg::mm5 => { 109usize }
                        X86InlineAsmReg::mm6 => { 110usize }
                        X86InlineAsmReg::mm7 => { 111usize }
                        X86InlineAsmReg::st0 => { 112usize }
                        X86InlineAsmReg::st1 => { 113usize }
                        X86InlineAsmReg::st2 => { 114usize }
                        X86InlineAsmReg::st3 => { 115usize }
                        X86InlineAsmReg::st4 => { 116usize }
                        X86InlineAsmReg::st5 => { 117usize }
                        X86InlineAsmReg::st6 => { 118usize }
                        X86InlineAsmReg::st7 => { 119usize }
                        X86InlineAsmReg::tmm0 => { 120usize }
                        X86InlineAsmReg::tmm1 => { 121usize }
                        X86InlineAsmReg::tmm2 => { 122usize }
                        X86InlineAsmReg::tmm3 => { 123usize }
                        X86InlineAsmReg::tmm4 => { 124usize }
                        X86InlineAsmReg::tmm5 => { 125usize }
                        X86InlineAsmReg::tmm6 => { 126usize }
                        X86InlineAsmReg::tmm7 => { 127usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    X86InlineAsmReg::ax => {}
                    X86InlineAsmReg::bx => {}
                    X86InlineAsmReg::cx => {}
                    X86InlineAsmReg::dx => {}
                    X86InlineAsmReg::si => {}
                    X86InlineAsmReg::di => {}
                    X86InlineAsmReg::r8 => {}
                    X86InlineAsmReg::r9 => {}
                    X86InlineAsmReg::r10 => {}
                    X86InlineAsmReg::r11 => {}
                    X86InlineAsmReg::r12 => {}
                    X86InlineAsmReg::r13 => {}
                    X86InlineAsmReg::r14 => {}
                    X86InlineAsmReg::r15 => {}
                    X86InlineAsmReg::al => {}
                    X86InlineAsmReg::ah => {}
                    X86InlineAsmReg::bl => {}
                    X86InlineAsmReg::bh => {}
                    X86InlineAsmReg::cl => {}
                    X86InlineAsmReg::ch => {}
                    X86InlineAsmReg::dl => {}
                    X86InlineAsmReg::dh => {}
                    X86InlineAsmReg::sil => {}
                    X86InlineAsmReg::dil => {}
                    X86InlineAsmReg::r8b => {}
                    X86InlineAsmReg::r9b => {}
                    X86InlineAsmReg::r10b => {}
                    X86InlineAsmReg::r11b => {}
                    X86InlineAsmReg::r12b => {}
                    X86InlineAsmReg::r13b => {}
                    X86InlineAsmReg::r14b => {}
                    X86InlineAsmReg::r15b => {}
                    X86InlineAsmReg::xmm0 => {}
                    X86InlineAsmReg::xmm1 => {}
                    X86InlineAsmReg::xmm2 => {}
                    X86InlineAsmReg::xmm3 => {}
                    X86InlineAsmReg::xmm4 => {}
                    X86InlineAsmReg::xmm5 => {}
                    X86InlineAsmReg::xmm6 => {}
                    X86InlineAsmReg::xmm7 => {}
                    X86InlineAsmReg::xmm8 => {}
                    X86InlineAsmReg::xmm9 => {}
                    X86InlineAsmReg::xmm10 => {}
                    X86InlineAsmReg::xmm11 => {}
                    X86InlineAsmReg::xmm12 => {}
                    X86InlineAsmReg::xmm13 => {}
                    X86InlineAsmReg::xmm14 => {}
                    X86InlineAsmReg::xmm15 => {}
                    X86InlineAsmReg::ymm0 => {}
                    X86InlineAsmReg::ymm1 => {}
                    X86InlineAsmReg::ymm2 => {}
                    X86InlineAsmReg::ymm3 => {}
                    X86InlineAsmReg::ymm4 => {}
                    X86InlineAsmReg::ymm5 => {}
                    X86InlineAsmReg::ymm6 => {}
                    X86InlineAsmReg::ymm7 => {}
                    X86InlineAsmReg::ymm8 => {}
                    X86InlineAsmReg::ymm9 => {}
                    X86InlineAsmReg::ymm10 => {}
                    X86InlineAsmReg::ymm11 => {}
                    X86InlineAsmReg::ymm12 => {}
                    X86InlineAsmReg::ymm13 => {}
                    X86InlineAsmReg::ymm14 => {}
                    X86InlineAsmReg::ymm15 => {}
                    X86InlineAsmReg::zmm0 => {}
                    X86InlineAsmReg::zmm1 => {}
                    X86InlineAsmReg::zmm2 => {}
                    X86InlineAsmReg::zmm3 => {}
                    X86InlineAsmReg::zmm4 => {}
                    X86InlineAsmReg::zmm5 => {}
                    X86InlineAsmReg::zmm6 => {}
                    X86InlineAsmReg::zmm7 => {}
                    X86InlineAsmReg::zmm8 => {}
                    X86InlineAsmReg::zmm9 => {}
                    X86InlineAsmReg::zmm10 => {}
                    X86InlineAsmReg::zmm11 => {}
                    X86InlineAsmReg::zmm12 => {}
                    X86InlineAsmReg::zmm13 => {}
                    X86InlineAsmReg::zmm14 => {}
                    X86InlineAsmReg::zmm15 => {}
                    X86InlineAsmReg::zmm16 => {}
                    X86InlineAsmReg::zmm17 => {}
                    X86InlineAsmReg::zmm18 => {}
                    X86InlineAsmReg::zmm19 => {}
                    X86InlineAsmReg::zmm20 => {}
                    X86InlineAsmReg::zmm21 => {}
                    X86InlineAsmReg::zmm22 => {}
                    X86InlineAsmReg::zmm23 => {}
                    X86InlineAsmReg::zmm24 => {}
                    X86InlineAsmReg::zmm25 => {}
                    X86InlineAsmReg::zmm26 => {}
                    X86InlineAsmReg::zmm27 => {}
                    X86InlineAsmReg::zmm28 => {}
                    X86InlineAsmReg::zmm29 => {}
                    X86InlineAsmReg::zmm30 => {}
                    X86InlineAsmReg::zmm31 => {}
                    X86InlineAsmReg::k0 => {}
                    X86InlineAsmReg::k1 => {}
                    X86InlineAsmReg::k2 => {}
                    X86InlineAsmReg::k3 => {}
                    X86InlineAsmReg::k4 => {}
                    X86InlineAsmReg::k5 => {}
                    X86InlineAsmReg::k6 => {}
                    X86InlineAsmReg::k7 => {}
                    X86InlineAsmReg::mm0 => {}
                    X86InlineAsmReg::mm1 => {}
                    X86InlineAsmReg::mm2 => {}
                    X86InlineAsmReg::mm3 => {}
                    X86InlineAsmReg::mm4 => {}
                    X86InlineAsmReg::mm5 => {}
                    X86InlineAsmReg::mm6 => {}
                    X86InlineAsmReg::mm7 => {}
                    X86InlineAsmReg::st0 => {}
                    X86InlineAsmReg::st1 => {}
                    X86InlineAsmReg::st2 => {}
                    X86InlineAsmReg::st3 => {}
                    X86InlineAsmReg::st4 => {}
                    X86InlineAsmReg::st5 => {}
                    X86InlineAsmReg::st6 => {}
                    X86InlineAsmReg::st7 => {}
                    X86InlineAsmReg::tmm0 => {}
                    X86InlineAsmReg::tmm1 => {}
                    X86InlineAsmReg::tmm2 => {}
                    X86InlineAsmReg::tmm3 => {}
                    X86InlineAsmReg::tmm4 => {}
                    X86InlineAsmReg::tmm5 => {}
                    X86InlineAsmReg::tmm6 => {}
                    X86InlineAsmReg::tmm7 => {}
                }
            }
        }
    };
const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for X86InlineAsmReg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { X86InlineAsmReg::ax }
                    1usize => { X86InlineAsmReg::bx }
                    2usize => { X86InlineAsmReg::cx }
                    3usize => { X86InlineAsmReg::dx }
                    4usize => { X86InlineAsmReg::si }
                    5usize => { X86InlineAsmReg::di }
                    6usize => { X86InlineAsmReg::r8 }
                    7usize => { X86InlineAsmReg::r9 }
                    8usize => { X86InlineAsmReg::r10 }
                    9usize => { X86InlineAsmReg::r11 }
                    10usize => { X86InlineAsmReg::r12 }
                    11usize => { X86InlineAsmReg::r13 }
                    12usize => { X86InlineAsmReg::r14 }
                    13usize => { X86InlineAsmReg::r15 }
                    14usize => { X86InlineAsmReg::al }
                    15usize => { X86InlineAsmReg::ah }
                    16usize => { X86InlineAsmReg::bl }
                    17usize => { X86InlineAsmReg::bh }
                    18usize => { X86InlineAsmReg::cl }
                    19usize => { X86InlineAsmReg::ch }
                    20usize => { X86InlineAsmReg::dl }
                    21usize => { X86InlineAsmReg::dh }
                    22usize => { X86InlineAsmReg::sil }
                    23usize => { X86InlineAsmReg::dil }
                    24usize => { X86InlineAsmReg::r8b }
                    25usize => { X86InlineAsmReg::r9b }
                    26usize => { X86InlineAsmReg::r10b }
                    27usize => { X86InlineAsmReg::r11b }
                    28usize => { X86InlineAsmReg::r12b }
                    29usize => { X86InlineAsmReg::r13b }
                    30usize => { X86InlineAsmReg::r14b }
                    31usize => { X86InlineAsmReg::r15b }
                    32usize => { X86InlineAsmReg::xmm0 }
                    33usize => { X86InlineAsmReg::xmm1 }
                    34usize => { X86InlineAsmReg::xmm2 }
                    35usize => { X86InlineAsmReg::xmm3 }
                    36usize => { X86InlineAsmReg::xmm4 }
                    37usize => { X86InlineAsmReg::xmm5 }
                    38usize => { X86InlineAsmReg::xmm6 }
                    39usize => { X86InlineAsmReg::xmm7 }
                    40usize => { X86InlineAsmReg::xmm8 }
                    41usize => { X86InlineAsmReg::xmm9 }
                    42usize => { X86InlineAsmReg::xmm10 }
                    43usize => { X86InlineAsmReg::xmm11 }
                    44usize => { X86InlineAsmReg::xmm12 }
                    45usize => { X86InlineAsmReg::xmm13 }
                    46usize => { X86InlineAsmReg::xmm14 }
                    47usize => { X86InlineAsmReg::xmm15 }
                    48usize => { X86InlineAsmReg::ymm0 }
                    49usize => { X86InlineAsmReg::ymm1 }
                    50usize => { X86InlineAsmReg::ymm2 }
                    51usize => { X86InlineAsmReg::ymm3 }
                    52usize => { X86InlineAsmReg::ymm4 }
                    53usize => { X86InlineAsmReg::ymm5 }
                    54usize => { X86InlineAsmReg::ymm6 }
                    55usize => { X86InlineAsmReg::ymm7 }
                    56usize => { X86InlineAsmReg::ymm8 }
                    57usize => { X86InlineAsmReg::ymm9 }
                    58usize => { X86InlineAsmReg::ymm10 }
                    59usize => { X86InlineAsmReg::ymm11 }
                    60usize => { X86InlineAsmReg::ymm12 }
                    61usize => { X86InlineAsmReg::ymm13 }
                    62usize => { X86InlineAsmReg::ymm14 }
                    63usize => { X86InlineAsmReg::ymm15 }
                    64usize => { X86InlineAsmReg::zmm0 }
                    65usize => { X86InlineAsmReg::zmm1 }
                    66usize => { X86InlineAsmReg::zmm2 }
                    67usize => { X86InlineAsmReg::zmm3 }
                    68usize => { X86InlineAsmReg::zmm4 }
                    69usize => { X86InlineAsmReg::zmm5 }
                    70usize => { X86InlineAsmReg::zmm6 }
                    71usize => { X86InlineAsmReg::zmm7 }
                    72usize => { X86InlineAsmReg::zmm8 }
                    73usize => { X86InlineAsmReg::zmm9 }
                    74usize => { X86InlineAsmReg::zmm10 }
                    75usize => { X86InlineAsmReg::zmm11 }
                    76usize => { X86InlineAsmReg::zmm12 }
                    77usize => { X86InlineAsmReg::zmm13 }
                    78usize => { X86InlineAsmReg::zmm14 }
                    79usize => { X86InlineAsmReg::zmm15 }
                    80usize => { X86InlineAsmReg::zmm16 }
                    81usize => { X86InlineAsmReg::zmm17 }
                    82usize => { X86InlineAsmReg::zmm18 }
                    83usize => { X86InlineAsmReg::zmm19 }
                    84usize => { X86InlineAsmReg::zmm20 }
                    85usize => { X86InlineAsmReg::zmm21 }
                    86usize => { X86InlineAsmReg::zmm22 }
                    87usize => { X86InlineAsmReg::zmm23 }
                    88usize => { X86InlineAsmReg::zmm24 }
                    89usize => { X86InlineAsmReg::zmm25 }
                    90usize => { X86InlineAsmReg::zmm26 }
                    91usize => { X86InlineAsmReg::zmm27 }
                    92usize => { X86InlineAsmReg::zmm28 }
                    93usize => { X86InlineAsmReg::zmm29 }
                    94usize => { X86InlineAsmReg::zmm30 }
                    95usize => { X86InlineAsmReg::zmm31 }
                    96usize => { X86InlineAsmReg::k0 }
                    97usize => { X86InlineAsmReg::k1 }
                    98usize => { X86InlineAsmReg::k2 }
                    99usize => { X86InlineAsmReg::k3 }
                    100usize => { X86InlineAsmReg::k4 }
                    101usize => { X86InlineAsmReg::k5 }
                    102usize => { X86InlineAsmReg::k6 }
                    103usize => { X86InlineAsmReg::k7 }
                    104usize => { X86InlineAsmReg::mm0 }
                    105usize => { X86InlineAsmReg::mm1 }
                    106usize => { X86InlineAsmReg::mm2 }
                    107usize => { X86InlineAsmReg::mm3 }
                    108usize => { X86InlineAsmReg::mm4 }
                    109usize => { X86InlineAsmReg::mm5 }
                    110usize => { X86InlineAsmReg::mm6 }
                    111usize => { X86InlineAsmReg::mm7 }
                    112usize => { X86InlineAsmReg::st0 }
                    113usize => { X86InlineAsmReg::st1 }
                    114usize => { X86InlineAsmReg::st2 }
                    115usize => { X86InlineAsmReg::st3 }
                    116usize => { X86InlineAsmReg::st4 }
                    117usize => { X86InlineAsmReg::st5 }
                    118usize => { X86InlineAsmReg::st6 }
                    119usize => { X86InlineAsmReg::st7 }
                    120usize => { X86InlineAsmReg::tmm0 }
                    121usize => { X86InlineAsmReg::tmm1 }
                    122usize => { X86InlineAsmReg::tmm2 }
                    123usize => { X86InlineAsmReg::tmm3 }
                    124usize => { X86InlineAsmReg::tmm4 }
                    125usize => { X86InlineAsmReg::tmm5 }
                    126usize => { X86InlineAsmReg::tmm6 }
                    127usize => { X86InlineAsmReg::tmm7 }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `X86InlineAsmReg`, expected 0..128, actual {0}",
                                n));
                    }
                }
            }
        }
    };
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for X86InlineAsmReg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                X86InlineAsmReg::ax => "ax",
                X86InlineAsmReg::bx => "bx",
                X86InlineAsmReg::cx => "cx",
                X86InlineAsmReg::dx => "dx",
                X86InlineAsmReg::si => "si",
                X86InlineAsmReg::di => "di",
                X86InlineAsmReg::r8 => "r8",
                X86InlineAsmReg::r9 => "r9",
                X86InlineAsmReg::r10 => "r10",
                X86InlineAsmReg::r11 => "r11",
                X86InlineAsmReg::r12 => "r12",
                X86InlineAsmReg::r13 => "r13",
                X86InlineAsmReg::r14 => "r14",
                X86InlineAsmReg::r15 => "r15",
                X86InlineAsmReg::al => "al",
                X86InlineAsmReg::ah => "ah",
                X86InlineAsmReg::bl => "bl",
                X86InlineAsmReg::bh => "bh",
                X86InlineAsmReg::cl => "cl",
                X86InlineAsmReg::ch => "ch",
                X86InlineAsmReg::dl => "dl",
                X86InlineAsmReg::dh => "dh",
                X86InlineAsmReg::sil => "sil",
                X86InlineAsmReg::dil => "dil",
                X86InlineAsmReg::r8b => "r8b",
                X86InlineAsmReg::r9b => "r9b",
                X86InlineAsmReg::r10b => "r10b",
                X86InlineAsmReg::r11b => "r11b",
                X86InlineAsmReg::r12b => "r12b",
                X86InlineAsmReg::r13b => "r13b",
                X86InlineAsmReg::r14b => "r14b",
                X86InlineAsmReg::r15b => "r15b",
                X86InlineAsmReg::xmm0 => "xmm0",
                X86InlineAsmReg::xmm1 => "xmm1",
                X86InlineAsmReg::xmm2 => "xmm2",
                X86InlineAsmReg::xmm3 => "xmm3",
                X86InlineAsmReg::xmm4 => "xmm4",
                X86InlineAsmReg::xmm5 => "xmm5",
                X86InlineAsmReg::xmm6 => "xmm6",
                X86InlineAsmReg::xmm7 => "xmm7",
                X86InlineAsmReg::xmm8 => "xmm8",
                X86InlineAsmReg::xmm9 => "xmm9",
                X86InlineAsmReg::xmm10 => "xmm10",
                X86InlineAsmReg::xmm11 => "xmm11",
                X86InlineAsmReg::xmm12 => "xmm12",
                X86InlineAsmReg::xmm13 => "xmm13",
                X86InlineAsmReg::xmm14 => "xmm14",
                X86InlineAsmReg::xmm15 => "xmm15",
                X86InlineAsmReg::ymm0 => "ymm0",
                X86InlineAsmReg::ymm1 => "ymm1",
                X86InlineAsmReg::ymm2 => "ymm2",
                X86InlineAsmReg::ymm3 => "ymm3",
                X86InlineAsmReg::ymm4 => "ymm4",
                X86InlineAsmReg::ymm5 => "ymm5",
                X86InlineAsmReg::ymm6 => "ymm6",
                X86InlineAsmReg::ymm7 => "ymm7",
                X86InlineAsmReg::ymm8 => "ymm8",
                X86InlineAsmReg::ymm9 => "ymm9",
                X86InlineAsmReg::ymm10 => "ymm10",
                X86InlineAsmReg::ymm11 => "ymm11",
                X86InlineAsmReg::ymm12 => "ymm12",
                X86InlineAsmReg::ymm13 => "ymm13",
                X86InlineAsmReg::ymm14 => "ymm14",
                X86InlineAsmReg::ymm15 => "ymm15",
                X86InlineAsmReg::zmm0 => "zmm0",
                X86InlineAsmReg::zmm1 => "zmm1",
                X86InlineAsmReg::zmm2 => "zmm2",
                X86InlineAsmReg::zmm3 => "zmm3",
                X86InlineAsmReg::zmm4 => "zmm4",
                X86InlineAsmReg::zmm5 => "zmm5",
                X86InlineAsmReg::zmm6 => "zmm6",
                X86InlineAsmReg::zmm7 => "zmm7",
                X86InlineAsmReg::zmm8 => "zmm8",
                X86InlineAsmReg::zmm9 => "zmm9",
                X86InlineAsmReg::zmm10 => "zmm10",
                X86InlineAsmReg::zmm11 => "zmm11",
                X86InlineAsmReg::zmm12 => "zmm12",
                X86InlineAsmReg::zmm13 => "zmm13",
                X86InlineAsmReg::zmm14 => "zmm14",
                X86InlineAsmReg::zmm15 => "zmm15",
                X86InlineAsmReg::zmm16 => "zmm16",
                X86InlineAsmReg::zmm17 => "zmm17",
                X86InlineAsmReg::zmm18 => "zmm18",
                X86InlineAsmReg::zmm19 => "zmm19",
                X86InlineAsmReg::zmm20 => "zmm20",
                X86InlineAsmReg::zmm21 => "zmm21",
                X86InlineAsmReg::zmm22 => "zmm22",
                X86InlineAsmReg::zmm23 => "zmm23",
                X86InlineAsmReg::zmm24 => "zmm24",
                X86InlineAsmReg::zmm25 => "zmm25",
                X86InlineAsmReg::zmm26 => "zmm26",
                X86InlineAsmReg::zmm27 => "zmm27",
                X86InlineAsmReg::zmm28 => "zmm28",
                X86InlineAsmReg::zmm29 => "zmm29",
                X86InlineAsmReg::zmm30 => "zmm30",
                X86InlineAsmReg::zmm31 => "zmm31",
                X86InlineAsmReg::k0 => "k0",
                X86InlineAsmReg::k1 => "k1",
                X86InlineAsmReg::k2 => "k2",
                X86InlineAsmReg::k3 => "k3",
                X86InlineAsmReg::k4 => "k4",
                X86InlineAsmReg::k5 => "k5",
                X86InlineAsmReg::k6 => "k6",
                X86InlineAsmReg::k7 => "k7",
                X86InlineAsmReg::mm0 => "mm0",
                X86InlineAsmReg::mm1 => "mm1",
                X86InlineAsmReg::mm2 => "mm2",
                X86InlineAsmReg::mm3 => "mm3",
                X86InlineAsmReg::mm4 => "mm4",
                X86InlineAsmReg::mm5 => "mm5",
                X86InlineAsmReg::mm6 => "mm6",
                X86InlineAsmReg::mm7 => "mm7",
                X86InlineAsmReg::st0 => "st0",
                X86InlineAsmReg::st1 => "st1",
                X86InlineAsmReg::st2 => "st2",
                X86InlineAsmReg::st3 => "st3",
                X86InlineAsmReg::st4 => "st4",
                X86InlineAsmReg::st5 => "st5",
                X86InlineAsmReg::st6 => "st6",
                X86InlineAsmReg::st7 => "st7",
                X86InlineAsmReg::tmm0 => "tmm0",
                X86InlineAsmReg::tmm1 => "tmm1",
                X86InlineAsmReg::tmm2 => "tmm2",
                X86InlineAsmReg::tmm3 => "tmm3",
                X86InlineAsmReg::tmm4 => "tmm4",
                X86InlineAsmReg::tmm5 => "tmm5",
                X86InlineAsmReg::tmm6 => "tmm6",
                X86InlineAsmReg::tmm7 => "tmm7",
            })
    }
}
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for X86InlineAsmReg {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {}
}
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for X86InlineAsmReg { }
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for X86InlineAsmReg {
    #[inline]
    fn eq(&self, other: &X86InlineAsmReg) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialOrd for X86InlineAsmReg {
    #[inline]
    fn partial_cmp(&self, other: &X86InlineAsmReg)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}
#[automatically_derived]
#[allow(unreachable_code)]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for X86InlineAsmReg {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}
const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for X86InlineAsmReg where __CTX: crate::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    X86InlineAsmReg::ax => {}
                    X86InlineAsmReg::bx => {}
                    X86InlineAsmReg::cx => {}
                    X86InlineAsmReg::dx => {}
                    X86InlineAsmReg::si => {}
                    X86InlineAsmReg::di => {}
                    X86InlineAsmReg::r8 => {}
                    X86InlineAsmReg::r9 => {}
                    X86InlineAsmReg::r10 => {}
                    X86InlineAsmReg::r11 => {}
                    X86InlineAsmReg::r12 => {}
                    X86InlineAsmReg::r13 => {}
                    X86InlineAsmReg::r14 => {}
                    X86InlineAsmReg::r15 => {}
                    X86InlineAsmReg::al => {}
                    X86InlineAsmReg::ah => {}
                    X86InlineAsmReg::bl => {}
                    X86InlineAsmReg::bh => {}
                    X86InlineAsmReg::cl => {}
                    X86InlineAsmReg::ch => {}
                    X86InlineAsmReg::dl => {}
                    X86InlineAsmReg::dh => {}
                    X86InlineAsmReg::sil => {}
                    X86InlineAsmReg::dil => {}
                    X86InlineAsmReg::r8b => {}
                    X86InlineAsmReg::r9b => {}
                    X86InlineAsmReg::r10b => {}
                    X86InlineAsmReg::r11b => {}
                    X86InlineAsmReg::r12b => {}
                    X86InlineAsmReg::r13b => {}
                    X86InlineAsmReg::r14b => {}
                    X86InlineAsmReg::r15b => {}
                    X86InlineAsmReg::xmm0 => {}
                    X86InlineAsmReg::xmm1 => {}
                    X86InlineAsmReg::xmm2 => {}
                    X86InlineAsmReg::xmm3 => {}
                    X86InlineAsmReg::xmm4 => {}
                    X86InlineAsmReg::xmm5 => {}
                    X86InlineAsmReg::xmm6 => {}
                    X86InlineAsmReg::xmm7 => {}
                    X86InlineAsmReg::xmm8 => {}
                    X86InlineAsmReg::xmm9 => {}
                    X86InlineAsmReg::xmm10 => {}
                    X86InlineAsmReg::xmm11 => {}
                    X86InlineAsmReg::xmm12 => {}
                    X86InlineAsmReg::xmm13 => {}
                    X86InlineAsmReg::xmm14 => {}
                    X86InlineAsmReg::xmm15 => {}
                    X86InlineAsmReg::ymm0 => {}
                    X86InlineAsmReg::ymm1 => {}
                    X86InlineAsmReg::ymm2 => {}
                    X86InlineAsmReg::ymm3 => {}
                    X86InlineAsmReg::ymm4 => {}
                    X86InlineAsmReg::ymm5 => {}
                    X86InlineAsmReg::ymm6 => {}
                    X86InlineAsmReg::ymm7 => {}
                    X86InlineAsmReg::ymm8 => {}
                    X86InlineAsmReg::ymm9 => {}
                    X86InlineAsmReg::ymm10 => {}
                    X86InlineAsmReg::ymm11 => {}
                    X86InlineAsmReg::ymm12 => {}
                    X86InlineAsmReg::ymm13 => {}
                    X86InlineAsmReg::ymm14 => {}
                    X86InlineAsmReg::ymm15 => {}
                    X86InlineAsmReg::zmm0 => {}
                    X86InlineAsmReg::zmm1 => {}
                    X86InlineAsmReg::zmm2 => {}
                    X86InlineAsmReg::zmm3 => {}
                    X86InlineAsmReg::zmm4 => {}
                    X86InlineAsmReg::zmm5 => {}
                    X86InlineAsmReg::zmm6 => {}
                    X86InlineAsmReg::zmm7 => {}
                    X86InlineAsmReg::zmm8 => {}
                    X86InlineAsmReg::zmm9 => {}
                    X86InlineAsmReg::zmm10 => {}
                    X86InlineAsmReg::zmm11 => {}
                    X86InlineAsmReg::zmm12 => {}
                    X86InlineAsmReg::zmm13 => {}
                    X86InlineAsmReg::zmm14 => {}
                    X86InlineAsmReg::zmm15 => {}
                    X86InlineAsmReg::zmm16 => {}
                    X86InlineAsmReg::zmm17 => {}
                    X86InlineAsmReg::zmm18 => {}
                    X86InlineAsmReg::zmm19 => {}
                    X86InlineAsmReg::zmm20 => {}
                    X86InlineAsmReg::zmm21 => {}
                    X86InlineAsmReg::zmm22 => {}
                    X86InlineAsmReg::zmm23 => {}
                    X86InlineAsmReg::zmm24 => {}
                    X86InlineAsmReg::zmm25 => {}
                    X86InlineAsmReg::zmm26 => {}
                    X86InlineAsmReg::zmm27 => {}
                    X86InlineAsmReg::zmm28 => {}
                    X86InlineAsmReg::zmm29 => {}
                    X86InlineAsmReg::zmm30 => {}
                    X86InlineAsmReg::zmm31 => {}
                    X86InlineAsmReg::k0 => {}
                    X86InlineAsmReg::k1 => {}
                    X86InlineAsmReg::k2 => {}
                    X86InlineAsmReg::k3 => {}
                    X86InlineAsmReg::k4 => {}
                    X86InlineAsmReg::k5 => {}
                    X86InlineAsmReg::k6 => {}
                    X86InlineAsmReg::k7 => {}
                    X86InlineAsmReg::mm0 => {}
                    X86InlineAsmReg::mm1 => {}
                    X86InlineAsmReg::mm2 => {}
                    X86InlineAsmReg::mm3 => {}
                    X86InlineAsmReg::mm4 => {}
                    X86InlineAsmReg::mm5 => {}
                    X86InlineAsmReg::mm6 => {}
                    X86InlineAsmReg::mm7 => {}
                    X86InlineAsmReg::st0 => {}
                    X86InlineAsmReg::st1 => {}
                    X86InlineAsmReg::st2 => {}
                    X86InlineAsmReg::st3 => {}
                    X86InlineAsmReg::st4 => {}
                    X86InlineAsmReg::st5 => {}
                    X86InlineAsmReg::st6 => {}
                    X86InlineAsmReg::st7 => {}
                    X86InlineAsmReg::tmm0 => {}
                    X86InlineAsmReg::tmm1 => {}
                    X86InlineAsmReg::tmm2 => {}
                    X86InlineAsmReg::tmm3 => {}
                    X86InlineAsmReg::tmm4 => {}
                    X86InlineAsmReg::tmm5 => {}
                    X86InlineAsmReg::tmm6 => {}
                    X86InlineAsmReg::tmm7 => {}
                }
            }
        }
    };
impl X86InlineAsmReg {
    pub fn name(self) -> &'static str {
        match self {
            Self::ax => "ax",
            Self::bx => "bx",
            Self::cx => "cx",
            Self::dx => "dx",
            Self::si => "si",
            Self::di => "di",
            Self::r8 => "r8",
            Self::r9 => "r9",
            Self::r10 => "r10",
            Self::r11 => "r11",
            Self::r12 => "r12",
            Self::r13 => "r13",
            Self::r14 => "r14",
            Self::r15 => "r15",
            Self::al => "al",
            Self::ah => "ah",
            Self::bl => "bl",
            Self::bh => "bh",
            Self::cl => "cl",
            Self::ch => "ch",
            Self::dl => "dl",
            Self::dh => "dh",
            Self::sil => "sil",
            Self::dil => "dil",
            Self::r8b => "r8b",
            Self::r9b => "r9b",
            Self::r10b => "r10b",
            Self::r11b => "r11b",
            Self::r12b => "r12b",
            Self::r13b => "r13b",
            Self::r14b => "r14b",
            Self::r15b => "r15b",
            Self::xmm0 => "xmm0",
            Self::xmm1 => "xmm1",
            Self::xmm2 => "xmm2",
            Self::xmm3 => "xmm3",
            Self::xmm4 => "xmm4",
            Self::xmm5 => "xmm5",
            Self::xmm6 => "xmm6",
            Self::xmm7 => "xmm7",
            Self::xmm8 => "xmm8",
            Self::xmm9 => "xmm9",
            Self::xmm10 => "xmm10",
            Self::xmm11 => "xmm11",
            Self::xmm12 => "xmm12",
            Self::xmm13 => "xmm13",
            Self::xmm14 => "xmm14",
            Self::xmm15 => "xmm15",
            Self::ymm0 => "ymm0",
            Self::ymm1 => "ymm1",
            Self::ymm2 => "ymm2",
            Self::ymm3 => "ymm3",
            Self::ymm4 => "ymm4",
            Self::ymm5 => "ymm5",
            Self::ymm6 => "ymm6",
            Self::ymm7 => "ymm7",
            Self::ymm8 => "ymm8",
            Self::ymm9 => "ymm9",
            Self::ymm10 => "ymm10",
            Self::ymm11 => "ymm11",
            Self::ymm12 => "ymm12",
            Self::ymm13 => "ymm13",
            Self::ymm14 => "ymm14",
            Self::ymm15 => "ymm15",
            Self::zmm0 => "zmm0",
            Self::zmm1 => "zmm1",
            Self::zmm2 => "zmm2",
            Self::zmm3 => "zmm3",
            Self::zmm4 => "zmm4",
            Self::zmm5 => "zmm5",
            Self::zmm6 => "zmm6",
            Self::zmm7 => "zmm7",
            Self::zmm8 => "zmm8",
            Self::zmm9 => "zmm9",
            Self::zmm10 => "zmm10",
            Self::zmm11 => "zmm11",
            Self::zmm12 => "zmm12",
            Self::zmm13 => "zmm13",
            Self::zmm14 => "zmm14",
            Self::zmm15 => "zmm15",
            Self::zmm16 => "zmm16",
            Self::zmm17 => "zmm17",
            Self::zmm18 => "zmm18",
            Self::zmm19 => "zmm19",
            Self::zmm20 => "zmm20",
            Self::zmm21 => "zmm21",
            Self::zmm22 => "zmm22",
            Self::zmm23 => "zmm23",
            Self::zmm24 => "zmm24",
            Self::zmm25 => "zmm25",
            Self::zmm26 => "zmm26",
            Self::zmm27 => "zmm27",
            Self::zmm28 => "zmm28",
            Self::zmm29 => "zmm29",
            Self::zmm30 => "zmm30",
            Self::zmm31 => "zmm31",
            Self::k0 => "k0",
            Self::k1 => "k1",
            Self::k2 => "k2",
            Self::k3 => "k3",
            Self::k4 => "k4",
            Self::k5 => "k5",
            Self::k6 => "k6",
            Self::k7 => "k7",
            Self::mm0 => "mm0",
            Self::mm1 => "mm1",
            Self::mm2 => "mm2",
            Self::mm3 => "mm3",
            Self::mm4 => "mm4",
            Self::mm5 => "mm5",
            Self::mm6 => "mm6",
            Self::mm7 => "mm7",
            Self::st0 => "st(0)",
            Self::st1 => "st(1)",
            Self::st2 => "st(2)",
            Self::st3 => "st(3)",
            Self::st4 => "st(4)",
            Self::st5 => "st(5)",
            Self::st6 => "st(6)",
            Self::st7 => "st(7)",
            Self::tmm0 => "tmm0",
            Self::tmm1 => "tmm1",
            Self::tmm2 => "tmm2",
            Self::tmm3 => "tmm3",
            Self::tmm4 => "tmm4",
            Self::tmm5 => "tmm5",
            Self::tmm6 => "tmm6",
            Self::tmm7 => "tmm7",
        }
    }
    pub fn reg_class(self) -> X86InlineAsmRegClass {
        match self {
            Self::ax => X86InlineAsmRegClass::reg,
            Self::bx => X86InlineAsmRegClass::reg,
            Self::cx => X86InlineAsmRegClass::reg,
            Self::dx => X86InlineAsmRegClass::reg,
            Self::si => X86InlineAsmRegClass::reg,
            Self::di => X86InlineAsmRegClass::reg,
            Self::r8 => X86InlineAsmRegClass::reg,
            Self::r9 => X86InlineAsmRegClass::reg,
            Self::r10 => X86InlineAsmRegClass::reg,
            Self::r11 => X86InlineAsmRegClass::reg,
            Self::r12 => X86InlineAsmRegClass::reg,
            Self::r13 => X86InlineAsmRegClass::reg,
            Self::r14 => X86InlineAsmRegClass::reg,
            Self::r15 => X86InlineAsmRegClass::reg,
            Self::al => X86InlineAsmRegClass::reg_byte,
            Self::ah => X86InlineAsmRegClass::reg_byte,
            Self::bl => X86InlineAsmRegClass::reg_byte,
            Self::bh => X86InlineAsmRegClass::reg_byte,
            Self::cl => X86InlineAsmRegClass::reg_byte,
            Self::ch => X86InlineAsmRegClass::reg_byte,
            Self::dl => X86InlineAsmRegClass::reg_byte,
            Self::dh => X86InlineAsmRegClass::reg_byte,
            Self::sil => X86InlineAsmRegClass::reg_byte,
            Self::dil => X86InlineAsmRegClass::reg_byte,
            Self::r8b => X86InlineAsmRegClass::reg_byte,
            Self::r9b => X86InlineAsmRegClass::reg_byte,
            Self::r10b => X86InlineAsmRegClass::reg_byte,
            Self::r11b => X86InlineAsmRegClass::reg_byte,
            Self::r12b => X86InlineAsmRegClass::reg_byte,
            Self::r13b => X86InlineAsmRegClass::reg_byte,
            Self::r14b => X86InlineAsmRegClass::reg_byte,
            Self::r15b => X86InlineAsmRegClass::reg_byte,
            Self::xmm0 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm1 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm2 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm3 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm4 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm5 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm6 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm7 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm8 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm9 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm10 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm11 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm12 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm13 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm14 => X86InlineAsmRegClass::xmm_reg,
            Self::xmm15 => X86InlineAsmRegClass::xmm_reg,
            Self::ymm0 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm1 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm2 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm3 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm4 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm5 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm6 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm7 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm8 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm9 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm10 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm11 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm12 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm13 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm14 => X86InlineAsmRegClass::ymm_reg,
            Self::ymm15 => X86InlineAsmRegClass::ymm_reg,
            Self::zmm0 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm1 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm2 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm3 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm4 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm5 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm6 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm7 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm8 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm9 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm10 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm11 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm12 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm13 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm14 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm15 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm16 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm17 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm18 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm19 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm20 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm21 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm22 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm23 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm24 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm25 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm26 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm27 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm28 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm29 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm30 => X86InlineAsmRegClass::zmm_reg,
            Self::zmm31 => X86InlineAsmRegClass::zmm_reg,
            Self::k0 => X86InlineAsmRegClass::kreg0,
            Self::k1 => X86InlineAsmRegClass::kreg,
            Self::k2 => X86InlineAsmRegClass::kreg,
            Self::k3 => X86InlineAsmRegClass::kreg,
            Self::k4 => X86InlineAsmRegClass::kreg,
            Self::k5 => X86InlineAsmRegClass::kreg,
            Self::k6 => X86InlineAsmRegClass::kreg,
            Self::k7 => X86InlineAsmRegClass::kreg,
            Self::mm0 => X86InlineAsmRegClass::mmx_reg,
            Self::mm1 => X86InlineAsmRegClass::mmx_reg,
            Self::mm2 => X86InlineAsmRegClass::mmx_reg,
            Self::mm3 => X86InlineAsmRegClass::mmx_reg,
            Self::mm4 => X86InlineAsmRegClass::mmx_reg,
            Self::mm5 => X86InlineAsmRegClass::mmx_reg,
            Self::mm6 => X86InlineAsmRegClass::mmx_reg,
            Self::mm7 => X86InlineAsmRegClass::mmx_reg,
            Self::st0 => X86InlineAsmRegClass::x87_reg,
            Self::st1 => X86InlineAsmRegClass::x87_reg,
            Self::st2 => X86InlineAsmRegClass::x87_reg,
            Self::st3 => X86InlineAsmRegClass::x87_reg,
            Self::st4 => X86InlineAsmRegClass::x87_reg,
            Self::st5 => X86InlineAsmRegClass::x87_reg,
            Self::st6 => X86InlineAsmRegClass::x87_reg,
            Self::st7 => X86InlineAsmRegClass::x87_reg,
            Self::tmm0 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm1 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm2 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm3 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm4 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm5 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm6 => X86InlineAsmRegClass::tmm_reg,
            Self::tmm7 => X86InlineAsmRegClass::tmm_reg,
        }
    }
    pub fn parse(name: &str) -> Result<Self, &'static str> {
        match name {
            "eax" | "rax" | "ax" => Ok(Self::ax),
            "ebx" | "rbx" | "bx" => Ok(Self::bx),
            "ecx" | "rcx" | "cx" => Ok(Self::cx),
            "edx" | "rdx" | "dx" => Ok(Self::dx),
            "esi" | "rsi" | "si" => Ok(Self::si),
            "edi" | "rdi" | "di" => Ok(Self::di),
            "r8w" | "r8d" | "r8" => Ok(Self::r8),
            "r9w" | "r9d" | "r9" => Ok(Self::r9),
            "r10w" | "r10d" | "r10" => Ok(Self::r10),
            "r11w" | "r11d" | "r11" => Ok(Self::r11),
            "r12w" | "r12d" | "r12" => Ok(Self::r12),
            "r13w" | "r13d" | "r13" => Ok(Self::r13),
            "r14w" | "r14d" | "r14" => Ok(Self::r14),
            "r15w" | "r15d" | "r15" => Ok(Self::r15),
            "al" => Ok(Self::al),
            "ah" => Ok(Self::ah),
            "bl" => Ok(Self::bl),
            "bh" => Ok(Self::bh),
            "cl" => Ok(Self::cl),
            "ch" => Ok(Self::ch),
            "dl" => Ok(Self::dl),
            "dh" => Ok(Self::dh),
            "sil" => Ok(Self::sil),
            "dil" => Ok(Self::dil),
            "r8b" => Ok(Self::r8b),
            "r9b" => Ok(Self::r9b),
            "r10b" => Ok(Self::r10b),
            "r11b" => Ok(Self::r11b),
            "r12b" => Ok(Self::r12b),
            "r13b" => Ok(Self::r13b),
            "r14b" => Ok(Self::r14b),
            "r15b" => Ok(Self::r15b),
            "xmm0" => Ok(Self::xmm0),
            "xmm1" => Ok(Self::xmm1),
            "xmm2" => Ok(Self::xmm2),
            "xmm3" => Ok(Self::xmm3),
            "xmm4" => Ok(Self::xmm4),
            "xmm5" => Ok(Self::xmm5),
            "xmm6" => Ok(Self::xmm6),
            "xmm7" => Ok(Self::xmm7),
            "xmm8" => Ok(Self::xmm8),
            "xmm9" => Ok(Self::xmm9),
            "xmm10" => Ok(Self::xmm10),
            "xmm11" => Ok(Self::xmm11),
            "xmm12" => Ok(Self::xmm12),
            "xmm13" => Ok(Self::xmm13),
            "xmm14" => Ok(Self::xmm14),
            "xmm15" => Ok(Self::xmm15),
            "ymm0" => Ok(Self::ymm0),
            "ymm1" => Ok(Self::ymm1),
            "ymm2" => Ok(Self::ymm2),
            "ymm3" => Ok(Self::ymm3),
            "ymm4" => Ok(Self::ymm4),
            "ymm5" => Ok(Self::ymm5),
            "ymm6" => Ok(Self::ymm6),
            "ymm7" => Ok(Self::ymm7),
            "ymm8" => Ok(Self::ymm8),
            "ymm9" => Ok(Self::ymm9),
            "ymm10" => Ok(Self::ymm10),
            "ymm11" => Ok(Self::ymm11),
            "ymm12" => Ok(Self::ymm12),
            "ymm13" => Ok(Self::ymm13),
            "ymm14" => Ok(Self::ymm14),
            "ymm15" => Ok(Self::ymm15),
            "zmm0" => Ok(Self::zmm0),
            "zmm1" => Ok(Self::zmm1),
            "zmm2" => Ok(Self::zmm2),
            "zmm3" => Ok(Self::zmm3),
            "zmm4" => Ok(Self::zmm4),
            "zmm5" => Ok(Self::zmm5),
            "zmm6" => Ok(Self::zmm6),
            "zmm7" => Ok(Self::zmm7),
            "zmm8" => Ok(Self::zmm8),
            "zmm9" => Ok(Self::zmm9),
            "zmm10" => Ok(Self::zmm10),
            "zmm11" => Ok(Self::zmm11),
            "zmm12" => Ok(Self::zmm12),
            "zmm13" => Ok(Self::zmm13),
            "zmm14" => Ok(Self::zmm14),
            "zmm15" => Ok(Self::zmm15),
            "xmm16" | "ymm16" | "zmm16" => Ok(Self::zmm16),
            "xmm17" | "ymm17" | "zmm17" => Ok(Self::zmm17),
            "xmm18" | "ymm18" | "zmm18" => Ok(Self::zmm18),
            "xmm19" | "ymm19" | "zmm19" => Ok(Self::zmm19),
            "xmm20" | "ymm20" | "zmm20" => Ok(Self::zmm20),
            "xmm21" | "ymm21" | "zmm21" => Ok(Self::zmm21),
            "xmm22" | "ymm22" | "zmm22" => Ok(Self::zmm22),
            "xmm23" | "ymm23" | "zmm23" => Ok(Self::zmm23),
            "xmm24" | "ymm24" | "zmm24" => Ok(Self::zmm24),
            "xmm25" | "ymm25" | "zmm25" => Ok(Self::zmm25),
            "xmm26" | "ymm26" | "zmm26" => Ok(Self::zmm26),
            "xmm27" | "ymm27" | "zmm27" => Ok(Self::zmm27),
            "xmm28" | "ymm28" | "zmm28" => Ok(Self::zmm28),
            "xmm29" | "ymm29" | "zmm29" => Ok(Self::zmm29),
            "xmm30" | "ymm30" | "zmm30" => Ok(Self::zmm30),
            "xmm31" | "ymm31" | "zmm31" => Ok(Self::zmm31),
            "k0" => Ok(Self::k0),
            "k1" => Ok(Self::k1),
            "k2" => Ok(Self::k2),
            "k3" => Ok(Self::k3),
            "k4" => Ok(Self::k4),
            "k5" => Ok(Self::k5),
            "k6" => Ok(Self::k6),
            "k7" => Ok(Self::k7),
            "mm0" => Ok(Self::mm0),
            "mm1" => Ok(Self::mm1),
            "mm2" => Ok(Self::mm2),
            "mm3" => Ok(Self::mm3),
            "mm4" => Ok(Self::mm4),
            "mm5" => Ok(Self::mm5),
            "mm6" => Ok(Self::mm6),
            "mm7" => Ok(Self::mm7),
            "st" | "st(0)" => Ok(Self::st0),
            "st(1)" => Ok(Self::st1),
            "st(2)" => Ok(Self::st2),
            "st(3)" => Ok(Self::st3),
            "st(4)" => Ok(Self::st4),
            "st(5)" => Ok(Self::st5),
            "st(6)" => Ok(Self::st6),
            "st(7)" => Ok(Self::st7),
            "tmm0" => Ok(Self::tmm0),
            "tmm1" => Ok(Self::tmm1),
            "tmm2" => Ok(Self::tmm2),
            "tmm3" => Ok(Self::tmm3),
            "tmm4" => Ok(Self::tmm4),
            "tmm5" => Ok(Self::tmm5),
            "tmm6" => Ok(Self::tmm6),
            "tmm7" => Ok(Self::tmm7),
            "bp" | "bpl" | "ebp" | "rbp" =>
                Err("the frame pointer cannot be used as an operand for inline asm"),
            "sp" | "spl" | "esp" | "rsp" =>
                Err("the stack pointer cannot be used as an operand for inline asm"),
            "ip" | "eip" | "rip" =>
                Err("the instruction pointer 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::ax => { Ok(()) }
            Self::bx => {
                rbx_reserved(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::cx => { Ok(()) }
            Self::dx => { Ok(()) }
            Self::si => {
                esi_reserved(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::di => { Ok(()) }
            Self::r8 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r9 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r10 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r11 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r12 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r13 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r14 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r15 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::al => { Ok(()) }
            Self::ah => {
                high_byte(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::bl => { Ok(()) }
            Self::bh => {
                high_byte(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::cl => { Ok(()) }
            Self::ch => {
                high_byte(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::dl => { Ok(()) }
            Self::dh => {
                high_byte(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::sil => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::dil => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r8b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r9b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r10b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r11b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r12b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r13b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r14b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::r15b => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm0 => { Ok(()) }
            Self::xmm1 => { Ok(()) }
            Self::xmm2 => { Ok(()) }
            Self::xmm3 => { Ok(()) }
            Self::xmm4 => { Ok(()) }
            Self::xmm5 => { Ok(()) }
            Self::xmm6 => { Ok(()) }
            Self::xmm7 => { Ok(()) }
            Self::xmm8 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm9 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm10 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm11 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm12 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm13 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm14 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::xmm15 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm0 => { Ok(()) }
            Self::ymm1 => { Ok(()) }
            Self::ymm2 => { Ok(()) }
            Self::ymm3 => { Ok(()) }
            Self::ymm4 => { Ok(()) }
            Self::ymm5 => { Ok(()) }
            Self::ymm6 => { Ok(()) }
            Self::ymm7 => { Ok(()) }
            Self::ymm8 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm9 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm10 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm11 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm12 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm13 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm14 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::ymm15 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm0 => { Ok(()) }
            Self::zmm1 => { Ok(()) }
            Self::zmm2 => { Ok(()) }
            Self::zmm3 => { Ok(()) }
            Self::zmm4 => { Ok(()) }
            Self::zmm5 => { Ok(()) }
            Self::zmm6 => { Ok(()) }
            Self::zmm7 => { Ok(()) }
            Self::zmm8 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm9 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm10 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm11 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm12 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm13 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm14 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm15 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm16 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm17 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm18 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm19 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm20 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm21 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm22 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm23 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm24 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm25 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm26 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm27 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm28 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm29 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm30 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::zmm31 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::k0 => { Ok(()) }
            Self::k1 => { Ok(()) }
            Self::k2 => { Ok(()) }
            Self::k3 => { Ok(()) }
            Self::k4 => { Ok(()) }
            Self::k5 => { Ok(()) }
            Self::k6 => { Ok(()) }
            Self::k7 => { Ok(()) }
            Self::mm0 => { Ok(()) }
            Self::mm1 => { Ok(()) }
            Self::mm2 => { Ok(()) }
            Self::mm3 => { Ok(()) }
            Self::mm4 => { Ok(()) }
            Self::mm5 => { Ok(()) }
            Self::mm6 => { Ok(()) }
            Self::mm7 => { Ok(()) }
            Self::st0 => { Ok(()) }
            Self::st1 => { Ok(()) }
            Self::st2 => { Ok(()) }
            Self::st3 => { Ok(()) }
            Self::st4 => { Ok(()) }
            Self::st5 => { Ok(()) }
            Self::st6 => { Ok(()) }
            Self::st7 => { Ok(()) }
            Self::tmm0 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm1 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm2 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm3 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm4 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm5 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm6 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                Ok(())
            }
            Self::tmm7 => {
                x86_64_only(_arch, _reloc_model, _target_features, _target,
                        _is_clobber)?;
                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::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ax));
        }
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_abcd))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ax));
        }
    }
    if rbx_reserved(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::bx));
        }
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_abcd))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::bx));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::cx));
        }
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_abcd))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::cx));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::dx));
        }
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_abcd))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::dx));
        }
    }
    if esi_reserved(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::si));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::di));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r8));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r9));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r10));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r11));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r12));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r13));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r14));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::al));
        }
    }
    if high_byte(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ah));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::bl));
        }
    }
    if high_byte(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::bh));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::cl));
        }
    }
    if high_byte(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ch));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::dl));
        }
    }
    if high_byte(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::dh));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::sil));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::dil));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r8b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r9b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r10b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r11b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r12b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r13b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r14b));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::reg_byte))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::r15b));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm7));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm8));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm9));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm10));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm11));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm12));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm13));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm14));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::xmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::xmm15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm7));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm8));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm9));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm10));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm11));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm12));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm13));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm14));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::ymm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::ymm15));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm7));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm8));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm9));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm10));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm11));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm12));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm13));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm14));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm15));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm16));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm17));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm18));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm19));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm20));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm21));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm22));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm23));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm24));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm25));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm26));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm27));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm28));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm29));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm30));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::zmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::zmm31));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg0))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::kreg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::k7));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::mmx_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::mm7));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st0));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st1));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st2));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st3));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st4));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st5));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st6));
        }
    }
    if true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::x87_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::st7));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm0));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm1));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm2));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm3));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm4));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm5));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm6));
        }
    }
    if x86_64_only(_arch, _reloc_model, _target_features, _target,
                    false).is_ok() && true {
        if let Some(set) =
                _map.get_mut(&InlineAsmRegClass::X86(X86InlineAsmRegClass::tmm_reg))
            {
            set.insert(InlineAsmReg::X86(X86InlineAsmReg::tmm7));
        }
    }
}def_regs! {
204    X86 X86InlineAsmReg X86InlineAsmRegClass {
205        ax: reg, reg_abcd = ["ax", "eax", "rax"],
206        bx: reg, reg_abcd = ["bx", "ebx", "rbx"] % rbx_reserved,
207        cx: reg, reg_abcd = ["cx", "ecx", "rcx"],
208        dx: reg, reg_abcd = ["dx", "edx", "rdx"],
209        si: reg = ["si", "esi", "rsi"] % esi_reserved,
210        di: reg = ["di", "edi", "rdi"],
211        r8: reg = ["r8", "r8w", "r8d"] % x86_64_only,
212        r9: reg = ["r9", "r9w", "r9d"] % x86_64_only,
213        r10: reg = ["r10", "r10w", "r10d"] % x86_64_only,
214        r11: reg = ["r11", "r11w", "r11d"] % x86_64_only,
215        r12: reg = ["r12", "r12w", "r12d"] % x86_64_only,
216        r13: reg = ["r13", "r13w", "r13d"] % x86_64_only,
217        r14: reg = ["r14", "r14w", "r14d"] % x86_64_only,
218        r15: reg = ["r15", "r15w", "r15d"] % x86_64_only,
219        al: reg_byte = ["al"],
220        ah: reg_byte = ["ah"] % high_byte,
221        bl: reg_byte = ["bl"],
222        bh: reg_byte = ["bh"] % high_byte,
223        cl: reg_byte = ["cl"],
224        ch: reg_byte = ["ch"] % high_byte,
225        dl: reg_byte = ["dl"],
226        dh: reg_byte = ["dh"] % high_byte,
227        sil: reg_byte = ["sil"] % x86_64_only,
228        dil: reg_byte = ["dil"] % x86_64_only,
229        r8b: reg_byte = ["r8b"] % x86_64_only,
230        r9b: reg_byte = ["r9b"] % x86_64_only,
231        r10b: reg_byte = ["r10b"] % x86_64_only,
232        r11b: reg_byte = ["r11b"] % x86_64_only,
233        r12b: reg_byte = ["r12b"] % x86_64_only,
234        r13b: reg_byte = ["r13b"] % x86_64_only,
235        r14b: reg_byte = ["r14b"] % x86_64_only,
236        r15b: reg_byte = ["r15b"] % x86_64_only,
237        xmm0: xmm_reg = ["xmm0"],
238        xmm1: xmm_reg = ["xmm1"],
239        xmm2: xmm_reg = ["xmm2"],
240        xmm3: xmm_reg = ["xmm3"],
241        xmm4: xmm_reg = ["xmm4"],
242        xmm5: xmm_reg = ["xmm5"],
243        xmm6: xmm_reg = ["xmm6"],
244        xmm7: xmm_reg = ["xmm7"],
245        xmm8: xmm_reg = ["xmm8"] % x86_64_only,
246        xmm9: xmm_reg = ["xmm9"] % x86_64_only,
247        xmm10: xmm_reg = ["xmm10"] % x86_64_only,
248        xmm11: xmm_reg = ["xmm11"] % x86_64_only,
249        xmm12: xmm_reg = ["xmm12"] % x86_64_only,
250        xmm13: xmm_reg = ["xmm13"] % x86_64_only,
251        xmm14: xmm_reg = ["xmm14"] % x86_64_only,
252        xmm15: xmm_reg = ["xmm15"] % x86_64_only,
253        ymm0: ymm_reg = ["ymm0"],
254        ymm1: ymm_reg = ["ymm1"],
255        ymm2: ymm_reg = ["ymm2"],
256        ymm3: ymm_reg = ["ymm3"],
257        ymm4: ymm_reg = ["ymm4"],
258        ymm5: ymm_reg = ["ymm5"],
259        ymm6: ymm_reg = ["ymm6"],
260        ymm7: ymm_reg = ["ymm7"],
261        ymm8: ymm_reg = ["ymm8"] % x86_64_only,
262        ymm9: ymm_reg = ["ymm9"] % x86_64_only,
263        ymm10: ymm_reg = ["ymm10"] % x86_64_only,
264        ymm11: ymm_reg = ["ymm11"] % x86_64_only,
265        ymm12: ymm_reg = ["ymm12"] % x86_64_only,
266        ymm13: ymm_reg = ["ymm13"] % x86_64_only,
267        ymm14: ymm_reg = ["ymm14"] % x86_64_only,
268        ymm15: ymm_reg = ["ymm15"] % x86_64_only,
269        zmm0: zmm_reg = ["zmm0"],
270        zmm1: zmm_reg = ["zmm1"],
271        zmm2: zmm_reg = ["zmm2"],
272        zmm3: zmm_reg = ["zmm3"],
273        zmm4: zmm_reg = ["zmm4"],
274        zmm5: zmm_reg = ["zmm5"],
275        zmm6: zmm_reg = ["zmm6"],
276        zmm7: zmm_reg = ["zmm7"],
277        zmm8: zmm_reg = ["zmm8"] % x86_64_only,
278        zmm9: zmm_reg = ["zmm9"] % x86_64_only,
279        zmm10: zmm_reg = ["zmm10"] % x86_64_only,
280        zmm11: zmm_reg = ["zmm11"] % x86_64_only,
281        zmm12: zmm_reg = ["zmm12"] % x86_64_only,
282        zmm13: zmm_reg = ["zmm13"] % x86_64_only,
283        zmm14: zmm_reg = ["zmm14"] % x86_64_only,
284        zmm15: zmm_reg = ["zmm15"] % x86_64_only,
285        zmm16: zmm_reg = ["zmm16", "xmm16", "ymm16"] % x86_64_only,
286        zmm17: zmm_reg = ["zmm17", "xmm17", "ymm17"] % x86_64_only,
287        zmm18: zmm_reg = ["zmm18", "xmm18", "ymm18"] % x86_64_only,
288        zmm19: zmm_reg = ["zmm19", "xmm19", "ymm19"] % x86_64_only,
289        zmm20: zmm_reg = ["zmm20", "xmm20", "ymm20"] % x86_64_only,
290        zmm21: zmm_reg = ["zmm21", "xmm21", "ymm21"] % x86_64_only,
291        zmm22: zmm_reg = ["zmm22", "xmm22", "ymm22"] % x86_64_only,
292        zmm23: zmm_reg = ["zmm23", "xmm23", "ymm23"] % x86_64_only,
293        zmm24: zmm_reg = ["zmm24", "xmm24", "ymm24"] % x86_64_only,
294        zmm25: zmm_reg = ["zmm25", "xmm25", "ymm25"] % x86_64_only,
295        zmm26: zmm_reg = ["zmm26", "xmm26", "ymm26"] % x86_64_only,
296        zmm27: zmm_reg = ["zmm27", "xmm27", "ymm27"] % x86_64_only,
297        zmm28: zmm_reg = ["zmm28", "xmm28", "ymm28"] % x86_64_only,
298        zmm29: zmm_reg = ["zmm29", "xmm29", "ymm29"] % x86_64_only,
299        zmm30: zmm_reg = ["zmm30", "xmm30", "ymm30"] % x86_64_only,
300        zmm31: zmm_reg = ["zmm31", "xmm31", "ymm31"] % x86_64_only,
301        k0: kreg0 = ["k0"],
302        k1: kreg = ["k1"],
303        k2: kreg = ["k2"],
304        k3: kreg = ["k3"],
305        k4: kreg = ["k4"],
306        k5: kreg = ["k5"],
307        k6: kreg = ["k6"],
308        k7: kreg = ["k7"],
309        mm0: mmx_reg = ["mm0"],
310        mm1: mmx_reg = ["mm1"],
311        mm2: mmx_reg = ["mm2"],
312        mm3: mmx_reg = ["mm3"],
313        mm4: mmx_reg = ["mm4"],
314        mm5: mmx_reg = ["mm5"],
315        mm6: mmx_reg = ["mm6"],
316        mm7: mmx_reg = ["mm7"],
317        st0: x87_reg = ["st(0)", "st"],
318        st1: x87_reg = ["st(1)"],
319        st2: x87_reg = ["st(2)"],
320        st3: x87_reg = ["st(3)"],
321        st4: x87_reg = ["st(4)"],
322        st5: x87_reg = ["st(5)"],
323        st6: x87_reg = ["st(6)"],
324        st7: x87_reg = ["st(7)"],
325        tmm0: tmm_reg = ["tmm0"] % x86_64_only,
326        tmm1: tmm_reg = ["tmm1"] % x86_64_only,
327        tmm2: tmm_reg = ["tmm2"] % x86_64_only,
328        tmm3: tmm_reg = ["tmm3"] % x86_64_only,
329        tmm4: tmm_reg = ["tmm4"] % x86_64_only,
330        tmm5: tmm_reg = ["tmm5"] % x86_64_only,
331        tmm6: tmm_reg = ["tmm6"] % x86_64_only,
332        tmm7: tmm_reg = ["tmm7"] % x86_64_only,
333        #error = ["bp", "bpl", "ebp", "rbp"] =>
334            "the frame pointer cannot be used as an operand for inline asm",
335        #error = ["sp", "spl", "esp", "rsp"] =>
336            "the stack pointer cannot be used as an operand for inline asm",
337        #error = ["ip", "eip", "rip"] =>
338            "the instruction pointer cannot be used as an operand for inline asm",
339    }
340}
341
342impl X86InlineAsmReg {
343    pub fn emit(
344        self,
345        out: &mut dyn fmt::Write,
346        arch: InlineAsmArch,
347        modifier: Option<char>,
348    ) -> fmt::Result {
349        let reg_default_modifier = match arch {
350            InlineAsmArch::X86 => 'e',
351            InlineAsmArch::X86_64 => 'r',
352            _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
353        };
354        if self as u32 <= Self::dx as u32 {
355            let root = ['a', 'b', 'c', 'd'][self as usize - Self::ax as usize];
356            match modifier.unwrap_or(reg_default_modifier) {
357                'l' => out.write_fmt(format_args!("{0}l", root))write!(out, "{root}l"),
358                'h' => out.write_fmt(format_args!("{0}h", root))write!(out, "{root}h"),
359                'x' => out.write_fmt(format_args!("{0}x", root))write!(out, "{root}x"),
360                'e' => out.write_fmt(format_args!("e{0}x", root))write!(out, "e{root}x"),
361                'r' => out.write_fmt(format_args!("r{0}x", root))write!(out, "r{root}x"),
362                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
363            }
364        } else if self as u32 <= Self::di as u32 {
365            let root = self.name();
366            match modifier.unwrap_or(reg_default_modifier) {
367                'l' => out.write_fmt(format_args!("{0}l", root))write!(out, "{root}l"),
368                'x' => out.write_fmt(format_args!("{0}", root))write!(out, "{root}"),
369                'e' => out.write_fmt(format_args!("e{0}", root))write!(out, "e{root}"),
370                'r' => out.write_fmt(format_args!("r{0}", root))write!(out, "r{root}"),
371                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
372            }
373        } else if self as u32 <= Self::r15 as u32 {
374            let root = self.name();
375            match modifier.unwrap_or(reg_default_modifier) {
376                'l' => out.write_fmt(format_args!("{0}b", root))write!(out, "{root}b"),
377                'x' => out.write_fmt(format_args!("{0}w", root))write!(out, "{root}w"),
378                'e' => out.write_fmt(format_args!("{0}d", root))write!(out, "{root}d"),
379                'r' => out.write_str(root),
380                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
381            }
382        } else if self as u32 <= Self::r15b as u32 {
383            out.write_str(self.name())
384        } else if self as u32 <= Self::xmm15 as u32 {
385            let prefix = modifier.unwrap_or('x');
386            let index = self as u32 - Self::xmm0 as u32;
387            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
388        } else if self as u32 <= Self::ymm15 as u32 {
389            let prefix = modifier.unwrap_or('y');
390            let index = self as u32 - Self::ymm0 as u32;
391            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
392        } else if self as u32 <= Self::zmm31 as u32 {
393            let prefix = modifier.unwrap_or('z');
394            let index = self as u32 - Self::zmm0 as u32;
395            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
396        } else {
397            out.write_str(self.name())
398        }
399    }
400
401    pub fn overlapping_regs(self, mut cb: impl FnMut(X86InlineAsmReg)) {
402        macro_rules! reg_conflicts {
403            (
404                $(
405                    $w:ident : $l:ident $h:ident
406                ),*;
407                $(
408                    $w2:ident : $l2:ident
409                ),*;
410                $(
411                    $x:ident : $y:ident : $z:ident
412                ),*;
413            ) => {
414                match self {
415                    $(
416                        Self::$w => {
417                            cb(Self::$w);
418                            cb(Self::$l);
419                            cb(Self::$h);
420                        }
421                        Self::$l => {
422                            cb(Self::$w);
423                            cb(Self::$l);
424                        }
425                        Self::$h => {
426                            cb(Self::$w);
427                            cb(Self::$h);
428                        }
429                    )*
430                    $(
431                        Self::$w2 | Self::$l2 => {
432                            cb(Self::$w2);
433                            cb(Self::$l2);
434                        }
435                    )*
436                    $(
437                        Self::$x | Self::$y | Self::$z => {
438                            cb(Self::$x);
439                            cb(Self::$y);
440                            cb(Self::$z);
441                        }
442                    )*
443                    r => cb(r),
444                }
445            };
446        }
447
448        // XMM*, YMM* and ZMM* are all different views of the same register.
449        //
450        // See section 15.5 of the combined Intel® 64 and IA-32 Architectures
451        // Software Developer’s Manual for more details.
452        //
453        // We don't need to specify conflicts for [x,y,z]mm[16-31] since these
454        // registers are only available with AVX-512, so we just specify them
455        // as aliases directly.
456        match self {
    Self::ax => { cb(Self::ax); cb(Self::al); cb(Self::ah); }
    Self::al => { cb(Self::ax); cb(Self::al); }
    Self::ah => { cb(Self::ax); cb(Self::ah); }
    Self::bx => { cb(Self::bx); cb(Self::bl); cb(Self::bh); }
    Self::bl => { cb(Self::bx); cb(Self::bl); }
    Self::bh => { cb(Self::bx); cb(Self::bh); }
    Self::cx => { cb(Self::cx); cb(Self::cl); cb(Self::ch); }
    Self::cl => { cb(Self::cx); cb(Self::cl); }
    Self::ch => { cb(Self::cx); cb(Self::ch); }
    Self::dx => { cb(Self::dx); cb(Self::dl); cb(Self::dh); }
    Self::dl => { cb(Self::dx); cb(Self::dl); }
    Self::dh => { cb(Self::dx); cb(Self::dh); }
    Self::si | Self::sil => { cb(Self::si); cb(Self::sil); }
    Self::di | Self::dil => { cb(Self::di); cb(Self::dil); }
    Self::r8 | Self::r8b => { cb(Self::r8); cb(Self::r8b); }
    Self::r9 | Self::r9b => { cb(Self::r9); cb(Self::r9b); }
    Self::r10 | Self::r10b => { cb(Self::r10); cb(Self::r10b); }
    Self::r11 | Self::r11b => { cb(Self::r11); cb(Self::r11b); }
    Self::r12 | Self::r12b => { cb(Self::r12); cb(Self::r12b); }
    Self::r13 | Self::r13b => { cb(Self::r13); cb(Self::r13b); }
    Self::r14 | Self::r14b => { cb(Self::r14); cb(Self::r14b); }
    Self::r15 | Self::r15b => { cb(Self::r15); cb(Self::r15b); }
    Self::xmm0 | Self::ymm0 | Self::zmm0 => {
        cb(Self::xmm0);
        cb(Self::ymm0);
        cb(Self::zmm0);
    }
    Self::xmm1 | Self::ymm1 | Self::zmm1 => {
        cb(Self::xmm1);
        cb(Self::ymm1);
        cb(Self::zmm1);
    }
    Self::xmm2 | Self::ymm2 | Self::zmm2 => {
        cb(Self::xmm2);
        cb(Self::ymm2);
        cb(Self::zmm2);
    }
    Self::xmm3 | Self::ymm3 | Self::zmm3 => {
        cb(Self::xmm3);
        cb(Self::ymm3);
        cb(Self::zmm3);
    }
    Self::xmm4 | Self::ymm4 | Self::zmm4 => {
        cb(Self::xmm4);
        cb(Self::ymm4);
        cb(Self::zmm4);
    }
    Self::xmm5 | Self::ymm5 | Self::zmm5 => {
        cb(Self::xmm5);
        cb(Self::ymm5);
        cb(Self::zmm5);
    }
    Self::xmm6 | Self::ymm6 | Self::zmm6 => {
        cb(Self::xmm6);
        cb(Self::ymm6);
        cb(Self::zmm6);
    }
    Self::xmm7 | Self::ymm7 | Self::zmm7 => {
        cb(Self::xmm7);
        cb(Self::ymm7);
        cb(Self::zmm7);
    }
    Self::xmm8 | Self::ymm8 | Self::zmm8 => {
        cb(Self::xmm8);
        cb(Self::ymm8);
        cb(Self::zmm8);
    }
    Self::xmm9 | Self::ymm9 | Self::zmm9 => {
        cb(Self::xmm9);
        cb(Self::ymm9);
        cb(Self::zmm9);
    }
    Self::xmm10 | Self::ymm10 | Self::zmm10 => {
        cb(Self::xmm10);
        cb(Self::ymm10);
        cb(Self::zmm10);
    }
    Self::xmm11 | Self::ymm11 | Self::zmm11 => {
        cb(Self::xmm11);
        cb(Self::ymm11);
        cb(Self::zmm11);
    }
    Self::xmm12 | Self::ymm12 | Self::zmm12 => {
        cb(Self::xmm12);
        cb(Self::ymm12);
        cb(Self::zmm12);
    }
    Self::xmm13 | Self::ymm13 | Self::zmm13 => {
        cb(Self::xmm13);
        cb(Self::ymm13);
        cb(Self::zmm13);
    }
    Self::xmm14 | Self::ymm14 | Self::zmm14 => {
        cb(Self::xmm14);
        cb(Self::ymm14);
        cb(Self::zmm14);
    }
    Self::xmm15 | Self::ymm15 | Self::zmm15 => {
        cb(Self::xmm15);
        cb(Self::ymm15);
        cb(Self::zmm15);
    }
    r => cb(r),
}reg_conflicts! {
457            ax : al ah,
458            bx : bl bh,
459            cx : cl ch,
460            dx : dl dh;
461            si : sil,
462            di : dil,
463            r8 : r8b,
464            r9 : r9b,
465            r10 : r10b,
466            r11 : r11b,
467            r12 : r12b,
468            r13 : r13b,
469            r14 : r14b,
470            r15 : r15b;
471            xmm0 : ymm0 : zmm0,
472            xmm1 : ymm1 : zmm1,
473            xmm2 : ymm2 : zmm2,
474            xmm3 : ymm3 : zmm3,
475            xmm4 : ymm4 : zmm4,
476            xmm5 : ymm5 : zmm5,
477            xmm6 : ymm6 : zmm6,
478            xmm7 : ymm7 : zmm7,
479            xmm8 : ymm8 : zmm8,
480            xmm9 : ymm9 : zmm9,
481            xmm10 : ymm10 : zmm10,
482            xmm11 : ymm11 : zmm11,
483            xmm12 : ymm12 : zmm12,
484            xmm13 : ymm13 : zmm13,
485            xmm14 : ymm14 : zmm14,
486            xmm15 : ymm15 : zmm15;
487        }
488    }
489}