Skip to main content

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        allow_experimental_reg: bool,
109    ) -> &'static [(InlineAsmType, Option<Symbol>)] {
110        match self {
111            Self::reg | Self::reg_abcd => {
112                if arch == InlineAsmArch::X86_64 {
113                    {
    use super::InlineAsmType::*;
    &[(I16, None), (I32, None), (I64, None), (F16, None), (F32, None),
                (F64, None)]
}types! { _: I16, I32, I64, F16, F32, F64; }
114                } else {
115                    {
    use super::InlineAsmType::*;
    &[(I16, None), (I32, None), (F16, None), (F32, None)]
}types! { _: I16, I32, F16, F32; }
116                }
117            }
118            Self::reg_byte => {
    use super::InlineAsmType::*;
    &[(I8, None)]
}types! { _: I8; },
119            Self::xmm_reg => {
120                if allow_experimental_reg {
121                    {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::sse)), (I64, Some(rustc_span::sym::sse)),
                (I128, 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! {
122                        sse: I32, I64, I128, F16, F32, F64, F128,
123                          VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2);
124                    }
125                } else {
126                    {
    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! {
127                        sse: I32, I64, F16, F32, F64, F128,
128                          VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2);
129                    }
130                }
131            }
132            Self::ymm_reg => {
133                if allow_experimental_reg {
134                    {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::avx)), (I64, Some(rustc_span::sym::avx)),
                (I128, 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! {
135                        avx: I32, I64, I128, F16, F32, F64, F128,
136                            VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
137                            VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4);
138                    }
139                } else {
140                    {
    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! {
141                        avx: I32, I64, F16, F32, F64, F128,
142                            VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
143                            VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4);
144                    }
145                }
146            }
147            Self::zmm_reg => {
148                if allow_experimental_reg {
149                    {
    use super::InlineAsmType::*;
    &[(I32, Some(rustc_span::sym::avx512f)),
                (I64, Some(rustc_span::sym::avx512f)),
                (I128, 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! {
150                        avx512f: I32, I64, I128, F16, F32, F64, F128,
151                            VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
152                            VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4),
153                            VecI8(64), VecI16(32), VecI32(16), VecI64(8), VecF16(32), VecF32(16), VecF64(8);
154                    }
155                } else {
156                    {
    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! {
157                    avx512f: I32, I64, F16, F32, F64, F128,
158                        VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF16(8), VecF32(4), VecF64(2),
159                        VecI8(32), VecI16(16), VecI32(8), VecI64(4), VecF16(16), VecF32(8), VecF64(4),
160                        VecI8(64), VecI16(32), VecI32(16), VecI64(8), VecF16(32), VecF32(16), VecF64(8);
161                    }
162                }
163            }
164
165            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! {
166                avx512f: I8, I16;
167                avx512bw: I32, I64;
168            },
169            Self::kreg0 => &[],
170            Self::mmx_reg | Self::x87_reg => &[],
171            Self::tmm_reg => &[],
172        }
173    }
174}
175
176fn x86_64_only(
177    arch: InlineAsmArch,
178    _reloc_model: RelocModel,
179    _target_features: &FxIndexSet<Symbol>,
180    _target: &Target,
181    _is_clobber: bool,
182) -> Result<(), &'static str> {
183    match arch {
184        InlineAsmArch::X86 => Err("register is only available on x86_64"),
185        InlineAsmArch::X86_64 => Ok(()),
186        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
187    }
188}
189
190fn high_byte(
191    arch: InlineAsmArch,
192    _reloc_model: RelocModel,
193    _target_features: &FxIndexSet<Symbol>,
194    _target: &Target,
195    _is_clobber: bool,
196) -> Result<(), &'static str> {
197    match arch {
198        InlineAsmArch::X86_64 => Err("high byte registers cannot be used as an operand on x86_64"),
199        _ => Ok(()),
200    }
201}
202
203fn rbx_reserved(
204    arch: InlineAsmArch,
205    _reloc_model: RelocModel,
206    _target_features: &FxIndexSet<Symbol>,
207    _target: &Target,
208    _is_clobber: bool,
209) -> Result<(), &'static str> {
210    match arch {
211        InlineAsmArch::X86 => Ok(()),
212        InlineAsmArch::X86_64 => {
213            Err("rbx is used internally by LLVM and cannot be used as an operand for inline asm")
214        }
215        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
216    }
217}
218
219fn esi_reserved(
220    arch: InlineAsmArch,
221    _reloc_model: RelocModel,
222    _target_features: &FxIndexSet<Symbol>,
223    _target: &Target,
224    _is_clobber: bool,
225) -> Result<(), &'static str> {
226    match arch {
227        InlineAsmArch::X86 => {
228            Err("esi is used internally by LLVM and cannot be used as an operand for inline asm")
229        }
230        InlineAsmArch::X86_64 => Ok(()),
231        _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
232    }
233}
234
235#[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! {
236    X86 X86InlineAsmReg X86InlineAsmRegClass {
237        ax: reg, reg_abcd = ["ax", "eax", "rax"],
238        bx: reg, reg_abcd = ["bx", "ebx", "rbx"] % rbx_reserved,
239        cx: reg, reg_abcd = ["cx", "ecx", "rcx"],
240        dx: reg, reg_abcd = ["dx", "edx", "rdx"],
241        si: reg = ["si", "esi", "rsi"] % esi_reserved,
242        di: reg = ["di", "edi", "rdi"],
243        r8: reg = ["r8", "r8w", "r8d"] % x86_64_only,
244        r9: reg = ["r9", "r9w", "r9d"] % x86_64_only,
245        r10: reg = ["r10", "r10w", "r10d"] % x86_64_only,
246        r11: reg = ["r11", "r11w", "r11d"] % x86_64_only,
247        r12: reg = ["r12", "r12w", "r12d"] % x86_64_only,
248        r13: reg = ["r13", "r13w", "r13d"] % x86_64_only,
249        r14: reg = ["r14", "r14w", "r14d"] % x86_64_only,
250        r15: reg = ["r15", "r15w", "r15d"] % x86_64_only,
251        al: reg_byte = ["al"],
252        ah: reg_byte = ["ah"] % high_byte,
253        bl: reg_byte = ["bl"],
254        bh: reg_byte = ["bh"] % high_byte,
255        cl: reg_byte = ["cl"],
256        ch: reg_byte = ["ch"] % high_byte,
257        dl: reg_byte = ["dl"],
258        dh: reg_byte = ["dh"] % high_byte,
259        sil: reg_byte = ["sil"] % x86_64_only,
260        dil: reg_byte = ["dil"] % x86_64_only,
261        r8b: reg_byte = ["r8b"] % x86_64_only,
262        r9b: reg_byte = ["r9b"] % x86_64_only,
263        r10b: reg_byte = ["r10b"] % x86_64_only,
264        r11b: reg_byte = ["r11b"] % x86_64_only,
265        r12b: reg_byte = ["r12b"] % x86_64_only,
266        r13b: reg_byte = ["r13b"] % x86_64_only,
267        r14b: reg_byte = ["r14b"] % x86_64_only,
268        r15b: reg_byte = ["r15b"] % x86_64_only,
269        xmm0: xmm_reg = ["xmm0"],
270        xmm1: xmm_reg = ["xmm1"],
271        xmm2: xmm_reg = ["xmm2"],
272        xmm3: xmm_reg = ["xmm3"],
273        xmm4: xmm_reg = ["xmm4"],
274        xmm5: xmm_reg = ["xmm5"],
275        xmm6: xmm_reg = ["xmm6"],
276        xmm7: xmm_reg = ["xmm7"],
277        xmm8: xmm_reg = ["xmm8"] % x86_64_only,
278        xmm9: xmm_reg = ["xmm9"] % x86_64_only,
279        xmm10: xmm_reg = ["xmm10"] % x86_64_only,
280        xmm11: xmm_reg = ["xmm11"] % x86_64_only,
281        xmm12: xmm_reg = ["xmm12"] % x86_64_only,
282        xmm13: xmm_reg = ["xmm13"] % x86_64_only,
283        xmm14: xmm_reg = ["xmm14"] % x86_64_only,
284        xmm15: xmm_reg = ["xmm15"] % x86_64_only,
285        ymm0: ymm_reg = ["ymm0"],
286        ymm1: ymm_reg = ["ymm1"],
287        ymm2: ymm_reg = ["ymm2"],
288        ymm3: ymm_reg = ["ymm3"],
289        ymm4: ymm_reg = ["ymm4"],
290        ymm5: ymm_reg = ["ymm5"],
291        ymm6: ymm_reg = ["ymm6"],
292        ymm7: ymm_reg = ["ymm7"],
293        ymm8: ymm_reg = ["ymm8"] % x86_64_only,
294        ymm9: ymm_reg = ["ymm9"] % x86_64_only,
295        ymm10: ymm_reg = ["ymm10"] % x86_64_only,
296        ymm11: ymm_reg = ["ymm11"] % x86_64_only,
297        ymm12: ymm_reg = ["ymm12"] % x86_64_only,
298        ymm13: ymm_reg = ["ymm13"] % x86_64_only,
299        ymm14: ymm_reg = ["ymm14"] % x86_64_only,
300        ymm15: ymm_reg = ["ymm15"] % x86_64_only,
301        zmm0: zmm_reg = ["zmm0"],
302        zmm1: zmm_reg = ["zmm1"],
303        zmm2: zmm_reg = ["zmm2"],
304        zmm3: zmm_reg = ["zmm3"],
305        zmm4: zmm_reg = ["zmm4"],
306        zmm5: zmm_reg = ["zmm5"],
307        zmm6: zmm_reg = ["zmm6"],
308        zmm7: zmm_reg = ["zmm7"],
309        zmm8: zmm_reg = ["zmm8"] % x86_64_only,
310        zmm9: zmm_reg = ["zmm9"] % x86_64_only,
311        zmm10: zmm_reg = ["zmm10"] % x86_64_only,
312        zmm11: zmm_reg = ["zmm11"] % x86_64_only,
313        zmm12: zmm_reg = ["zmm12"] % x86_64_only,
314        zmm13: zmm_reg = ["zmm13"] % x86_64_only,
315        zmm14: zmm_reg = ["zmm14"] % x86_64_only,
316        zmm15: zmm_reg = ["zmm15"] % x86_64_only,
317        zmm16: zmm_reg = ["zmm16", "xmm16", "ymm16"] % x86_64_only,
318        zmm17: zmm_reg = ["zmm17", "xmm17", "ymm17"] % x86_64_only,
319        zmm18: zmm_reg = ["zmm18", "xmm18", "ymm18"] % x86_64_only,
320        zmm19: zmm_reg = ["zmm19", "xmm19", "ymm19"] % x86_64_only,
321        zmm20: zmm_reg = ["zmm20", "xmm20", "ymm20"] % x86_64_only,
322        zmm21: zmm_reg = ["zmm21", "xmm21", "ymm21"] % x86_64_only,
323        zmm22: zmm_reg = ["zmm22", "xmm22", "ymm22"] % x86_64_only,
324        zmm23: zmm_reg = ["zmm23", "xmm23", "ymm23"] % x86_64_only,
325        zmm24: zmm_reg = ["zmm24", "xmm24", "ymm24"] % x86_64_only,
326        zmm25: zmm_reg = ["zmm25", "xmm25", "ymm25"] % x86_64_only,
327        zmm26: zmm_reg = ["zmm26", "xmm26", "ymm26"] % x86_64_only,
328        zmm27: zmm_reg = ["zmm27", "xmm27", "ymm27"] % x86_64_only,
329        zmm28: zmm_reg = ["zmm28", "xmm28", "ymm28"] % x86_64_only,
330        zmm29: zmm_reg = ["zmm29", "xmm29", "ymm29"] % x86_64_only,
331        zmm30: zmm_reg = ["zmm30", "xmm30", "ymm30"] % x86_64_only,
332        zmm31: zmm_reg = ["zmm31", "xmm31", "ymm31"] % x86_64_only,
333        k0: kreg0 = ["k0"],
334        k1: kreg = ["k1"],
335        k2: kreg = ["k2"],
336        k3: kreg = ["k3"],
337        k4: kreg = ["k4"],
338        k5: kreg = ["k5"],
339        k6: kreg = ["k6"],
340        k7: kreg = ["k7"],
341        mm0: mmx_reg = ["mm0"],
342        mm1: mmx_reg = ["mm1"],
343        mm2: mmx_reg = ["mm2"],
344        mm3: mmx_reg = ["mm3"],
345        mm4: mmx_reg = ["mm4"],
346        mm5: mmx_reg = ["mm5"],
347        mm6: mmx_reg = ["mm6"],
348        mm7: mmx_reg = ["mm7"],
349        st0: x87_reg = ["st(0)", "st"],
350        st1: x87_reg = ["st(1)"],
351        st2: x87_reg = ["st(2)"],
352        st3: x87_reg = ["st(3)"],
353        st4: x87_reg = ["st(4)"],
354        st5: x87_reg = ["st(5)"],
355        st6: x87_reg = ["st(6)"],
356        st7: x87_reg = ["st(7)"],
357        tmm0: tmm_reg = ["tmm0"] % x86_64_only,
358        tmm1: tmm_reg = ["tmm1"] % x86_64_only,
359        tmm2: tmm_reg = ["tmm2"] % x86_64_only,
360        tmm3: tmm_reg = ["tmm3"] % x86_64_only,
361        tmm4: tmm_reg = ["tmm4"] % x86_64_only,
362        tmm5: tmm_reg = ["tmm5"] % x86_64_only,
363        tmm6: tmm_reg = ["tmm6"] % x86_64_only,
364        tmm7: tmm_reg = ["tmm7"] % x86_64_only,
365        #error = ["bp", "bpl", "ebp", "rbp"] =>
366            "the frame pointer cannot be used as an operand for inline asm",
367        #error = ["sp", "spl", "esp", "rsp"] =>
368            "the stack pointer cannot be used as an operand for inline asm",
369        #error = ["ip", "eip", "rip"] =>
370            "the instruction pointer cannot be used as an operand for inline asm",
371    }
372}
373
374impl X86InlineAsmReg {
375    pub fn emit(
376        self,
377        out: &mut dyn fmt::Write,
378        arch: InlineAsmArch,
379        modifier: Option<char>,
380    ) -> fmt::Result {
381        let reg_default_modifier = match arch {
382            InlineAsmArch::X86 => 'e',
383            InlineAsmArch::X86_64 => 'r',
384            _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
385        };
386        if self as u32 <= Self::dx as u32 {
387            let root = ['a', 'b', 'c', 'd'][self as usize - Self::ax as usize];
388            match modifier.unwrap_or(reg_default_modifier) {
389                'l' => out.write_fmt(format_args!("{0}l", root))write!(out, "{root}l"),
390                'h' => out.write_fmt(format_args!("{0}h", root))write!(out, "{root}h"),
391                'x' => out.write_fmt(format_args!("{0}x", root))write!(out, "{root}x"),
392                'e' => out.write_fmt(format_args!("e{0}x", root))write!(out, "e{root}x"),
393                'r' => out.write_fmt(format_args!("r{0}x", root))write!(out, "r{root}x"),
394                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
395            }
396        } else if self as u32 <= Self::di as u32 {
397            let root = self.name();
398            match modifier.unwrap_or(reg_default_modifier) {
399                'l' => out.write_fmt(format_args!("{0}l", root))write!(out, "{root}l"),
400                'x' => out.write_fmt(format_args!("{0}", root))write!(out, "{root}"),
401                'e' => out.write_fmt(format_args!("e{0}", root))write!(out, "e{root}"),
402                'r' => out.write_fmt(format_args!("r{0}", root))write!(out, "r{root}"),
403                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
404            }
405        } else if self as u32 <= Self::r15 as u32 {
406            let root = self.name();
407            match modifier.unwrap_or(reg_default_modifier) {
408                'l' => out.write_fmt(format_args!("{0}b", root))write!(out, "{root}b"),
409                'x' => out.write_fmt(format_args!("{0}w", root))write!(out, "{root}w"),
410                'e' => out.write_fmt(format_args!("{0}d", root))write!(out, "{root}d"),
411                'r' => out.write_str(root),
412                _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
413            }
414        } else if self as u32 <= Self::r15b as u32 {
415            out.write_str(self.name())
416        } else if self as u32 <= Self::xmm15 as u32 {
417            let prefix = modifier.unwrap_or('x');
418            let index = self as u32 - Self::xmm0 as u32;
419            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
420        } else if self as u32 <= Self::ymm15 as u32 {
421            let prefix = modifier.unwrap_or('y');
422            let index = self as u32 - Self::ymm0 as u32;
423            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
424        } else if self as u32 <= Self::zmm31 as u32 {
425            let prefix = modifier.unwrap_or('z');
426            let index = self as u32 - Self::zmm0 as u32;
427            out.write_fmt(format_args!("{0}{1}", prefix, index))write!(out, "{prefix}{index}")
428        } else {
429            out.write_str(self.name())
430        }
431    }
432
433    pub fn overlapping_regs(self, mut cb: impl FnMut(X86InlineAsmReg)) {
434        macro_rules! reg_conflicts {
435            (
436                $(
437                    $w:ident : $l:ident $h:ident
438                ),*;
439                $(
440                    $w2:ident : $l2:ident
441                ),*;
442                $(
443                    $x:ident : $y:ident : $z:ident
444                ),*;
445            ) => {
446                match self {
447                    $(
448                        Self::$w => {
449                            cb(Self::$w);
450                            cb(Self::$l);
451                            cb(Self::$h);
452                        }
453                        Self::$l => {
454                            cb(Self::$w);
455                            cb(Self::$l);
456                        }
457                        Self::$h => {
458                            cb(Self::$w);
459                            cb(Self::$h);
460                        }
461                    )*
462                    $(
463                        Self::$w2 | Self::$l2 => {
464                            cb(Self::$w2);
465                            cb(Self::$l2);
466                        }
467                    )*
468                    $(
469                        Self::$x | Self::$y | Self::$z => {
470                            cb(Self::$x);
471                            cb(Self::$y);
472                            cb(Self::$z);
473                        }
474                    )*
475                    r => cb(r),
476                }
477            };
478        }
479
480        // XMM*, YMM* and ZMM* are all different views of the same register.
481        //
482        // See section 15.5 of the combined Intel® 64 and IA-32 Architectures
483        // Software Developer’s Manual for more details.
484        //
485        // We don't need to specify conflicts for [x,y,z]mm[16-31] since these
486        // registers are only available with AVX-512, so we just specify them
487        // as aliases directly.
488        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! {
489            ax : al ah,
490            bx : bl bh,
491            cx : cl ch,
492            dx : dl dh;
493            si : sil,
494            di : dil,
495            r8 : r8b,
496            r9 : r9b,
497            r10 : r10b,
498            r11 : r11b,
499            r12 : r12b,
500            r13 : r13b,
501            r14 : r14b,
502            r15 : r15b;
503            xmm0 : ymm0 : zmm0,
504            xmm1 : ymm1 : zmm1,
505            xmm2 : ymm2 : zmm2,
506            xmm3 : ymm3 : zmm3,
507            xmm4 : ymm4 : zmm4,
508            xmm5 : ymm5 : zmm5,
509            xmm6 : ymm6 : zmm6,
510            xmm7 : ymm7 : zmm7,
511            xmm8 : ymm8 : zmm8,
512            xmm9 : ymm9 : zmm9,
513            xmm10 : ymm10 : zmm10,
514            xmm11 : ymm11 : zmm11,
515            xmm12 : ymm12 : zmm12,
516            xmm13 : ymm13 : zmm13,
517            xmm14 : ymm14 : zmm14,
518            xmm15 : ymm15 : zmm15;
519        }
520    }
521}