Skip to main content

rustc_target/asm/
mod.rs

1use std::borrow::Cow;
2use std::fmt;
3
4use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
5use rustc_macros::{Decodable, Encodable, StableHash};
6use rustc_span::Symbol;
7
8use crate::spec::{Arch, RelocModel, Target};
9
10pub struct ModifierInfo {
11    pub modifier: char,
12    pub result: &'static str,
13    pub size: InlineAsmSize,
14}
15
16impl From<(char, &'static str, InlineAsmSize)> for ModifierInfo {
17    fn from((modifier, result, size): (char, &'static str, InlineAsmSize)) -> Self {
18        Self { modifier, result, size }
19    }
20}
21
22macro_rules! def_reg_class {
23    ($arch:ident $arch_regclass:ident {
24        $(
25            $class:ident,
26        )*
27    }) => {
28        #[derive(Copy, Clone, rustc_macros::Encodable, rustc_macros::Decodable, Debug, Eq, PartialEq, PartialOrd, Hash, rustc_macros::StableHash)]
29        #[allow(non_camel_case_types)]
30        pub enum $arch_regclass {
31            $($class,)*
32        }
33
34        impl $arch_regclass {
35            pub fn name(self) -> rustc_span::Symbol {
36                match self {
37                    $(Self::$class => rustc_span::sym::$class,)*
38                }
39            }
40
41            pub fn parse(name: rustc_span::Symbol) -> Result<Self, &'static [rustc_span::Symbol]> {
42                match name {
43                    $(
44                        rustc_span::sym::$class => Ok(Self::$class),
45                    )*
46                    _ => Err(&[$(rustc_span::sym::$class),*]),
47                }
48            }
49        }
50
51        pub(super) fn regclass_map() -> rustc_data_structures::fx::FxHashMap<
52            super::InlineAsmRegClass,
53            rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>,
54        > {
55            use rustc_data_structures::fx::FxHashMap;
56            use rustc_data_structures::fx::FxIndexSet;
57            use super::InlineAsmRegClass;
58            let mut map = FxHashMap::default();
59            $(
60                map.insert(InlineAsmRegClass::$arch($arch_regclass::$class), FxIndexSet::default());
61            )*
62            map
63        }
64    }
65}
66
67macro_rules! def_regs {
68    ($arch:ident $arch_reg:ident $arch_regclass:ident {
69        $(
70            $reg:ident: $class:ident $(, $extra_class:ident)* = [$reg_name:literal $(, $alias:literal)*] $(% $filter:ident)*,
71        )*
72        $(
73            #error = [$($bad_reg:literal),+] => $error:literal,
74        )*
75    }) => {
76        #[allow(unreachable_code)]
77        #[derive(Copy, Clone, rustc_macros::Encodable, rustc_macros::Decodable, Debug, Eq, PartialEq, PartialOrd, Hash, rustc_macros::StableHash)]
78        #[allow(non_camel_case_types)]
79        pub enum $arch_reg {
80            $($reg,)*
81        }
82
83        impl $arch_reg {
84            pub fn name(self) -> &'static str {
85                match self {
86                    $(Self::$reg => $reg_name,)*
87                }
88            }
89
90            pub fn reg_class(self) -> $arch_regclass {
91                match self {
92                    $(Self::$reg => $arch_regclass::$class,)*
93                }
94            }
95
96            pub fn parse(name: &str) -> Result<Self, &'static str> {
97                match name {
98                    $(
99                        $($alias)|* | $reg_name => Ok(Self::$reg),
100                    )*
101                    $(
102                        $($bad_reg)|* => Err($error),
103                    )*
104                    _ => Err("unknown register"),
105                }
106            }
107
108            pub fn validate(self,
109                _arch: super::InlineAsmArch,
110                _reloc_model: crate::spec::RelocModel,
111                _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
112                _target: &crate::spec::Target,
113                _is_clobber: bool,
114            ) -> Result<(), &'static str> {
115                match self {
116                    $(
117                        Self::$reg => {
118                            $($filter(
119                                _arch,
120                                _reloc_model,
121                                _target_features,
122                                _target,
123                                _is_clobber
124                            )?;)*
125                            Ok(())
126                        }
127                    )*
128                }
129            }
130        }
131
132        pub(super) fn fill_reg_map(
133            _arch: super::InlineAsmArch,
134            _reloc_model: crate::spec::RelocModel,
135            _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
136            _target: &crate::spec::Target,
137            _map: &mut rustc_data_structures::fx::FxHashMap<
138                super::InlineAsmRegClass,
139                rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>,
140            >,
141        ) {
142            #[allow(unused_imports)]
143            use super::{InlineAsmReg, InlineAsmRegClass};
144            $(
145                if $($filter(_arch, _reloc_model, _target_features, _target, false).is_ok() &&)* true {
146                    if let Some(set) = _map.get_mut(&InlineAsmRegClass::$arch($arch_regclass::$class)) {
147                        set.insert(InlineAsmReg::$arch($arch_reg::$reg));
148                    }
149                    $(
150                        if let Some(set) = _map.get_mut(&InlineAsmRegClass::$arch($arch_regclass::$extra_class)) {
151                            set.insert(InlineAsmReg::$arch($arch_reg::$reg));
152                        }
153                    )*
154                }
155            )*
156        }
157    }
158}
159
160macro_rules! types {
161    (
162        $(_ : $($ty:expr),+;)?
163        $($feature:ident: $($ty2:expr),+;)*
164    ) => {
165        {
166            use super::InlineAsmType::*;
167            &[
168                $($(
169                    ($ty, None),
170                )*)?
171                $($(
172                    ($ty2, Some(rustc_span::sym::$feature)),
173                )*)*
174            ]
175        }
176    };
177}
178
179mod aarch64;
180mod amdgpu;
181mod arm;
182mod avr;
183mod bpf;
184mod csky;
185mod hexagon;
186mod loongarch;
187mod m68k;
188mod mips;
189mod msp430;
190mod nvptx;
191mod powerpc;
192mod riscv;
193mod s390x;
194mod sparc;
195mod spirv;
196mod wasm;
197mod x86;
198mod xtensa;
199
200pub use aarch64::{AArch64InlineAsmReg, AArch64InlineAsmRegClass};
201pub use amdgpu::{AmdgpuInlineAsmReg, AmdgpuInlineAsmRegClass};
202pub use arm::{ArmInlineAsmReg, ArmInlineAsmRegClass};
203pub use avr::{AvrInlineAsmReg, AvrInlineAsmRegClass};
204pub use bpf::{BpfInlineAsmReg, BpfInlineAsmRegClass};
205pub use csky::{CSKYInlineAsmReg, CSKYInlineAsmRegClass};
206pub use hexagon::{HexagonInlineAsmReg, HexagonInlineAsmRegClass};
207pub use loongarch::{LoongArchInlineAsmReg, LoongArchInlineAsmRegClass};
208pub use m68k::{M68kInlineAsmReg, M68kInlineAsmRegClass};
209pub use mips::{MipsInlineAsmReg, MipsInlineAsmRegClass};
210pub use msp430::{Msp430InlineAsmReg, Msp430InlineAsmRegClass};
211pub use nvptx::{NvptxInlineAsmReg, NvptxInlineAsmRegClass};
212pub use powerpc::{PowerPCInlineAsmReg, PowerPCInlineAsmRegClass};
213pub use riscv::{RiscVInlineAsmReg, RiscVInlineAsmRegClass};
214pub use s390x::{S390xInlineAsmReg, S390xInlineAsmRegClass};
215pub use sparc::{SparcInlineAsmReg, SparcInlineAsmRegClass};
216pub use spirv::{SpirVInlineAsmReg, SpirVInlineAsmRegClass};
217pub use wasm::{WasmInlineAsmReg, WasmInlineAsmRegClass};
218pub use x86::{X86InlineAsmReg, X86InlineAsmRegClass};
219pub use xtensa::{XtensaInlineAsmReg, XtensaInlineAsmRegClass};
220
221#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmArch { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmArch { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmArch {
    #[inline]
    fn clone(&self) -> InlineAsmArch { *self }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmArch {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmArch::X86 => { 0usize }
                        InlineAsmArch::X86_64 => { 1usize }
                        InlineAsmArch::Arm => { 2usize }
                        InlineAsmArch::AArch64 => { 3usize }
                        InlineAsmArch::Arm64EC => { 4usize }
                        InlineAsmArch::RiscV32 => { 5usize }
                        InlineAsmArch::RiscV64 => { 6usize }
                        InlineAsmArch::Nvptx64 => { 7usize }
                        InlineAsmArch::Amdgpu => { 8usize }
                        InlineAsmArch::Hexagon => { 9usize }
                        InlineAsmArch::LoongArch32 => { 10usize }
                        InlineAsmArch::LoongArch64 => { 11usize }
                        InlineAsmArch::Mips => { 12usize }
                        InlineAsmArch::Mips64 => { 13usize }
                        InlineAsmArch::PowerPC => { 14usize }
                        InlineAsmArch::PowerPC64 => { 15usize }
                        InlineAsmArch::S390x => { 16usize }
                        InlineAsmArch::Sparc => { 17usize }
                        InlineAsmArch::Sparc64 => { 18usize }
                        InlineAsmArch::SpirV => { 19usize }
                        InlineAsmArch::Wasm32 => { 20usize }
                        InlineAsmArch::Wasm64 => { 21usize }
                        InlineAsmArch::Xtensa => { 22usize }
                        InlineAsmArch::Bpf => { 23usize }
                        InlineAsmArch::Avr => { 24usize }
                        InlineAsmArch::Msp430 => { 25usize }
                        InlineAsmArch::M68k => { 26usize }
                        InlineAsmArch::CSKY => { 27usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmArch {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { InlineAsmArch::X86 }
                    1usize => { InlineAsmArch::X86_64 }
                    2usize => { InlineAsmArch::Arm }
                    3usize => { InlineAsmArch::AArch64 }
                    4usize => { InlineAsmArch::Arm64EC }
                    5usize => { InlineAsmArch::RiscV32 }
                    6usize => { InlineAsmArch::RiscV64 }
                    7usize => { InlineAsmArch::Nvptx64 }
                    8usize => { InlineAsmArch::Amdgpu }
                    9usize => { InlineAsmArch::Hexagon }
                    10usize => { InlineAsmArch::LoongArch32 }
                    11usize => { InlineAsmArch::LoongArch64 }
                    12usize => { InlineAsmArch::Mips }
                    13usize => { InlineAsmArch::Mips64 }
                    14usize => { InlineAsmArch::PowerPC }
                    15usize => { InlineAsmArch::PowerPC64 }
                    16usize => { InlineAsmArch::S390x }
                    17usize => { InlineAsmArch::Sparc }
                    18usize => { InlineAsmArch::Sparc64 }
                    19usize => { InlineAsmArch::SpirV }
                    20usize => { InlineAsmArch::Wasm32 }
                    21usize => { InlineAsmArch::Wasm64 }
                    22usize => { InlineAsmArch::Xtensa }
                    23usize => { InlineAsmArch::Bpf }
                    24usize => { InlineAsmArch::Avr }
                    25usize => { InlineAsmArch::Msp430 }
                    26usize => { InlineAsmArch::M68k }
                    27usize => { InlineAsmArch::CSKY }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmArch`, expected 0..28, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmArch {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                InlineAsmArch::X86 => "X86",
                InlineAsmArch::X86_64 => "X86_64",
                InlineAsmArch::Arm => "Arm",
                InlineAsmArch::AArch64 => "AArch64",
                InlineAsmArch::Arm64EC => "Arm64EC",
                InlineAsmArch::RiscV32 => "RiscV32",
                InlineAsmArch::RiscV64 => "RiscV64",
                InlineAsmArch::Nvptx64 => "Nvptx64",
                InlineAsmArch::Amdgpu => "Amdgpu",
                InlineAsmArch::Hexagon => "Hexagon",
                InlineAsmArch::LoongArch32 => "LoongArch32",
                InlineAsmArch::LoongArch64 => "LoongArch64",
                InlineAsmArch::Mips => "Mips",
                InlineAsmArch::Mips64 => "Mips64",
                InlineAsmArch::PowerPC => "PowerPC",
                InlineAsmArch::PowerPC64 => "PowerPC64",
                InlineAsmArch::S390x => "S390x",
                InlineAsmArch::Sparc => "Sparc",
                InlineAsmArch::Sparc64 => "Sparc64",
                InlineAsmArch::SpirV => "SpirV",
                InlineAsmArch::Wasm32 => "Wasm32",
                InlineAsmArch::Wasm64 => "Wasm64",
                InlineAsmArch::Xtensa => "Xtensa",
                InlineAsmArch::Bpf => "Bpf",
                InlineAsmArch::Avr => "Avr",
                InlineAsmArch::Msp430 => "Msp430",
                InlineAsmArch::M68k => "M68k",
                InlineAsmArch::CSKY => "CSKY",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmArch {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmArch { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmArch {
    #[inline]
    fn eq(&self, other: &InlineAsmArch) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmArch {
    #[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)
    }
}Hash)]
222pub enum InlineAsmArch {
223    X86,
224    X86_64,
225    Arm,
226    AArch64,
227    Arm64EC,
228    RiscV32,
229    RiscV64,
230    Nvptx64,
231    Amdgpu,
232    Hexagon,
233    LoongArch32,
234    LoongArch64,
235    Mips,
236    Mips64,
237    PowerPC,
238    PowerPC64,
239    S390x,
240    Sparc,
241    Sparc64,
242    SpirV,
243    Wasm32,
244    Wasm64,
245    Xtensa,
246    Bpf,
247    Avr,
248    Msp430,
249    M68k,
250    CSKY,
251}
252
253impl InlineAsmArch {
254    pub fn from_arch(arch: &Arch) -> Option<Self> {
255        match arch {
256            Arch::X86 => Some(Self::X86),
257            Arch::X86_64 => Some(Self::X86_64),
258            Arch::Arm => Some(Self::Arm),
259            Arch::Arm64EC => Some(Self::Arm64EC),
260            Arch::AArch64 => Some(Self::AArch64),
261            Arch::AmdGpu => Some(Self::Amdgpu),
262            Arch::RiscV32 => Some(Self::RiscV32),
263            Arch::RiscV64 => Some(Self::RiscV64),
264            Arch::Nvptx64 => Some(Self::Nvptx64),
265            Arch::Hexagon => Some(Self::Hexagon),
266            Arch::LoongArch32 => Some(Self::LoongArch32),
267            Arch::LoongArch64 => Some(Self::LoongArch64),
268            Arch::Mips | Arch::Mips32r6 => Some(Self::Mips),
269            Arch::Mips64 | Arch::Mips64r6 => Some(Self::Mips64),
270            Arch::PowerPC => Some(Self::PowerPC),
271            Arch::PowerPC64 => Some(Self::PowerPC64),
272            Arch::S390x => Some(Self::S390x),
273            Arch::Sparc => Some(Self::Sparc),
274            Arch::Sparc64 => Some(Self::Sparc64),
275            Arch::SpirV => Some(Self::SpirV),
276            Arch::Wasm32 => Some(Self::Wasm32),
277            Arch::Wasm64 => Some(Self::Wasm64),
278            Arch::Bpf => Some(Self::Bpf),
279            Arch::Avr => Some(Self::Avr),
280            Arch::Msp430 => Some(Self::Msp430),
281            Arch::M68k => Some(Self::M68k),
282            Arch::CSky => Some(Self::CSKY),
283            Arch::Xtensa => Some(Self::Xtensa),
284            Arch::Other(_) => None,
285        }
286    }
287}
288
289#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmReg { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmReg { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmReg {
    #[inline]
    fn clone(&self) -> InlineAsmReg {
        let _: ::core::clone::AssertParamIsClone<X86InlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<ArmInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<AmdgpuInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<AArch64InlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<RiscVInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<NvptxInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<PowerPCInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<HexagonInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<LoongArchInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<MipsInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<S390xInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<SparcInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<SpirVInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<WasmInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<XtensaInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<BpfInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<AvrInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<Msp430InlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<M68kInlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<CSKYInlineAsmReg>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmReg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmReg::X86(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "X86",
                    &__self_0),
            InlineAsmReg::Arm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Arm",
                    &__self_0),
            InlineAsmReg::Amdgpu(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Amdgpu",
                    &__self_0),
            InlineAsmReg::AArch64(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "AArch64", &__self_0),
            InlineAsmReg::RiscV(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "RiscV",
                    &__self_0),
            InlineAsmReg::Nvptx(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Nvptx",
                    &__self_0),
            InlineAsmReg::PowerPC(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "PowerPC", &__self_0),
            InlineAsmReg::Hexagon(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Hexagon", &__self_0),
            InlineAsmReg::LoongArch(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "LoongArch", &__self_0),
            InlineAsmReg::Mips(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Mips",
                    &__self_0),
            InlineAsmReg::S390x(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "S390x",
                    &__self_0),
            InlineAsmReg::Sparc(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Sparc",
                    &__self_0),
            InlineAsmReg::SpirV(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "SpirV",
                    &__self_0),
            InlineAsmReg::Wasm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Wasm",
                    &__self_0),
            InlineAsmReg::Xtensa(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Xtensa",
                    &__self_0),
            InlineAsmReg::Bpf(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Bpf",
                    &__self_0),
            InlineAsmReg::Avr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Avr",
                    &__self_0),
            InlineAsmReg::Msp430(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Msp430",
                    &__self_0),
            InlineAsmReg::M68k(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "M68k",
                    &__self_0),
            InlineAsmReg::CSKY(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "CSKY",
                    &__self_0),
            InlineAsmReg::Err => ::core::fmt::Formatter::write_str(f, "Err"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmReg {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<X86InlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<ArmInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<AmdgpuInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<AArch64InlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<RiscVInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<NvptxInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<PowerPCInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<HexagonInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<LoongArchInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<MipsInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<S390xInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<SparcInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<SpirVInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<WasmInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<XtensaInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<BpfInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<AvrInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<Msp430InlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<M68kInlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<CSKYInlineAsmReg>;
    }
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmReg { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmReg {
    #[inline]
    fn eq(&self, other: &InlineAsmReg) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmReg::X86(__self_0), InlineAsmReg::X86(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmReg::Arm(__self_0), InlineAsmReg::Arm(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmReg::Amdgpu(__self_0),
                    InlineAsmReg::Amdgpu(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::AArch64(__self_0),
                    InlineAsmReg::AArch64(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::RiscV(__self_0), InlineAsmReg::RiscV(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::Nvptx(__self_0), InlineAsmReg::Nvptx(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::PowerPC(__self_0),
                    InlineAsmReg::PowerPC(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::Hexagon(__self_0),
                    InlineAsmReg::Hexagon(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::LoongArch(__self_0),
                    InlineAsmReg::LoongArch(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::Mips(__self_0), InlineAsmReg::Mips(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::S390x(__self_0), InlineAsmReg::S390x(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::Sparc(__self_0), InlineAsmReg::Sparc(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::SpirV(__self_0), InlineAsmReg::SpirV(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::Wasm(__self_0), InlineAsmReg::Wasm(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::Xtensa(__self_0),
                    InlineAsmReg::Xtensa(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::Bpf(__self_0), InlineAsmReg::Bpf(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmReg::Avr(__self_0), InlineAsmReg::Avr(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmReg::Msp430(__self_0),
                    InlineAsmReg::Msp430(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmReg::M68k(__self_0), InlineAsmReg::M68k(__arg1_0))
                    => __self_0 == __arg1_0,
                (InlineAsmReg::CSKY(__self_0), InlineAsmReg::CSKY(__arg1_0))
                    => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InlineAsmReg {
    #[inline]
    fn partial_cmp(&self, other: &InlineAsmReg)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (InlineAsmReg::X86(__self_0), InlineAsmReg::X86(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Arm(__self_0), InlineAsmReg::Arm(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Amdgpu(__self_0), InlineAsmReg::Amdgpu(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::AArch64(__self_0), InlineAsmReg::AArch64(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::RiscV(__self_0), InlineAsmReg::RiscV(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Nvptx(__self_0), InlineAsmReg::Nvptx(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::PowerPC(__self_0), InlineAsmReg::PowerPC(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Hexagon(__self_0), InlineAsmReg::Hexagon(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::LoongArch(__self_0),
                InlineAsmReg::LoongArch(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Mips(__self_0), InlineAsmReg::Mips(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::S390x(__self_0), InlineAsmReg::S390x(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Sparc(__self_0), InlineAsmReg::Sparc(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::SpirV(__self_0), InlineAsmReg::SpirV(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Wasm(__self_0), InlineAsmReg::Wasm(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Xtensa(__self_0), InlineAsmReg::Xtensa(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Bpf(__self_0), InlineAsmReg::Bpf(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Avr(__self_0), InlineAsmReg::Avr(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::Msp430(__self_0), InlineAsmReg::Msp430(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::M68k(__self_0), InlineAsmReg::M68k(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmReg::CSKY(__self_0), InlineAsmReg::CSKY(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmReg {
    #[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);
        match self {
            InlineAsmReg::X86(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Arm(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Amdgpu(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::AArch64(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::RiscV(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Nvptx(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::PowerPC(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Hexagon(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::LoongArch(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Mips(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::S390x(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Sparc(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::SpirV(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Wasm(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Xtensa(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Bpf(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Avr(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::Msp430(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::M68k(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmReg::CSKY(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
290#[derive(const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for InlineAsmReg
            {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                ::std::mem::discriminant(self).stable_hash(__hcx, __hasher);
                match *self {
                    InlineAsmReg::X86(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Arm(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Amdgpu(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::AArch64(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::RiscV(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Nvptx(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::PowerPC(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Hexagon(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::LoongArch(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Mips(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::S390x(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Sparc(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::SpirV(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Wasm(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Xtensa(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Bpf(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Avr(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Msp430(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::M68k(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::CSKY(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmReg::Err => {}
                }
            }
        }
    };StableHash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmReg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmReg::X86(ref __binding_0) => { 0usize }
                        InlineAsmReg::Arm(ref __binding_0) => { 1usize }
                        InlineAsmReg::Amdgpu(ref __binding_0) => { 2usize }
                        InlineAsmReg::AArch64(ref __binding_0) => { 3usize }
                        InlineAsmReg::RiscV(ref __binding_0) => { 4usize }
                        InlineAsmReg::Nvptx(ref __binding_0) => { 5usize }
                        InlineAsmReg::PowerPC(ref __binding_0) => { 6usize }
                        InlineAsmReg::Hexagon(ref __binding_0) => { 7usize }
                        InlineAsmReg::LoongArch(ref __binding_0) => { 8usize }
                        InlineAsmReg::Mips(ref __binding_0) => { 9usize }
                        InlineAsmReg::S390x(ref __binding_0) => { 10usize }
                        InlineAsmReg::Sparc(ref __binding_0) => { 11usize }
                        InlineAsmReg::SpirV(ref __binding_0) => { 12usize }
                        InlineAsmReg::Wasm(ref __binding_0) => { 13usize }
                        InlineAsmReg::Xtensa(ref __binding_0) => { 14usize }
                        InlineAsmReg::Bpf(ref __binding_0) => { 15usize }
                        InlineAsmReg::Avr(ref __binding_0) => { 16usize }
                        InlineAsmReg::Msp430(ref __binding_0) => { 17usize }
                        InlineAsmReg::M68k(ref __binding_0) => { 18usize }
                        InlineAsmReg::CSKY(ref __binding_0) => { 19usize }
                        InlineAsmReg::Err => { 20usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmReg::X86(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Arm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Amdgpu(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::AArch64(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::RiscV(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Nvptx(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::PowerPC(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Hexagon(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::LoongArch(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Mips(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::S390x(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Sparc(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::SpirV(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Wasm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Xtensa(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Bpf(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Avr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Msp430(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::M68k(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::CSKY(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmReg::Err => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmReg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmReg::X86(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        InlineAsmReg::Arm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        InlineAsmReg::Amdgpu(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        InlineAsmReg::AArch64(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        InlineAsmReg::RiscV(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        InlineAsmReg::Nvptx(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        InlineAsmReg::PowerPC(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        InlineAsmReg::Hexagon(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        InlineAsmReg::LoongArch(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        InlineAsmReg::Mips(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        InlineAsmReg::S390x(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        InlineAsmReg::Sparc(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        InlineAsmReg::SpirV(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => {
                        InlineAsmReg::Wasm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    14usize => {
                        InlineAsmReg::Xtensa(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    15usize => {
                        InlineAsmReg::Bpf(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    16usize => {
                        InlineAsmReg::Avr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    17usize => {
                        InlineAsmReg::Msp430(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        InlineAsmReg::M68k(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => {
                        InlineAsmReg::CSKY(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    20usize => { InlineAsmReg::Err }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmReg`, expected 0..21, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable)]
291pub enum InlineAsmReg {
292    X86(X86InlineAsmReg),
293    Arm(ArmInlineAsmReg),
294    Amdgpu(AmdgpuInlineAsmReg),
295    AArch64(AArch64InlineAsmReg),
296    RiscV(RiscVInlineAsmReg),
297    Nvptx(NvptxInlineAsmReg),
298    PowerPC(PowerPCInlineAsmReg),
299    Hexagon(HexagonInlineAsmReg),
300    LoongArch(LoongArchInlineAsmReg),
301    Mips(MipsInlineAsmReg),
302    S390x(S390xInlineAsmReg),
303    Sparc(SparcInlineAsmReg),
304    SpirV(SpirVInlineAsmReg),
305    Wasm(WasmInlineAsmReg),
306    Xtensa(XtensaInlineAsmReg),
307    Bpf(BpfInlineAsmReg),
308    Avr(AvrInlineAsmReg),
309    Msp430(Msp430InlineAsmReg),
310    M68k(M68kInlineAsmReg),
311    CSKY(CSKYInlineAsmReg),
312    // Placeholder for invalid register constraints for the current target
313    Err,
314}
315
316impl InlineAsmReg {
317    pub fn name(self) -> Cow<'static, str> {
318        match self {
319            Self::X86(r) => r.name().into(),
320            Self::Arm(r) => r.name().into(),
321            Self::AArch64(r) => r.name().into(),
322            Self::Amdgpu(r) => r.name().into(),
323            Self::RiscV(r) => r.name().into(),
324            Self::PowerPC(r) => r.name().into(),
325            Self::Hexagon(r) => r.name().into(),
326            Self::LoongArch(r) => r.name().into(),
327            Self::Mips(r) => r.name().into(),
328            Self::S390x(r) => r.name().into(),
329            Self::Sparc(r) => r.name().into(),
330            Self::Xtensa(r) => r.name().into(),
331            Self::Bpf(r) => r.name().into(),
332            Self::Avr(r) => r.name().into(),
333            Self::Msp430(r) => r.name().into(),
334            Self::M68k(r) => r.name().into(),
335            Self::CSKY(r) => r.name().into(),
336            Self::Err => "<reg>".into(),
337        }
338    }
339
340    pub fn reg_class(self) -> InlineAsmRegClass {
341        match self {
342            Self::X86(r) => InlineAsmRegClass::X86(r.reg_class()),
343            Self::Arm(r) => InlineAsmRegClass::Arm(r.reg_class()),
344            Self::AArch64(r) => InlineAsmRegClass::AArch64(r.reg_class()),
345            Self::Amdgpu(r) => InlineAsmRegClass::Amdgpu(r.reg_class()),
346            Self::RiscV(r) => InlineAsmRegClass::RiscV(r.reg_class()),
347            Self::PowerPC(r) => InlineAsmRegClass::PowerPC(r.reg_class()),
348            Self::Hexagon(r) => InlineAsmRegClass::Hexagon(r.reg_class()),
349            Self::LoongArch(r) => InlineAsmRegClass::LoongArch(r.reg_class()),
350            Self::Mips(r) => InlineAsmRegClass::Mips(r.reg_class()),
351            Self::S390x(r) => InlineAsmRegClass::S390x(r.reg_class()),
352            Self::Sparc(r) => InlineAsmRegClass::Sparc(r.reg_class()),
353            Self::Xtensa(r) => InlineAsmRegClass::Xtensa(r.reg_class()),
354            Self::Bpf(r) => InlineAsmRegClass::Bpf(r.reg_class()),
355            Self::Avr(r) => InlineAsmRegClass::Avr(r.reg_class()),
356            Self::Msp430(r) => InlineAsmRegClass::Msp430(r.reg_class()),
357            Self::M68k(r) => InlineAsmRegClass::M68k(r.reg_class()),
358            Self::CSKY(r) => InlineAsmRegClass::CSKY(r.reg_class()),
359            Self::Err => InlineAsmRegClass::Err,
360        }
361    }
362
363    pub fn parse(arch: InlineAsmArch, name: Symbol) -> Result<Self, &'static str> {
364        // FIXME: use direct symbol comparison for register names
365        // Use `Symbol::as_str` instead of `Symbol::with` here because `has_feature` may access `Symbol`.
366        let name = name.as_str();
367        Ok(match arch {
368            InlineAsmArch::X86 | InlineAsmArch::X86_64 => Self::X86(X86InlineAsmReg::parse(name)?),
369            InlineAsmArch::Arm => Self::Arm(ArmInlineAsmReg::parse(name)?),
370            InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
371                Self::AArch64(AArch64InlineAsmReg::parse(name)?)
372            }
373            InlineAsmArch::Amdgpu => Self::Amdgpu(AmdgpuInlineAsmReg::parse(name)?),
374            InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
375                Self::RiscV(RiscVInlineAsmReg::parse(name)?)
376            }
377            InlineAsmArch::Nvptx64 => Self::Nvptx(NvptxInlineAsmReg::parse(name)?),
378            InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
379                Self::PowerPC(PowerPCInlineAsmReg::parse(name)?)
380            }
381            InlineAsmArch::Hexagon => Self::Hexagon(HexagonInlineAsmReg::parse(name)?),
382            InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
383                Self::LoongArch(LoongArchInlineAsmReg::parse(name)?)
384            }
385            InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
386                Self::Mips(MipsInlineAsmReg::parse(name)?)
387            }
388            InlineAsmArch::Xtensa => Self::Xtensa(XtensaInlineAsmReg::parse(name)?),
389            InlineAsmArch::S390x => Self::S390x(S390xInlineAsmReg::parse(name)?),
390            InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
391                Self::Sparc(SparcInlineAsmReg::parse(name)?)
392            }
393            InlineAsmArch::SpirV => Self::SpirV(SpirVInlineAsmReg::parse(name)?),
394            InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
395                Self::Wasm(WasmInlineAsmReg::parse(name)?)
396            }
397            InlineAsmArch::Bpf => Self::Bpf(BpfInlineAsmReg::parse(name)?),
398            InlineAsmArch::Avr => Self::Avr(AvrInlineAsmReg::parse(name)?),
399            InlineAsmArch::Msp430 => Self::Msp430(Msp430InlineAsmReg::parse(name)?),
400            InlineAsmArch::M68k => Self::M68k(M68kInlineAsmReg::parse(name)?),
401            InlineAsmArch::CSKY => Self::CSKY(CSKYInlineAsmReg::parse(name)?),
402        })
403    }
404
405    pub fn validate(
406        self,
407        arch: InlineAsmArch,
408        reloc_model: RelocModel,
409        target_features: &FxIndexSet<Symbol>,
410        target: &Target,
411        is_clobber: bool,
412    ) -> Result<(), &'static str> {
413        match self {
414            Self::X86(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
415            Self::Arm(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
416            Self::AArch64(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
417            Self::Amdgpu(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
418            Self::RiscV(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
419            Self::PowerPC(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
420            Self::Hexagon(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
421            Self::LoongArch(r) => {
422                r.validate(arch, reloc_model, target_features, target, is_clobber)
423            }
424            Self::Mips(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
425            Self::S390x(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
426            Self::Sparc(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
427            Self::Bpf(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
428            Self::Avr(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
429            Self::Xtensa(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
430            Self::Msp430(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
431            Self::M68k(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
432            Self::CSKY(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
433            Self::Err => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
434        }
435    }
436
437    // NOTE: This function isn't used at the moment, but is needed to support
438    // falling back to an external assembler.
439    pub fn emit(
440        self,
441        out: &mut dyn fmt::Write,
442        arch: InlineAsmArch,
443        modifier: Option<char>,
444    ) -> fmt::Result {
445        match self {
446            Self::X86(r) => r.emit(out, arch, modifier),
447            Self::Arm(r) => r.emit(out, arch, modifier),
448            Self::AArch64(r) => r.emit(out, arch, modifier),
449            Self::Amdgpu(r) => r.emit(out, arch, modifier),
450            Self::RiscV(r) => r.emit(out, arch, modifier),
451            Self::PowerPC(r) => r.emit(out, arch, modifier),
452            Self::Hexagon(r) => r.emit(out, arch, modifier),
453            Self::LoongArch(r) => r.emit(out, arch, modifier),
454            Self::Mips(r) => r.emit(out, arch, modifier),
455            Self::S390x(r) => r.emit(out, arch, modifier),
456            Self::Sparc(r) => r.emit(out, arch, modifier),
457            Self::Xtensa(r) => r.emit(out, arch, modifier),
458            Self::Bpf(r) => r.emit(out, arch, modifier),
459            Self::Avr(r) => r.emit(out, arch, modifier),
460            Self::Msp430(r) => r.emit(out, arch, modifier),
461            Self::M68k(r) => r.emit(out, arch, modifier),
462            Self::CSKY(r) => r.emit(out, arch, modifier),
463            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmReg::Err")));
}unreachable!("Use of InlineAsmReg::Err"),
464        }
465    }
466
467    pub fn overlapping_regs(self, mut cb: impl FnMut(InlineAsmReg)) {
468        match self {
469            Self::X86(r) => r.overlapping_regs(|r| cb(Self::X86(r))),
470            Self::Arm(r) => r.overlapping_regs(|r| cb(Self::Arm(r))),
471            Self::AArch64(_) => cb(self),
472            Self::Amdgpu(r) => r.overlapping_regs(|r| cb(Self::Amdgpu(r))),
473            Self::RiscV(_) => cb(self),
474            Self::PowerPC(r) => r.overlapping_regs(|r| cb(Self::PowerPC(r))),
475            Self::Hexagon(r) => r.overlapping_regs(|r| cb(Self::Hexagon(r))),
476            Self::LoongArch(r) => r.overlapping_regs(|r| cb(Self::LoongArch(r))),
477            Self::Mips(r) => r.overlapping_regs(|r| cb(Self::Mips(r))),
478            Self::S390x(r) => r.overlapping_regs(|r| cb(Self::S390x(r))),
479            Self::Sparc(r) => r.overlapping_regs(|r| cb(Self::Sparc(r))),
480            Self::Xtensa(_) => cb(self),
481            Self::Bpf(r) => r.overlapping_regs(|r| cb(Self::Bpf(r))),
482            Self::Avr(r) => r.overlapping_regs(|r| cb(Self::Avr(r))),
483            Self::Msp430(_) => cb(self),
484            Self::M68k(_) => cb(self),
485            Self::CSKY(_) => cb(self),
486            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmReg::Err")));
}unreachable!("Use of InlineAsmReg::Err"),
487        }
488    }
489}
490
491#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmRegClass { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmRegClass { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmRegClass {
    #[inline]
    fn clone(&self) -> InlineAsmRegClass {
        let _: ::core::clone::AssertParamIsClone<X86InlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<ArmInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<AArch64InlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<AmdgpuInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<RiscVInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<NvptxInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<PowerPCInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<HexagonInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<LoongArchInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<MipsInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<S390xInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<SparcInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<SpirVInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<WasmInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<XtensaInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<BpfInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<AvrInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<Msp430InlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<M68kInlineAsmRegClass>;
        let _: ::core::clone::AssertParamIsClone<CSKYInlineAsmRegClass>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmRegClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmRegClass::X86(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "X86",
                    &__self_0),
            InlineAsmRegClass::Arm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Arm",
                    &__self_0),
            InlineAsmRegClass::AArch64(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "AArch64", &__self_0),
            InlineAsmRegClass::Amdgpu(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Amdgpu",
                    &__self_0),
            InlineAsmRegClass::RiscV(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "RiscV",
                    &__self_0),
            InlineAsmRegClass::Nvptx(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Nvptx",
                    &__self_0),
            InlineAsmRegClass::PowerPC(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "PowerPC", &__self_0),
            InlineAsmRegClass::Hexagon(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Hexagon", &__self_0),
            InlineAsmRegClass::LoongArch(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "LoongArch", &__self_0),
            InlineAsmRegClass::Mips(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Mips",
                    &__self_0),
            InlineAsmRegClass::S390x(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "S390x",
                    &__self_0),
            InlineAsmRegClass::Sparc(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Sparc",
                    &__self_0),
            InlineAsmRegClass::SpirV(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "SpirV",
                    &__self_0),
            InlineAsmRegClass::Wasm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Wasm",
                    &__self_0),
            InlineAsmRegClass::Xtensa(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Xtensa",
                    &__self_0),
            InlineAsmRegClass::Bpf(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Bpf",
                    &__self_0),
            InlineAsmRegClass::Avr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Avr",
                    &__self_0),
            InlineAsmRegClass::Msp430(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Msp430",
                    &__self_0),
            InlineAsmRegClass::M68k(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "M68k",
                    &__self_0),
            InlineAsmRegClass::CSKY(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "CSKY",
                    &__self_0),
            InlineAsmRegClass::Err =>
                ::core::fmt::Formatter::write_str(f, "Err"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmRegClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<X86InlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<ArmInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<AArch64InlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<AmdgpuInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<RiscVInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<NvptxInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<PowerPCInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<HexagonInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<LoongArchInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<MipsInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<S390xInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<SparcInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<SpirVInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<WasmInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<XtensaInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<BpfInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<AvrInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<Msp430InlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<M68kInlineAsmRegClass>;
        let _: ::core::cmp::AssertParamIsEq<CSKYInlineAsmRegClass>;
    }
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmRegClass { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmRegClass {
    #[inline]
    fn eq(&self, other: &InlineAsmRegClass) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmRegClass::X86(__self_0),
                    InlineAsmRegClass::X86(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Arm(__self_0),
                    InlineAsmRegClass::Arm(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::AArch64(__self_0),
                    InlineAsmRegClass::AArch64(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::Amdgpu(__self_0),
                    InlineAsmRegClass::Amdgpu(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::RiscV(__self_0),
                    InlineAsmRegClass::RiscV(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Nvptx(__self_0),
                    InlineAsmRegClass::Nvptx(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::PowerPC(__self_0),
                    InlineAsmRegClass::PowerPC(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::Hexagon(__self_0),
                    InlineAsmRegClass::Hexagon(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::LoongArch(__self_0),
                    InlineAsmRegClass::LoongArch(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::Mips(__self_0),
                    InlineAsmRegClass::Mips(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::S390x(__self_0),
                    InlineAsmRegClass::S390x(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Sparc(__self_0),
                    InlineAsmRegClass::Sparc(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::SpirV(__self_0),
                    InlineAsmRegClass::SpirV(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Wasm(__self_0),
                    InlineAsmRegClass::Wasm(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Xtensa(__self_0),
                    InlineAsmRegClass::Xtensa(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::Bpf(__self_0),
                    InlineAsmRegClass::Bpf(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Avr(__self_0),
                    InlineAsmRegClass::Avr(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::Msp430(__self_0),
                    InlineAsmRegClass::Msp430(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegClass::M68k(__self_0),
                    InlineAsmRegClass::M68k(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmRegClass::CSKY(__self_0),
                    InlineAsmRegClass::CSKY(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InlineAsmRegClass {
    #[inline]
    fn partial_cmp(&self, other: &InlineAsmRegClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (InlineAsmRegClass::X86(__self_0),
                InlineAsmRegClass::X86(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Arm(__self_0),
                InlineAsmRegClass::Arm(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::AArch64(__self_0),
                InlineAsmRegClass::AArch64(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Amdgpu(__self_0),
                InlineAsmRegClass::Amdgpu(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::RiscV(__self_0),
                InlineAsmRegClass::RiscV(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Nvptx(__self_0),
                InlineAsmRegClass::Nvptx(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::PowerPC(__self_0),
                InlineAsmRegClass::PowerPC(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Hexagon(__self_0),
                InlineAsmRegClass::Hexagon(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::LoongArch(__self_0),
                InlineAsmRegClass::LoongArch(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Mips(__self_0),
                InlineAsmRegClass::Mips(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::S390x(__self_0),
                InlineAsmRegClass::S390x(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Sparc(__self_0),
                InlineAsmRegClass::Sparc(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::SpirV(__self_0),
                InlineAsmRegClass::SpirV(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Wasm(__self_0),
                InlineAsmRegClass::Wasm(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Xtensa(__self_0),
                InlineAsmRegClass::Xtensa(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Bpf(__self_0),
                InlineAsmRegClass::Bpf(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Avr(__self_0),
                InlineAsmRegClass::Avr(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::Msp430(__self_0),
                InlineAsmRegClass::Msp430(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::M68k(__self_0),
                InlineAsmRegClass::M68k(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegClass::CSKY(__self_0),
                InlineAsmRegClass::CSKY(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmRegClass {
    #[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);
        match self {
            InlineAsmRegClass::X86(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Arm(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::AArch64(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Amdgpu(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::RiscV(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Nvptx(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::PowerPC(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Hexagon(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::LoongArch(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Mips(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::S390x(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Sparc(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::SpirV(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Wasm(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Xtensa(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Bpf(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Avr(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::Msp430(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::M68k(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegClass::CSKY(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
492#[derive(const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            InlineAsmRegClass {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                ::std::mem::discriminant(self).stable_hash(__hcx, __hasher);
                match *self {
                    InlineAsmRegClass::X86(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Arm(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::AArch64(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Amdgpu(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::RiscV(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Nvptx(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::PowerPC(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Hexagon(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::LoongArch(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Mips(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::S390x(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Sparc(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::SpirV(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Wasm(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Xtensa(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Bpf(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Avr(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Msp430(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::M68k(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::CSKY(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegClass::Err => {}
                }
            }
        }
    };StableHash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmRegClass {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmRegClass::X86(ref __binding_0) => { 0usize }
                        InlineAsmRegClass::Arm(ref __binding_0) => { 1usize }
                        InlineAsmRegClass::AArch64(ref __binding_0) => { 2usize }
                        InlineAsmRegClass::Amdgpu(ref __binding_0) => { 3usize }
                        InlineAsmRegClass::RiscV(ref __binding_0) => { 4usize }
                        InlineAsmRegClass::Nvptx(ref __binding_0) => { 5usize }
                        InlineAsmRegClass::PowerPC(ref __binding_0) => { 6usize }
                        InlineAsmRegClass::Hexagon(ref __binding_0) => { 7usize }
                        InlineAsmRegClass::LoongArch(ref __binding_0) => { 8usize }
                        InlineAsmRegClass::Mips(ref __binding_0) => { 9usize }
                        InlineAsmRegClass::S390x(ref __binding_0) => { 10usize }
                        InlineAsmRegClass::Sparc(ref __binding_0) => { 11usize }
                        InlineAsmRegClass::SpirV(ref __binding_0) => { 12usize }
                        InlineAsmRegClass::Wasm(ref __binding_0) => { 13usize }
                        InlineAsmRegClass::Xtensa(ref __binding_0) => { 14usize }
                        InlineAsmRegClass::Bpf(ref __binding_0) => { 15usize }
                        InlineAsmRegClass::Avr(ref __binding_0) => { 16usize }
                        InlineAsmRegClass::Msp430(ref __binding_0) => { 17usize }
                        InlineAsmRegClass::M68k(ref __binding_0) => { 18usize }
                        InlineAsmRegClass::CSKY(ref __binding_0) => { 19usize }
                        InlineAsmRegClass::Err => { 20usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmRegClass::X86(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Arm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::AArch64(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Amdgpu(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::RiscV(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Nvptx(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::PowerPC(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Hexagon(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::LoongArch(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Mips(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::S390x(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Sparc(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::SpirV(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Wasm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Xtensa(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Bpf(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Avr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Msp430(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::M68k(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::CSKY(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegClass::Err => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmRegClass {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmRegClass::X86(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        InlineAsmRegClass::Arm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        InlineAsmRegClass::AArch64(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        InlineAsmRegClass::Amdgpu(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        InlineAsmRegClass::RiscV(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        InlineAsmRegClass::Nvptx(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        InlineAsmRegClass::PowerPC(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        InlineAsmRegClass::Hexagon(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        InlineAsmRegClass::LoongArch(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        InlineAsmRegClass::Mips(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        InlineAsmRegClass::S390x(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        InlineAsmRegClass::Sparc(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        InlineAsmRegClass::SpirV(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => {
                        InlineAsmRegClass::Wasm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    14usize => {
                        InlineAsmRegClass::Xtensa(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    15usize => {
                        InlineAsmRegClass::Bpf(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    16usize => {
                        InlineAsmRegClass::Avr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    17usize => {
                        InlineAsmRegClass::Msp430(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        InlineAsmRegClass::M68k(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => {
                        InlineAsmRegClass::CSKY(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    20usize => { InlineAsmRegClass::Err }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmRegClass`, expected 0..21, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable)]
493pub enum InlineAsmRegClass {
494    X86(X86InlineAsmRegClass),
495    Arm(ArmInlineAsmRegClass),
496    AArch64(AArch64InlineAsmRegClass),
497    Amdgpu(AmdgpuInlineAsmRegClass),
498    RiscV(RiscVInlineAsmRegClass),
499    Nvptx(NvptxInlineAsmRegClass),
500    PowerPC(PowerPCInlineAsmRegClass),
501    Hexagon(HexagonInlineAsmRegClass),
502    LoongArch(LoongArchInlineAsmRegClass),
503    Mips(MipsInlineAsmRegClass),
504    S390x(S390xInlineAsmRegClass),
505    Sparc(SparcInlineAsmRegClass),
506    SpirV(SpirVInlineAsmRegClass),
507    Wasm(WasmInlineAsmRegClass),
508    Xtensa(XtensaInlineAsmRegClass),
509    Bpf(BpfInlineAsmRegClass),
510    Avr(AvrInlineAsmRegClass),
511    Msp430(Msp430InlineAsmRegClass),
512    M68k(M68kInlineAsmRegClass),
513    CSKY(CSKYInlineAsmRegClass),
514    // Placeholder for invalid register constraints for the current target
515    Err,
516}
517
518impl InlineAsmRegClass {
519    pub fn name(self) -> Symbol {
520        match self {
521            Self::X86(r) => r.name(),
522            Self::Arm(r) => r.name(),
523            Self::AArch64(r) => r.name(),
524            Self::Amdgpu(r) => r.name(),
525            Self::RiscV(r) => r.name(),
526            Self::Nvptx(r) => r.name(),
527            Self::PowerPC(r) => r.name(),
528            Self::Hexagon(r) => r.name(),
529            Self::LoongArch(r) => r.name(),
530            Self::Mips(r) => r.name(),
531            Self::S390x(r) => r.name(),
532            Self::Sparc(r) => r.name(),
533            Self::SpirV(r) => r.name(),
534            Self::Wasm(r) => r.name(),
535            Self::Xtensa(r) => r.name(),
536            Self::Bpf(r) => r.name(),
537            Self::Avr(r) => r.name(),
538            Self::Msp430(r) => r.name(),
539            Self::M68k(r) => r.name(),
540            Self::CSKY(r) => r.name(),
541            Self::Err => rustc_span::sym::reg,
542        }
543    }
544
545    /// Returns a suggested register class to use for this type. This is called
546    /// when `supported_types` fails to give a better error
547    /// message to the user.
548    pub fn suggest_class(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<Self> {
549        match self {
550            Self::X86(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::X86),
551            Self::Arm(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Arm),
552            Self::AArch64(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::AArch64),
553            Self::Amdgpu(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Amdgpu),
554            Self::RiscV(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::RiscV),
555            Self::Nvptx(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Nvptx),
556            Self::PowerPC(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::PowerPC),
557            Self::Hexagon(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Hexagon),
558            Self::LoongArch(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::LoongArch),
559            Self::Mips(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Mips),
560            Self::S390x(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::S390x),
561            Self::Sparc(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Sparc),
562            Self::SpirV(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::SpirV),
563            Self::Wasm(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Wasm),
564            Self::Xtensa(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Xtensa),
565            Self::Bpf(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Bpf),
566            Self::Avr(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Avr),
567            Self::Msp430(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Msp430),
568            Self::M68k(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::M68k),
569            Self::CSKY(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::CSKY),
570            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmRegClass::Err")));
}unreachable!("Use of InlineAsmRegClass::Err"),
571        }
572    }
573
574    /// Returns a suggested template modifier to use for this type and an
575    /// example of a register named formatted with it.
576    ///
577    /// Such suggestions are useful if a type smaller than the full register
578    /// size is used and a modifier can be used to point to the subregister of
579    /// the correct size.
580    pub fn suggest_modifier(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<ModifierInfo> {
581        match self {
582            Self::X86(r) => r.suggest_modifier(arch, ty),
583            Self::Arm(r) => r.suggest_modifier(arch, ty),
584            Self::AArch64(r) => r.suggest_modifier(arch, ty),
585            Self::Amdgpu(r) => r.suggest_modifier(arch, ty),
586            Self::RiscV(r) => r.suggest_modifier(arch, ty),
587            Self::Nvptx(r) => r.suggest_modifier(arch, ty),
588            Self::PowerPC(r) => r.suggest_modifier(arch, ty),
589            Self::Hexagon(r) => r.suggest_modifier(arch, ty),
590            Self::LoongArch(r) => r.suggest_modifier(arch, ty),
591            Self::Mips(r) => r.suggest_modifier(arch, ty),
592            Self::S390x(r) => r.suggest_modifier(arch, ty),
593            Self::Sparc(r) => r.suggest_modifier(arch, ty),
594            Self::SpirV(r) => r.suggest_modifier(arch, ty),
595            Self::Wasm(r) => r.suggest_modifier(arch, ty),
596            Self::Xtensa(r) => r.suggest_modifier(arch, ty),
597            Self::Bpf(r) => r.suggest_modifier(arch, ty),
598            Self::Avr(r) => r.suggest_modifier(arch, ty),
599            Self::Msp430(r) => r.suggest_modifier(arch, ty),
600            Self::M68k(r) => r.suggest_modifier(arch, ty),
601            Self::CSKY(r) => r.suggest_modifier(arch, ty),
602            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmRegClass::Err")));
}unreachable!("Use of InlineAsmRegClass::Err"),
603        }
604    }
605
606    /// Returns the default modifier for this register and an example of a
607    /// register named formatted with it.
608    ///
609    /// This is only needed when the register class can suggest a modifier, so
610    /// that the user can be shown how to get the default behavior without a
611    /// warning.
612    pub fn default_modifier(self, arch: InlineAsmArch) -> Option<ModifierInfo> {
613        match self {
614            Self::X86(r) => r.default_modifier(arch),
615            Self::Arm(r) => r.default_modifier(arch),
616            Self::AArch64(r) => r.default_modifier(arch),
617            Self::Amdgpu(r) => r.default_modifier(arch),
618            Self::RiscV(r) => r.default_modifier(arch),
619            Self::Nvptx(r) => r.default_modifier(arch),
620            Self::PowerPC(r) => r.default_modifier(arch),
621            Self::Hexagon(r) => r.default_modifier(arch),
622            Self::LoongArch(r) => r.default_modifier(arch),
623            Self::Mips(r) => r.default_modifier(arch),
624            Self::S390x(r) => r.default_modifier(arch),
625            Self::Sparc(r) => r.default_modifier(arch),
626            Self::SpirV(r) => r.default_modifier(arch),
627            Self::Wasm(r) => r.default_modifier(arch),
628            Self::Xtensa(r) => r.default_modifier(arch),
629            Self::Bpf(r) => r.default_modifier(arch),
630            Self::Avr(r) => r.default_modifier(arch),
631            Self::Msp430(r) => r.default_modifier(arch),
632            Self::M68k(r) => r.default_modifier(arch),
633            Self::CSKY(r) => r.default_modifier(arch),
634            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmRegClass::Err")));
}unreachable!("Use of InlineAsmRegClass::Err"),
635        }
636    }
637
638    /// Returns a list of supported types for this register class, each with an
639    /// options target feature required to use this type.
640    ///
641    /// At the codegen stage, it is fine to always pass true for `allow_experimental_reg`,
642    /// since all the stability checking will have been done in prior stages.
643    pub fn supported_types(
644        self,
645        arch: InlineAsmArch,
646        allow_experimental_reg: bool,
647    ) -> Cow<'static, [(InlineAsmType, Option<Symbol>)]> {
648        match self {
649            Self::X86(r) => r.supported_types(arch, allow_experimental_reg).into(),
650            Self::Arm(r) => r.supported_types(arch).into(),
651            Self::AArch64(r) => r.supported_types(arch, allow_experimental_reg).into(),
652            Self::Amdgpu(r) => r.supported_types(arch).into(),
653            Self::RiscV(r) => r.supported_types(arch).into(),
654            Self::Nvptx(r) => r.supported_types(arch).into(),
655            Self::PowerPC(r) => r.supported_types(arch).into(),
656            Self::Hexagon(r) => r.supported_types(arch).into(),
657            Self::LoongArch(r) => r.supported_types(arch, allow_experimental_reg).into(),
658            Self::Mips(r) => r.supported_types(arch).into(),
659            Self::S390x(r) => r.supported_types(arch).into(),
660            Self::Sparc(r) => r.supported_types(arch).into(),
661            Self::SpirV(r) => r.supported_types(arch).into(),
662            Self::Wasm(r) => r.supported_types(arch).into(),
663            Self::Xtensa(r) => r.supported_types(arch).into(),
664            Self::Bpf(r) => r.supported_types(arch).into(),
665            Self::Avr(r) => r.supported_types(arch).into(),
666            Self::Msp430(r) => r.supported_types(arch).into(),
667            Self::M68k(r) => r.supported_types(arch).into(),
668            Self::CSKY(r) => r.supported_types(arch).into(),
669            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmRegClass::Err")));
}unreachable!("Use of InlineAsmRegClass::Err"),
670        }
671    }
672
673    pub fn parse(arch: InlineAsmArch, name: Symbol) -> Result<Self, &'static [rustc_span::Symbol]> {
674        Ok(match arch {
675            InlineAsmArch::X86 | InlineAsmArch::X86_64 => {
676                Self::X86(X86InlineAsmRegClass::parse(name)?)
677            }
678            InlineAsmArch::Arm => Self::Arm(ArmInlineAsmRegClass::parse(name)?),
679            InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
680                Self::AArch64(AArch64InlineAsmRegClass::parse(name)?)
681            }
682            InlineAsmArch::Amdgpu => Self::Amdgpu(AmdgpuInlineAsmRegClass::parse(name)?),
683            InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
684                Self::RiscV(RiscVInlineAsmRegClass::parse(name)?)
685            }
686            InlineAsmArch::Nvptx64 => Self::Nvptx(NvptxInlineAsmRegClass::parse(name)?),
687            InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
688                Self::PowerPC(PowerPCInlineAsmRegClass::parse(name)?)
689            }
690            InlineAsmArch::Hexagon => Self::Hexagon(HexagonInlineAsmRegClass::parse(name)?),
691            InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
692                Self::LoongArch(LoongArchInlineAsmRegClass::parse(name)?)
693            }
694            InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
695                Self::Mips(MipsInlineAsmRegClass::parse(name)?)
696            }
697            InlineAsmArch::S390x => Self::S390x(S390xInlineAsmRegClass::parse(name)?),
698            InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
699                Self::Sparc(SparcInlineAsmRegClass::parse(name)?)
700            }
701            InlineAsmArch::SpirV => Self::SpirV(SpirVInlineAsmRegClass::parse(name)?),
702            InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
703                Self::Wasm(WasmInlineAsmRegClass::parse(name)?)
704            }
705            InlineAsmArch::Bpf => Self::Bpf(BpfInlineAsmRegClass::parse(name)?),
706            InlineAsmArch::Avr => Self::Avr(AvrInlineAsmRegClass::parse(name)?),
707            InlineAsmArch::Xtensa => Self::Xtensa(XtensaInlineAsmRegClass::parse(name)?),
708            InlineAsmArch::Msp430 => Self::Msp430(Msp430InlineAsmRegClass::parse(name)?),
709            InlineAsmArch::M68k => Self::M68k(M68kInlineAsmRegClass::parse(name)?),
710            InlineAsmArch::CSKY => Self::CSKY(CSKYInlineAsmRegClass::parse(name)?),
711        })
712    }
713
714    /// Returns the list of template modifiers that can be used with this
715    /// register class.
716    pub fn valid_modifiers(self, arch: InlineAsmArch) -> &'static [char] {
717        match self {
718            Self::X86(r) => r.valid_modifiers(arch),
719            Self::Arm(r) => r.valid_modifiers(arch),
720            Self::AArch64(r) => r.valid_modifiers(arch),
721            Self::Amdgpu(r) => r.valid_modifiers(arch),
722            Self::RiscV(r) => r.valid_modifiers(arch),
723            Self::Nvptx(r) => r.valid_modifiers(arch),
724            Self::PowerPC(r) => r.valid_modifiers(arch),
725            Self::Hexagon(r) => r.valid_modifiers(arch),
726            Self::LoongArch(r) => r.valid_modifiers(arch),
727            Self::Mips(r) => r.valid_modifiers(arch),
728            Self::S390x(r) => r.valid_modifiers(arch),
729            Self::Sparc(r) => r.valid_modifiers(arch),
730            Self::SpirV(r) => r.valid_modifiers(arch),
731            Self::Wasm(r) => r.valid_modifiers(arch),
732            Self::Xtensa(r) => r.valid_modifiers(arch),
733            Self::Bpf(r) => r.valid_modifiers(arch),
734            Self::Avr(r) => r.valid_modifiers(arch),
735            Self::Msp430(r) => r.valid_modifiers(arch),
736            Self::M68k(r) => r.valid_modifiers(arch),
737            Self::CSKY(r) => r.valid_modifiers(arch),
738            Self::Err => {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("Use of InlineAsmRegClass::Err")));
}unreachable!("Use of InlineAsmRegClass::Err"),
739        }
740    }
741
742    /// Returns whether registers in this class can only be used as clobbers
743    /// and not as inputs/outputs.
744    ///
745    /// At the codegen stage, it is fine to always pass true for `allow_experimental_reg`,
746    /// since all the stability checking will have been done in prior stages.
747    pub fn is_clobber_only(self, arch: InlineAsmArch, allow_experimental_reg: bool) -> bool {
748        self.supported_types(arch, allow_experimental_reg).is_empty()
749    }
750}
751
752#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmRegOrRegClass { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmRegOrRegClass { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmRegOrRegClass {
    #[inline]
    fn clone(&self) -> InlineAsmRegOrRegClass {
        let _: ::core::clone::AssertParamIsClone<InlineAsmReg>;
        let _: ::core::clone::AssertParamIsClone<InlineAsmRegClass>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmRegOrRegClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmRegOrRegClass::Reg(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Reg",
                    &__self_0),
            InlineAsmRegOrRegClass::RegClass(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "RegClass", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmRegOrRegClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<InlineAsmReg>;
        let _: ::core::cmp::AssertParamIsEq<InlineAsmRegClass>;
    }
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmRegOrRegClass { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmRegOrRegClass {
    #[inline]
    fn eq(&self, other: &InlineAsmRegOrRegClass) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmRegOrRegClass::Reg(__self_0),
                    InlineAsmRegOrRegClass::Reg(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmRegOrRegClass::RegClass(__self_0),
                    InlineAsmRegOrRegClass::RegClass(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InlineAsmRegOrRegClass {
    #[inline]
    fn partial_cmp(&self, other: &InlineAsmRegOrRegClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (InlineAsmRegOrRegClass::Reg(__self_0),
                InlineAsmRegOrRegClass::Reg(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (InlineAsmRegOrRegClass::RegClass(__self_0),
                InlineAsmRegOrRegClass::RegClass(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmRegOrRegClass {
    #[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);
        match self {
            InlineAsmRegOrRegClass::Reg(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmRegOrRegClass::RegClass(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
753#[derive(const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            InlineAsmRegOrRegClass {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                ::std::mem::discriminant(self).stable_hash(__hcx, __hasher);
                match *self {
                    InlineAsmRegOrRegClass::Reg(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                    InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                }
            }
        }
    };StableHash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmRegOrRegClass {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmRegOrRegClass::Reg(ref __binding_0) => { 0usize }
                        InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmRegOrRegClass::Reg(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmRegOrRegClass {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmRegOrRegClass::Reg(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        InlineAsmRegOrRegClass::RegClass(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmRegOrRegClass`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable)]
754pub enum InlineAsmRegOrRegClass {
755    Reg(InlineAsmReg),
756    RegClass(InlineAsmRegClass),
757}
758
759impl InlineAsmRegOrRegClass {
760    pub fn reg_class(self) -> InlineAsmRegClass {
761        match self {
762            Self::Reg(r) => r.reg_class(),
763            Self::RegClass(r) => r,
764        }
765    }
766}
767
768impl fmt::Display for InlineAsmRegOrRegClass {
769    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
770        match self {
771            Self::Reg(r) => f.write_fmt(format_args!("\"{0}\"", r.name()))write!(f, "\"{}\"", r.name()),
772            Self::RegClass(r) => f.write_fmt(format_args!("{0}", r.name()))write!(f, "{}", r.name()),
773        }
774    }
775}
776
777/// Set of types which can be used with a particular register class.
778#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmType { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmType { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmType {
    #[inline]
    fn clone(&self) -> InlineAsmType {
        let _: ::core::clone::AssertParamIsClone<u64>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmType::I8 => ::core::fmt::Formatter::write_str(f, "I8"),
            InlineAsmType::I16 => ::core::fmt::Formatter::write_str(f, "I16"),
            InlineAsmType::I32 => ::core::fmt::Formatter::write_str(f, "I32"),
            InlineAsmType::I64 => ::core::fmt::Formatter::write_str(f, "I64"),
            InlineAsmType::I128 =>
                ::core::fmt::Formatter::write_str(f, "I128"),
            InlineAsmType::F16 => ::core::fmt::Formatter::write_str(f, "F16"),
            InlineAsmType::F32 => ::core::fmt::Formatter::write_str(f, "F32"),
            InlineAsmType::F64 => ::core::fmt::Formatter::write_str(f, "F64"),
            InlineAsmType::F128 =>
                ::core::fmt::Formatter::write_str(f, "F128"),
            InlineAsmType::VecI8(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecI8",
                    &__self_0),
            InlineAsmType::VecI16(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecI16",
                    &__self_0),
            InlineAsmType::VecI32(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecI32",
                    &__self_0),
            InlineAsmType::VecI64(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecI64",
                    &__self_0),
            InlineAsmType::VecI128(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "VecI128", &__self_0),
            InlineAsmType::VecF16(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecF16",
                    &__self_0),
            InlineAsmType::VecF32(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecF32",
                    &__self_0),
            InlineAsmType::VecF64(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "VecF64",
                    &__self_0),
            InlineAsmType::VecF128(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "VecF128", &__self_0),
            InlineAsmType::SveVecI8 =>
                ::core::fmt::Formatter::write_str(f, "SveVecI8"),
            InlineAsmType::SveVecI16 =>
                ::core::fmt::Formatter::write_str(f, "SveVecI16"),
            InlineAsmType::SveVecI32 =>
                ::core::fmt::Formatter::write_str(f, "SveVecI32"),
            InlineAsmType::SveVecI64 =>
                ::core::fmt::Formatter::write_str(f, "SveVecI64"),
            InlineAsmType::SveVecI128 =>
                ::core::fmt::Formatter::write_str(f, "SveVecI128"),
            InlineAsmType::SveVecF16 =>
                ::core::fmt::Formatter::write_str(f, "SveVecF16"),
            InlineAsmType::SveVecF32 =>
                ::core::fmt::Formatter::write_str(f, "SveVecF32"),
            InlineAsmType::SveVecF64 =>
                ::core::fmt::Formatter::write_str(f, "SveVecF64"),
            InlineAsmType::SveVecF128 =>
                ::core::fmt::Formatter::write_str(f, "SveVecF128"),
            InlineAsmType::SveVecBool =>
                ::core::fmt::Formatter::write_str(f, "SveVecBool"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
    }
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmType { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmType {
    #[inline]
    fn eq(&self, other: &InlineAsmType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmType::VecI8(__self_0),
                    InlineAsmType::VecI8(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecI16(__self_0),
                    InlineAsmType::VecI16(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecI32(__self_0),
                    InlineAsmType::VecI32(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecI64(__self_0),
                    InlineAsmType::VecI64(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecI128(__self_0),
                    InlineAsmType::VecI128(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecF16(__self_0),
                    InlineAsmType::VecF16(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecF32(__self_0),
                    InlineAsmType::VecF32(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecF64(__self_0),
                    InlineAsmType::VecF64(__arg1_0)) => __self_0 == __arg1_0,
                (InlineAsmType::VecF128(__self_0),
                    InlineAsmType::VecF128(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq)]
779pub enum InlineAsmType {
780    I8,
781    I16,
782    I32,
783    I64,
784    I128,
785    F16,
786    F32,
787    F64,
788    F128,
789    VecI8(u64),
790    VecI16(u64),
791    VecI32(u64),
792    VecI64(u64),
793    VecI128(u64),
794    VecF16(u64),
795    VecF32(u64),
796    VecF64(u64),
797    VecF128(u64),
798    SveVecI8,
799    SveVecI16,
800    SveVecI32,
801    SveVecI64,
802    SveVecI128,
803    SveVecF16,
804    SveVecF32,
805    SveVecF64,
806    SveVecF128,
807    SveVecBool,
808}
809
810#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmSize { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmSize { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmSize {
    #[inline]
    fn clone(&self) -> InlineAsmSize {
        let _: ::core::clone::AssertParamIsClone<u64>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmSize {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmSize::FixedBytes(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "FixedBytes", &__self_0),
            InlineAsmSize::Scalable =>
                ::core::fmt::Formatter::write_str(f, "Scalable"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmSize {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
    }
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmSize { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmSize {
    #[inline]
    fn eq(&self, other: &InlineAsmSize) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmSize::FixedBytes(__self_0),
                    InlineAsmSize::FixedBytes(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq)]
811pub enum InlineAsmSize {
812    FixedBytes(u64),
813    Scalable,
814}
815
816impl InlineAsmSize {
817    pub fn fixed_size_bytes(self) -> Option<u64> {
818        match self {
819            Self::FixedBytes(size) => Some(size),
820            Self::Scalable => None,
821        }
822    }
823}
824
825impl InlineAsmType {
826    pub fn is_integer(self) -> bool {
827        #[allow(non_exhaustive_omitted_patterns)] match self {
    Self::I8 | Self::I16 | Self::I32 | Self::I64 | Self::I128 => true,
    _ => false,
}matches!(self, Self::I8 | Self::I16 | Self::I32 | Self::I64 | Self::I128)
828    }
829
830    pub fn size(self) -> InlineAsmSize {
831        match self {
832            Self::I8 => InlineAsmSize::FixedBytes(1),
833            Self::I16 | Self::F16 => InlineAsmSize::FixedBytes(2),
834            Self::I32 | Self::F32 => InlineAsmSize::FixedBytes(4),
835            Self::I64 | Self::F64 => InlineAsmSize::FixedBytes(8),
836            Self::I128 | Self::F128 => InlineAsmSize::FixedBytes(16),
837            Self::VecI8(n) => InlineAsmSize::FixedBytes(n),
838            Self::VecI16(n) | Self::VecF16(n) => InlineAsmSize::FixedBytes(n * 2),
839            Self::VecI32(n) | Self::VecF32(n) => InlineAsmSize::FixedBytes(n * 4),
840            Self::VecI64(n) | Self::VecF64(n) => InlineAsmSize::FixedBytes(n * 8),
841            Self::VecI128(n) | Self::VecF128(n) => InlineAsmSize::FixedBytes(n * 16),
842            Self::SveVecI8
843            | Self::SveVecI16
844            | Self::SveVecI32
845            | Self::SveVecI64
846            | Self::SveVecI128
847            | Self::SveVecF16
848            | Self::SveVecF32
849            | Self::SveVecF64
850            | Self::SveVecF128
851            | Self::SveVecBool => InlineAsmSize::Scalable,
852        }
853    }
854}
855
856impl fmt::Display for InlineAsmType {
857    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
858        match *self {
859            Self::I8 => f.write_str("i8"),
860            Self::I16 => f.write_str("i16"),
861            Self::I32 => f.write_str("i32"),
862            Self::I64 => f.write_str("i64"),
863            Self::I128 => f.write_str("i128"),
864            Self::F16 => f.write_str("f16"),
865            Self::F32 => f.write_str("f32"),
866            Self::F64 => f.write_str("f64"),
867            Self::F128 => f.write_str("f128"),
868            Self::VecI8(n) => f.write_fmt(format_args!("i8x{0}", n))write!(f, "i8x{n}"),
869            Self::VecI16(n) => f.write_fmt(format_args!("i16x{0}", n))write!(f, "i16x{n}"),
870            Self::VecI32(n) => f.write_fmt(format_args!("i32x{0}", n))write!(f, "i32x{n}"),
871            Self::VecI64(n) => f.write_fmt(format_args!("i64x{0}", n))write!(f, "i64x{n}"),
872            Self::VecI128(n) => f.write_fmt(format_args!("i128x{0}", n))write!(f, "i128x{n}"),
873            Self::VecF16(n) => f.write_fmt(format_args!("f16x{0}", n))write!(f, "f16x{n}"),
874            Self::VecF32(n) => f.write_fmt(format_args!("f32x{0}", n))write!(f, "f32x{n}"),
875            Self::VecF64(n) => f.write_fmt(format_args!("f64x{0}", n))write!(f, "f64x{n}"),
876            Self::VecF128(n) => f.write_fmt(format_args!("f128x{0}", n))write!(f, "f128x{n}"),
877            Self::SveVecI8 => f.write_str("svint8_t"),
878            Self::SveVecI16 => f.write_str("svint16_t"),
879            Self::SveVecI32 => f.write_str("svint32_t"),
880            Self::SveVecI64 => f.write_str("svint64_t"),
881            Self::SveVecI128 => f.write_str("svint128_t"),
882            Self::SveVecF16 => f.write_str("svfloat26_t"),
883            Self::SveVecF32 => f.write_str("svfloat32_t"),
884            Self::SveVecF64 => f.write_str("svfloat64_t"),
885            Self::SveVecF128 => f.write_str("svfloat128_t"),
886            Self::SveVecBool => f.write_str("svbool_t"),
887        }
888    }
889}
890
891/// Returns the full set of allocatable registers for a given architecture.
892///
893/// The registers are structured as a map containing the set of allocatable
894/// registers in each register class. A particular register may be allocatable
895/// from multiple register classes, in which case it will appear multiple times
896/// in the map.
897// NOTE: This function isn't used at the moment, but is needed to support
898// falling back to an external assembler.
899pub fn allocatable_registers(
900    arch: InlineAsmArch,
901    reloc_model: RelocModel,
902    target_features: &FxIndexSet<Symbol>,
903    target: &crate::spec::Target,
904) -> FxHashMap<InlineAsmRegClass, FxIndexSet<InlineAsmReg>> {
905    match arch {
906        InlineAsmArch::X86 | InlineAsmArch::X86_64 => {
907            let mut map = x86::regclass_map();
908            x86::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
909            map
910        }
911        InlineAsmArch::Arm => {
912            let mut map = arm::regclass_map();
913            arm::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
914            map
915        }
916        InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
917            let mut map = aarch64::regclass_map();
918            aarch64::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
919            map
920        }
921        InlineAsmArch::Amdgpu => {
922            let mut map = amdgpu::regclass_map();
923            amdgpu::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
924            map
925        }
926        InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
927            let mut map = riscv::regclass_map();
928            riscv::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
929            map
930        }
931        InlineAsmArch::Nvptx64 => {
932            let mut map = nvptx::regclass_map();
933            nvptx::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
934            map
935        }
936        InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
937            let mut map = powerpc::regclass_map();
938            powerpc::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
939            map
940        }
941        InlineAsmArch::Hexagon => {
942            let mut map = hexagon::regclass_map();
943            hexagon::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
944            map
945        }
946        InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
947            let mut map = loongarch::regclass_map();
948            loongarch::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
949            map
950        }
951        InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
952            let mut map = mips::regclass_map();
953            mips::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
954            map
955        }
956        InlineAsmArch::S390x => {
957            let mut map = s390x::regclass_map();
958            s390x::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
959            map
960        }
961        InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
962            let mut map = sparc::regclass_map();
963            sparc::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
964            map
965        }
966        InlineAsmArch::SpirV => {
967            let mut map = spirv::regclass_map();
968            spirv::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
969            map
970        }
971        InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
972            let mut map = wasm::regclass_map();
973            wasm::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
974            map
975        }
976        InlineAsmArch::Xtensa => {
977            let mut map = xtensa::regclass_map();
978            xtensa::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
979            map
980        }
981        InlineAsmArch::Bpf => {
982            let mut map = bpf::regclass_map();
983            bpf::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
984            map
985        }
986        InlineAsmArch::Avr => {
987            let mut map = avr::regclass_map();
988            avr::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
989            map
990        }
991        InlineAsmArch::Msp430 => {
992            let mut map = msp430::regclass_map();
993            msp430::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
994            map
995        }
996        InlineAsmArch::M68k => {
997            let mut map = m68k::regclass_map();
998            m68k::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
999            map
1000        }
1001        InlineAsmArch::CSKY => {
1002            let mut map = csky::regclass_map();
1003            csky::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
1004            map
1005        }
1006    }
1007}
1008
1009#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmClobberAbi { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for InlineAsmClobberAbi { }
#[automatically_derived]
impl ::core::clone::Clone for InlineAsmClobberAbi {
    #[inline]
    fn clone(&self) -> InlineAsmClobberAbi { *self }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmClobberAbi {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                InlineAsmClobberAbi::X86 => "X86",
                InlineAsmClobberAbi::X86_64Win => "X86_64Win",
                InlineAsmClobberAbi::X86_64SysV => "X86_64SysV",
                InlineAsmClobberAbi::Arm => "Arm",
                InlineAsmClobberAbi::AArch64 => "AArch64",
                InlineAsmClobberAbi::AArch64NoX18 => "AArch64NoX18",
                InlineAsmClobberAbi::Arm64EC => "Arm64EC",
                InlineAsmClobberAbi::Avr => "Avr",
                InlineAsmClobberAbi::RiscV => "RiscV",
                InlineAsmClobberAbi::RiscVE => "RiscVE",
                InlineAsmClobberAbi::LoongArch => "LoongArch",
                InlineAsmClobberAbi::PowerPC => "PowerPC",
                InlineAsmClobberAbi::PowerPCSPE => "PowerPCSPE",
                InlineAsmClobberAbi::S390x => "S390x",
                InlineAsmClobberAbi::Bpf => "Bpf",
                InlineAsmClobberAbi::Msp430 => "Msp430",
                InlineAsmClobberAbi::Xtensa => "Xtensa",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmClobberAbi {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for InlineAsmClobberAbi { }
#[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmClobberAbi {
    #[inline]
    fn eq(&self, other: &InlineAsmClobberAbi) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InlineAsmClobberAbi {
    #[inline]
    fn partial_cmp(&self, other: &InlineAsmClobberAbi)
        -> ::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)
    }
}PartialOrd, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmClobberAbi {
    #[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)
    }
}Hash)]
1010#[derive(const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            InlineAsmClobberAbi {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                ::std::mem::discriminant(self).stable_hash(__hcx, __hasher);
                match *self {
                    InlineAsmClobberAbi::X86 => {}
                    InlineAsmClobberAbi::X86_64Win => {}
                    InlineAsmClobberAbi::X86_64SysV => {}
                    InlineAsmClobberAbi::Arm => {}
                    InlineAsmClobberAbi::AArch64 => {}
                    InlineAsmClobberAbi::AArch64NoX18 => {}
                    InlineAsmClobberAbi::Arm64EC => {}
                    InlineAsmClobberAbi::Avr => {}
                    InlineAsmClobberAbi::RiscV => {}
                    InlineAsmClobberAbi::RiscVE => {}
                    InlineAsmClobberAbi::LoongArch => {}
                    InlineAsmClobberAbi::PowerPC => {}
                    InlineAsmClobberAbi::PowerPCSPE => {}
                    InlineAsmClobberAbi::S390x => {}
                    InlineAsmClobberAbi::Bpf => {}
                    InlineAsmClobberAbi::Msp430 => {}
                    InlineAsmClobberAbi::Xtensa => {}
                }
            }
        }
    };StableHash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmClobberAbi {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmClobberAbi::X86 => { 0usize }
                        InlineAsmClobberAbi::X86_64Win => { 1usize }
                        InlineAsmClobberAbi::X86_64SysV => { 2usize }
                        InlineAsmClobberAbi::Arm => { 3usize }
                        InlineAsmClobberAbi::AArch64 => { 4usize }
                        InlineAsmClobberAbi::AArch64NoX18 => { 5usize }
                        InlineAsmClobberAbi::Arm64EC => { 6usize }
                        InlineAsmClobberAbi::Avr => { 7usize }
                        InlineAsmClobberAbi::RiscV => { 8usize }
                        InlineAsmClobberAbi::RiscVE => { 9usize }
                        InlineAsmClobberAbi::LoongArch => { 10usize }
                        InlineAsmClobberAbi::PowerPC => { 11usize }
                        InlineAsmClobberAbi::PowerPCSPE => { 12usize }
                        InlineAsmClobberAbi::S390x => { 13usize }
                        InlineAsmClobberAbi::Bpf => { 14usize }
                        InlineAsmClobberAbi::Msp430 => { 15usize }
                        InlineAsmClobberAbi::Xtensa => { 16usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmClobberAbi {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { InlineAsmClobberAbi::X86 }
                    1usize => { InlineAsmClobberAbi::X86_64Win }
                    2usize => { InlineAsmClobberAbi::X86_64SysV }
                    3usize => { InlineAsmClobberAbi::Arm }
                    4usize => { InlineAsmClobberAbi::AArch64 }
                    5usize => { InlineAsmClobberAbi::AArch64NoX18 }
                    6usize => { InlineAsmClobberAbi::Arm64EC }
                    7usize => { InlineAsmClobberAbi::Avr }
                    8usize => { InlineAsmClobberAbi::RiscV }
                    9usize => { InlineAsmClobberAbi::RiscVE }
                    10usize => { InlineAsmClobberAbi::LoongArch }
                    11usize => { InlineAsmClobberAbi::PowerPC }
                    12usize => { InlineAsmClobberAbi::PowerPCSPE }
                    13usize => { InlineAsmClobberAbi::S390x }
                    14usize => { InlineAsmClobberAbi::Bpf }
                    15usize => { InlineAsmClobberAbi::Msp430 }
                    16usize => { InlineAsmClobberAbi::Xtensa }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmClobberAbi`, expected 0..17, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable)]
1011pub enum InlineAsmClobberAbi {
1012    X86,
1013    X86_64Win,
1014    X86_64SysV,
1015    Arm,
1016    AArch64,
1017    AArch64NoX18,
1018    Arm64EC,
1019    Avr,
1020    RiscV,
1021    RiscVE,
1022    LoongArch,
1023    PowerPC,
1024    PowerPCSPE,
1025    S390x,
1026    Bpf,
1027    Msp430,
1028    Xtensa,
1029}
1030
1031impl InlineAsmClobberAbi {
1032    /// Parses a clobber ABI for the given target, or returns a list of supported
1033    /// clobber ABIs for the target.
1034    pub fn parse(
1035        arch: InlineAsmArch,
1036        target: &Target,
1037        target_features: &FxIndexSet<Symbol>,
1038        name: Symbol,
1039    ) -> Result<Self, &'static [&'static str]> {
1040        let name = name.as_str();
1041        match arch {
1042            InlineAsmArch::X86 => match name {
1043                "C" | "system" | "efiapi" | "cdecl" | "stdcall" | "fastcall" => {
1044                    Ok(InlineAsmClobberAbi::X86)
1045                }
1046                _ => Err(&["C", "system", "efiapi", "cdecl", "stdcall", "fastcall"]),
1047            },
1048            InlineAsmArch::X86_64 => match name {
1049                "C" | "system" if !target.is_like_windows => Ok(InlineAsmClobberAbi::X86_64SysV),
1050                "C" | "system" if target.is_like_windows => Ok(InlineAsmClobberAbi::X86_64Win),
1051                "win64" | "efiapi" => Ok(InlineAsmClobberAbi::X86_64Win),
1052                "sysv64" => Ok(InlineAsmClobberAbi::X86_64SysV),
1053                _ => Err(&["C", "system", "efiapi", "win64", "sysv64"]),
1054            },
1055            InlineAsmArch::Arm => match name {
1056                "C" | "system" | "efiapi" | "aapcs" => Ok(InlineAsmClobberAbi::Arm),
1057                _ => Err(&["C", "system", "efiapi", "aapcs"]),
1058            },
1059            InlineAsmArch::AArch64 => match name {
1060                "C" | "system" | "efiapi" => {
1061                    Ok(if aarch64::target_reserves_x18(target, target_features) {
1062                        InlineAsmClobberAbi::AArch64NoX18
1063                    } else {
1064                        InlineAsmClobberAbi::AArch64
1065                    })
1066                }
1067                _ => Err(&["C", "system", "efiapi"]),
1068            },
1069            InlineAsmArch::Arm64EC => match name {
1070                "C" | "system" => Ok(InlineAsmClobberAbi::Arm64EC),
1071                _ => Err(&["C", "system"]),
1072            },
1073            InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => match name {
1074                "C" | "system" | "efiapi" => Ok(if riscv::is_e(target_features) {
1075                    InlineAsmClobberAbi::RiscVE
1076                } else {
1077                    InlineAsmClobberAbi::RiscV
1078                }),
1079                _ => Err(&["C", "system", "efiapi"]),
1080            },
1081            InlineAsmArch::Avr => match name {
1082                "C" | "system" => Ok(InlineAsmClobberAbi::Avr),
1083                _ => Err(&["C", "system"]),
1084            },
1085            InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => match name {
1086                "C" | "system" | "efiapi" => Ok(InlineAsmClobberAbi::LoongArch),
1087                _ => Err(&["C", "system", "efiapi"]),
1088            },
1089            InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => match name {
1090                "C" | "system" => Ok(if powerpc::is_spe(target) {
1091                    InlineAsmClobberAbi::PowerPCSPE
1092                } else {
1093                    InlineAsmClobberAbi::PowerPC
1094                }),
1095                _ => Err(&["C", "system"]),
1096            },
1097            InlineAsmArch::S390x => match name {
1098                "C" | "system" => Ok(InlineAsmClobberAbi::S390x),
1099                _ => Err(&["C", "system"]),
1100            },
1101            InlineAsmArch::Bpf => match name {
1102                "C" | "system" => Ok(InlineAsmClobberAbi::Bpf),
1103                _ => Err(&["C", "system"]),
1104            },
1105            InlineAsmArch::Msp430 => match name {
1106                "C" | "system" => Ok(InlineAsmClobberAbi::Msp430),
1107                _ => Err(&["C", "system"]),
1108            },
1109            InlineAsmArch::Xtensa => match name {
1110                "C" | "system" => Ok(InlineAsmClobberAbi::Xtensa),
1111                _ => Err(&["C", "system"]),
1112            },
1113            _ => Err(&[]),
1114        }
1115    }
1116
1117    /// Returns the set of registers which are clobbered by this ABI.
1118    pub fn clobbered_regs(self) -> &'static [InlineAsmReg] {
1119        macro_rules! clobbered_regs {
1120            ($arch:ident $arch_reg:ident {
1121                $(
1122                    $reg:ident,
1123                )*
1124            }) => {
1125                &[
1126                    $(InlineAsmReg::$arch($arch_reg::$reg),)*
1127                ]
1128            };
1129        }
1130        match self {
1131            InlineAsmClobberAbi::X86 => &[InlineAsmReg::X86(X86InlineAsmReg::ax),
            InlineAsmReg::X86(X86InlineAsmReg::cx),
            InlineAsmReg::X86(X86InlineAsmReg::dx),
            InlineAsmReg::X86(X86InlineAsmReg::xmm0),
            InlineAsmReg::X86(X86InlineAsmReg::xmm1),
            InlineAsmReg::X86(X86InlineAsmReg::xmm2),
            InlineAsmReg::X86(X86InlineAsmReg::xmm3),
            InlineAsmReg::X86(X86InlineAsmReg::xmm4),
            InlineAsmReg::X86(X86InlineAsmReg::xmm5),
            InlineAsmReg::X86(X86InlineAsmReg::xmm6),
            InlineAsmReg::X86(X86InlineAsmReg::xmm7),
            InlineAsmReg::X86(X86InlineAsmReg::k0),
            InlineAsmReg::X86(X86InlineAsmReg::k1),
            InlineAsmReg::X86(X86InlineAsmReg::k2),
            InlineAsmReg::X86(X86InlineAsmReg::k3),
            InlineAsmReg::X86(X86InlineAsmReg::k4),
            InlineAsmReg::X86(X86InlineAsmReg::k5),
            InlineAsmReg::X86(X86InlineAsmReg::k6),
            InlineAsmReg::X86(X86InlineAsmReg::k7),
            InlineAsmReg::X86(X86InlineAsmReg::mm0),
            InlineAsmReg::X86(X86InlineAsmReg::mm1),
            InlineAsmReg::X86(X86InlineAsmReg::mm2),
            InlineAsmReg::X86(X86InlineAsmReg::mm3),
            InlineAsmReg::X86(X86InlineAsmReg::mm4),
            InlineAsmReg::X86(X86InlineAsmReg::mm5),
            InlineAsmReg::X86(X86InlineAsmReg::mm6),
            InlineAsmReg::X86(X86InlineAsmReg::mm7),
            InlineAsmReg::X86(X86InlineAsmReg::st0),
            InlineAsmReg::X86(X86InlineAsmReg::st1),
            InlineAsmReg::X86(X86InlineAsmReg::st2),
            InlineAsmReg::X86(X86InlineAsmReg::st3),
            InlineAsmReg::X86(X86InlineAsmReg::st4),
            InlineAsmReg::X86(X86InlineAsmReg::st5),
            InlineAsmReg::X86(X86InlineAsmReg::st6),
            InlineAsmReg::X86(X86InlineAsmReg::st7)]clobbered_regs! {
1132                X86 X86InlineAsmReg {
1133                    ax, cx, dx,
1134
1135                    xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1136
1137                    k0, k1, k2, k3, k4, k5, k6, k7,
1138
1139                    mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1140                    st0, st1, st2, st3, st4, st5, st6, st7,
1141                }
1142            },
1143            InlineAsmClobberAbi::X86_64SysV => &[InlineAsmReg::X86(X86InlineAsmReg::ax),
            InlineAsmReg::X86(X86InlineAsmReg::cx),
            InlineAsmReg::X86(X86InlineAsmReg::dx),
            InlineAsmReg::X86(X86InlineAsmReg::si),
            InlineAsmReg::X86(X86InlineAsmReg::di),
            InlineAsmReg::X86(X86InlineAsmReg::r8),
            InlineAsmReg::X86(X86InlineAsmReg::r9),
            InlineAsmReg::X86(X86InlineAsmReg::r10),
            InlineAsmReg::X86(X86InlineAsmReg::r11),
            InlineAsmReg::X86(X86InlineAsmReg::xmm0),
            InlineAsmReg::X86(X86InlineAsmReg::xmm1),
            InlineAsmReg::X86(X86InlineAsmReg::xmm2),
            InlineAsmReg::X86(X86InlineAsmReg::xmm3),
            InlineAsmReg::X86(X86InlineAsmReg::xmm4),
            InlineAsmReg::X86(X86InlineAsmReg::xmm5),
            InlineAsmReg::X86(X86InlineAsmReg::xmm6),
            InlineAsmReg::X86(X86InlineAsmReg::xmm7),
            InlineAsmReg::X86(X86InlineAsmReg::xmm8),
            InlineAsmReg::X86(X86InlineAsmReg::xmm9),
            InlineAsmReg::X86(X86InlineAsmReg::xmm10),
            InlineAsmReg::X86(X86InlineAsmReg::xmm11),
            InlineAsmReg::X86(X86InlineAsmReg::xmm12),
            InlineAsmReg::X86(X86InlineAsmReg::xmm13),
            InlineAsmReg::X86(X86InlineAsmReg::xmm14),
            InlineAsmReg::X86(X86InlineAsmReg::xmm15),
            InlineAsmReg::X86(X86InlineAsmReg::zmm16),
            InlineAsmReg::X86(X86InlineAsmReg::zmm17),
            InlineAsmReg::X86(X86InlineAsmReg::zmm18),
            InlineAsmReg::X86(X86InlineAsmReg::zmm19),
            InlineAsmReg::X86(X86InlineAsmReg::zmm20),
            InlineAsmReg::X86(X86InlineAsmReg::zmm21),
            InlineAsmReg::X86(X86InlineAsmReg::zmm22),
            InlineAsmReg::X86(X86InlineAsmReg::zmm23),
            InlineAsmReg::X86(X86InlineAsmReg::zmm24),
            InlineAsmReg::X86(X86InlineAsmReg::zmm25),
            InlineAsmReg::X86(X86InlineAsmReg::zmm26),
            InlineAsmReg::X86(X86InlineAsmReg::zmm27),
            InlineAsmReg::X86(X86InlineAsmReg::zmm28),
            InlineAsmReg::X86(X86InlineAsmReg::zmm29),
            InlineAsmReg::X86(X86InlineAsmReg::zmm30),
            InlineAsmReg::X86(X86InlineAsmReg::zmm31),
            InlineAsmReg::X86(X86InlineAsmReg::k0),
            InlineAsmReg::X86(X86InlineAsmReg::k1),
            InlineAsmReg::X86(X86InlineAsmReg::k2),
            InlineAsmReg::X86(X86InlineAsmReg::k3),
            InlineAsmReg::X86(X86InlineAsmReg::k4),
            InlineAsmReg::X86(X86InlineAsmReg::k5),
            InlineAsmReg::X86(X86InlineAsmReg::k6),
            InlineAsmReg::X86(X86InlineAsmReg::k7),
            InlineAsmReg::X86(X86InlineAsmReg::mm0),
            InlineAsmReg::X86(X86InlineAsmReg::mm1),
            InlineAsmReg::X86(X86InlineAsmReg::mm2),
            InlineAsmReg::X86(X86InlineAsmReg::mm3),
            InlineAsmReg::X86(X86InlineAsmReg::mm4),
            InlineAsmReg::X86(X86InlineAsmReg::mm5),
            InlineAsmReg::X86(X86InlineAsmReg::mm6),
            InlineAsmReg::X86(X86InlineAsmReg::mm7),
            InlineAsmReg::X86(X86InlineAsmReg::st0),
            InlineAsmReg::X86(X86InlineAsmReg::st1),
            InlineAsmReg::X86(X86InlineAsmReg::st2),
            InlineAsmReg::X86(X86InlineAsmReg::st3),
            InlineAsmReg::X86(X86InlineAsmReg::st4),
            InlineAsmReg::X86(X86InlineAsmReg::st5),
            InlineAsmReg::X86(X86InlineAsmReg::st6),
            InlineAsmReg::X86(X86InlineAsmReg::st7),
            InlineAsmReg::X86(X86InlineAsmReg::tmm0),
            InlineAsmReg::X86(X86InlineAsmReg::tmm1),
            InlineAsmReg::X86(X86InlineAsmReg::tmm2),
            InlineAsmReg::X86(X86InlineAsmReg::tmm3),
            InlineAsmReg::X86(X86InlineAsmReg::tmm4),
            InlineAsmReg::X86(X86InlineAsmReg::tmm5),
            InlineAsmReg::X86(X86InlineAsmReg::tmm6),
            InlineAsmReg::X86(X86InlineAsmReg::tmm7)]clobbered_regs! {
1144                X86 X86InlineAsmReg {
1145                    ax, cx, dx, si, di, r8, r9, r10, r11,
1146
1147                    xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1148                    xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,
1149                    zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23,
1150                    zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31,
1151
1152                    k0, k1, k2, k3, k4, k5, k6, k7,
1153
1154                    mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1155                    st0, st1, st2, st3, st4, st5, st6, st7,
1156                    tmm0, tmm1, tmm2, tmm3, tmm4, tmm5, tmm6, tmm7,
1157                }
1158            },
1159            InlineAsmClobberAbi::X86_64Win => &[InlineAsmReg::X86(X86InlineAsmReg::ax),
            InlineAsmReg::X86(X86InlineAsmReg::cx),
            InlineAsmReg::X86(X86InlineAsmReg::dx),
            InlineAsmReg::X86(X86InlineAsmReg::r8),
            InlineAsmReg::X86(X86InlineAsmReg::r9),
            InlineAsmReg::X86(X86InlineAsmReg::r10),
            InlineAsmReg::X86(X86InlineAsmReg::r11),
            InlineAsmReg::X86(X86InlineAsmReg::xmm0),
            InlineAsmReg::X86(X86InlineAsmReg::xmm1),
            InlineAsmReg::X86(X86InlineAsmReg::xmm2),
            InlineAsmReg::X86(X86InlineAsmReg::xmm3),
            InlineAsmReg::X86(X86InlineAsmReg::xmm4),
            InlineAsmReg::X86(X86InlineAsmReg::xmm5),
            InlineAsmReg::X86(X86InlineAsmReg::xmm6),
            InlineAsmReg::X86(X86InlineAsmReg::xmm7),
            InlineAsmReg::X86(X86InlineAsmReg::xmm8),
            InlineAsmReg::X86(X86InlineAsmReg::xmm9),
            InlineAsmReg::X86(X86InlineAsmReg::xmm10),
            InlineAsmReg::X86(X86InlineAsmReg::xmm11),
            InlineAsmReg::X86(X86InlineAsmReg::xmm12),
            InlineAsmReg::X86(X86InlineAsmReg::xmm13),
            InlineAsmReg::X86(X86InlineAsmReg::xmm14),
            InlineAsmReg::X86(X86InlineAsmReg::xmm15),
            InlineAsmReg::X86(X86InlineAsmReg::zmm16),
            InlineAsmReg::X86(X86InlineAsmReg::zmm17),
            InlineAsmReg::X86(X86InlineAsmReg::zmm18),
            InlineAsmReg::X86(X86InlineAsmReg::zmm19),
            InlineAsmReg::X86(X86InlineAsmReg::zmm20),
            InlineAsmReg::X86(X86InlineAsmReg::zmm21),
            InlineAsmReg::X86(X86InlineAsmReg::zmm22),
            InlineAsmReg::X86(X86InlineAsmReg::zmm23),
            InlineAsmReg::X86(X86InlineAsmReg::zmm24),
            InlineAsmReg::X86(X86InlineAsmReg::zmm25),
            InlineAsmReg::X86(X86InlineAsmReg::zmm26),
            InlineAsmReg::X86(X86InlineAsmReg::zmm27),
            InlineAsmReg::X86(X86InlineAsmReg::zmm28),
            InlineAsmReg::X86(X86InlineAsmReg::zmm29),
            InlineAsmReg::X86(X86InlineAsmReg::zmm30),
            InlineAsmReg::X86(X86InlineAsmReg::zmm31),
            InlineAsmReg::X86(X86InlineAsmReg::k0),
            InlineAsmReg::X86(X86InlineAsmReg::k1),
            InlineAsmReg::X86(X86InlineAsmReg::k2),
            InlineAsmReg::X86(X86InlineAsmReg::k3),
            InlineAsmReg::X86(X86InlineAsmReg::k4),
            InlineAsmReg::X86(X86InlineAsmReg::k5),
            InlineAsmReg::X86(X86InlineAsmReg::k6),
            InlineAsmReg::X86(X86InlineAsmReg::k7),
            InlineAsmReg::X86(X86InlineAsmReg::mm0),
            InlineAsmReg::X86(X86InlineAsmReg::mm1),
            InlineAsmReg::X86(X86InlineAsmReg::mm2),
            InlineAsmReg::X86(X86InlineAsmReg::mm3),
            InlineAsmReg::X86(X86InlineAsmReg::mm4),
            InlineAsmReg::X86(X86InlineAsmReg::mm5),
            InlineAsmReg::X86(X86InlineAsmReg::mm6),
            InlineAsmReg::X86(X86InlineAsmReg::mm7),
            InlineAsmReg::X86(X86InlineAsmReg::st0),
            InlineAsmReg::X86(X86InlineAsmReg::st1),
            InlineAsmReg::X86(X86InlineAsmReg::st2),
            InlineAsmReg::X86(X86InlineAsmReg::st3),
            InlineAsmReg::X86(X86InlineAsmReg::st4),
            InlineAsmReg::X86(X86InlineAsmReg::st5),
            InlineAsmReg::X86(X86InlineAsmReg::st6),
            InlineAsmReg::X86(X86InlineAsmReg::st7),
            InlineAsmReg::X86(X86InlineAsmReg::tmm0),
            InlineAsmReg::X86(X86InlineAsmReg::tmm1),
            InlineAsmReg::X86(X86InlineAsmReg::tmm2),
            InlineAsmReg::X86(X86InlineAsmReg::tmm3),
            InlineAsmReg::X86(X86InlineAsmReg::tmm4),
            InlineAsmReg::X86(X86InlineAsmReg::tmm5),
            InlineAsmReg::X86(X86InlineAsmReg::tmm6),
            InlineAsmReg::X86(X86InlineAsmReg::tmm7)]clobbered_regs! {
1160                X86 X86InlineAsmReg {
1161                    // rdi and rsi are callee-saved on windows
1162                    ax, cx, dx, r8, r9, r10, r11,
1163
1164                    // xmm6-xmm15 are callee-saved on windows, but we need to
1165                    // mark them as clobbered anyways because the upper portions
1166                    // of ymm6-ymm15 are volatile.
1167                    xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1168                    xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,
1169                    zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23,
1170                    zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31,
1171
1172                    k0, k1, k2, k3, k4, k5, k6, k7,
1173
1174                    mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1175                    st0, st1, st2, st3, st4, st5, st6, st7,
1176                    tmm0, tmm1, tmm2, tmm3, tmm4, tmm5, tmm6, tmm7,
1177                }
1178            },
1179            InlineAsmClobberAbi::AArch64 => &[InlineAsmReg::AArch64(AArch64InlineAsmReg::x0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x16),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x17),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x18),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x30),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v16),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v17),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v18),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v19),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v20),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v21),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v22),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v23),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v24),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v25),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v26),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v27),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v28),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v29),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v30),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v31),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::ffr)]clobbered_regs! {
1180                AArch64 AArch64InlineAsmReg {
1181                    x0, x1, x2, x3, x4, x5, x6, x7,
1182                    x8, x9, x10, x11, x12, x13, x14, x15,
1183                    x16, x17, x18, x30,
1184
1185                    // Technically the low 64 bits of v8-v15 are preserved, but
1186                    // we have no way of expressing this using clobbers.
1187                    v0, v1, v2, v3, v4, v5, v6, v7,
1188                    v8, v9, v10, v11, v12, v13, v14, v15,
1189                    v16, v17, v18, v19, v20, v21, v22, v23,
1190                    v24, v25, v26, v27, v28, v29, v30, v31,
1191
1192                    p0, p1, p2, p3, p4, p5, p6, p7,
1193                    p8, p9, p10, p11, p12, p13, p14, p15,
1194                    ffr,
1195                }
1196            },
1197            InlineAsmClobberAbi::AArch64NoX18 => &[InlineAsmReg::AArch64(AArch64InlineAsmReg::x0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x16),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x17),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x30),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v16),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v17),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v18),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v19),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v20),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v21),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v22),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v23),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v24),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v25),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v26),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v27),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v28),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v29),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v30),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v31),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::p15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::ffr)]clobbered_regs! {
1198                AArch64 AArch64InlineAsmReg {
1199                    x0, x1, x2, x3, x4, x5, x6, x7,
1200                    x8, x9, x10, x11, x12, x13, x14, x15,
1201                    x16, x17, x30,
1202
1203                    // Technically the low 64 bits of v8-v15 are preserved, but
1204                    // we have no way of expressing this using clobbers.
1205                    v0, v1, v2, v3, v4, v5, v6, v7,
1206                    v8, v9, v10, v11, v12, v13, v14, v15,
1207                    v16, v17, v18, v19, v20, v21, v22, v23,
1208                    v24, v25, v26, v27, v28, v29, v30, v31,
1209
1210                    p0, p1, p2, p3, p4, p5, p6, p7,
1211                    p8, p9, p10, p11, p12, p13, p14, p15,
1212                    ffr,
1213                }
1214            },
1215            InlineAsmClobberAbi::Arm64EC => &[InlineAsmReg::AArch64(AArch64InlineAsmReg::x0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x15),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x16),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x17),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::x30),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v0),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v1),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v2),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v3),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v4),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v5),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v6),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v7),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v8),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v9),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v10),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v11),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v12),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v13),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v14),
            InlineAsmReg::AArch64(AArch64InlineAsmReg::v15)]clobbered_regs! {
1216                AArch64 AArch64InlineAsmReg {
1217                    // x13 and x14 cannot be used in Arm64EC.
1218                    x0, x1, x2, x3, x4, x5, x6, x7,
1219                    x8, x9, x10, x11, x12, x15,
1220                    x16, x17, x30,
1221
1222                    // Technically the low 64 bits of v8-v15 are preserved, but
1223                    // we have no way of expressing this using clobbers.
1224                    v0, v1, v2, v3, v4, v5, v6, v7,
1225                    v8, v9, v10, v11, v12, v13, v14, v15,
1226                    // v16-v31, p*, and ffr cannot be used in Arm64EC.
1227                }
1228            },
1229            InlineAsmClobberAbi::Arm => &[InlineAsmReg::Arm(ArmInlineAsmReg::r0),
            InlineAsmReg::Arm(ArmInlineAsmReg::r1),
            InlineAsmReg::Arm(ArmInlineAsmReg::r2),
            InlineAsmReg::Arm(ArmInlineAsmReg::r3),
            InlineAsmReg::Arm(ArmInlineAsmReg::r12),
            InlineAsmReg::Arm(ArmInlineAsmReg::r14),
            InlineAsmReg::Arm(ArmInlineAsmReg::s0),
            InlineAsmReg::Arm(ArmInlineAsmReg::s1),
            InlineAsmReg::Arm(ArmInlineAsmReg::s2),
            InlineAsmReg::Arm(ArmInlineAsmReg::s3),
            InlineAsmReg::Arm(ArmInlineAsmReg::s4),
            InlineAsmReg::Arm(ArmInlineAsmReg::s5),
            InlineAsmReg::Arm(ArmInlineAsmReg::s6),
            InlineAsmReg::Arm(ArmInlineAsmReg::s7),
            InlineAsmReg::Arm(ArmInlineAsmReg::s8),
            InlineAsmReg::Arm(ArmInlineAsmReg::s9),
            InlineAsmReg::Arm(ArmInlineAsmReg::s10),
            InlineAsmReg::Arm(ArmInlineAsmReg::s11),
            InlineAsmReg::Arm(ArmInlineAsmReg::s12),
            InlineAsmReg::Arm(ArmInlineAsmReg::s13),
            InlineAsmReg::Arm(ArmInlineAsmReg::s14),
            InlineAsmReg::Arm(ArmInlineAsmReg::s15),
            InlineAsmReg::Arm(ArmInlineAsmReg::d16),
            InlineAsmReg::Arm(ArmInlineAsmReg::d17),
            InlineAsmReg::Arm(ArmInlineAsmReg::d18),
            InlineAsmReg::Arm(ArmInlineAsmReg::d19),
            InlineAsmReg::Arm(ArmInlineAsmReg::d20),
            InlineAsmReg::Arm(ArmInlineAsmReg::d21),
            InlineAsmReg::Arm(ArmInlineAsmReg::d22),
            InlineAsmReg::Arm(ArmInlineAsmReg::d23),
            InlineAsmReg::Arm(ArmInlineAsmReg::d24),
            InlineAsmReg::Arm(ArmInlineAsmReg::d25),
            InlineAsmReg::Arm(ArmInlineAsmReg::d26),
            InlineAsmReg::Arm(ArmInlineAsmReg::d27),
            InlineAsmReg::Arm(ArmInlineAsmReg::d28),
            InlineAsmReg::Arm(ArmInlineAsmReg::d29),
            InlineAsmReg::Arm(ArmInlineAsmReg::d30),
            InlineAsmReg::Arm(ArmInlineAsmReg::d31)]clobbered_regs! {
1230                Arm ArmInlineAsmReg {
1231                    // r9 is either platform-reserved or callee-saved. Either
1232                    // way we don't need to clobber it.
1233                    r0, r1, r2, r3, r12, r14,
1234
1235                    // The finest-grained register variant is used here so that
1236                    // partial uses of larger registers are properly handled.
1237                    s0, s1, s2, s3, s4, s5, s6, s7,
1238                    s8, s9, s10, s11, s12, s13, s14, s15,
1239                    // s16-s31 are callee-saved
1240                    d16, d17, d18, d19, d20, d21, d22, d23,
1241                    d24, d25, d26, d27, d28, d29, d30, d31,
1242                }
1243            },
1244            InlineAsmClobberAbi::Avr => &[InlineAsmReg::Avr(AvrInlineAsmReg::r18),
            InlineAsmReg::Avr(AvrInlineAsmReg::r19),
            InlineAsmReg::Avr(AvrInlineAsmReg::r20),
            InlineAsmReg::Avr(AvrInlineAsmReg::r21),
            InlineAsmReg::Avr(AvrInlineAsmReg::r22),
            InlineAsmReg::Avr(AvrInlineAsmReg::r23),
            InlineAsmReg::Avr(AvrInlineAsmReg::r24),
            InlineAsmReg::Avr(AvrInlineAsmReg::r25),
            InlineAsmReg::Avr(AvrInlineAsmReg::r26),
            InlineAsmReg::Avr(AvrInlineAsmReg::r27),
            InlineAsmReg::Avr(AvrInlineAsmReg::r30),
            InlineAsmReg::Avr(AvrInlineAsmReg::r31)]clobbered_regs! {
1245                Avr AvrInlineAsmReg {
1246                    // The list of "Call-Used Registers" according to
1247                    // https://gcc.gnu.org/wiki/avr-gcc#Call-Used_Registers
1248
1249                    // Clobbered registers available in inline assembly
1250                    r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r30, r31,
1251                    // As per the AVR-GCC-ABI documentation linked above, the R0
1252                    // register is a clobbered register as well. Since we don't
1253                    // allow the usage of R0 in inline assembly, nothing has to
1254                    // be done here.
1255                    // Likewise, the T-flag in the SREG should be clobbered, but
1256                    // this is not necessary to be listed here, since the SREG
1257                    // is considered clobbered anyways unless `preserve_flags`
1258                    // is used.
1259                }
1260            },
1261            InlineAsmClobberAbi::RiscV => &[InlineAsmReg::RiscV(RiscVInlineAsmReg::x1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x16),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x17),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x28),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x29),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x30),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x31),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f0),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f2),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f3),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f4),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f16),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f17),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f28),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f29),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f30),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f31),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v0),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v2),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v3),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v4),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v8),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v9),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v16),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v17),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v18),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v19),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v20),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v21),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v22),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v23),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v24),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v25),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v26),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v27),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v28),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v29),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v30),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v31)]clobbered_regs! {
1262                RiscV RiscVInlineAsmReg {
1263                    // ra
1264                    x1,
1265                    // t0-t2
1266                    x5, x6, x7,
1267                    // a0-a7
1268                    x10, x11, x12, x13, x14, x15, x16, x17,
1269                    // t3-t6
1270                    x28, x29, x30, x31,
1271                    // ft0-ft7
1272                    f0, f1, f2, f3, f4, f5, f6, f7,
1273                    // fa0-fa7
1274                    f10, f11, f12, f13, f14, f15, f16, f17,
1275                    // ft8-ft11
1276                    f28, f29, f30, f31,
1277
1278                    v0, v1, v2, v3, v4, v5, v6, v7,
1279                    v8, v9, v10, v11, v12, v13, v14, v15,
1280                    v16, v17, v18, v19, v20, v21, v22, v23,
1281                    v24, v25, v26, v27, v28, v29, v30, v31,
1282                }
1283            },
1284            InlineAsmClobberAbi::RiscVE => &[InlineAsmReg::RiscV(RiscVInlineAsmReg::x1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::x15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f0),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f2),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f3),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f4),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f16),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f17),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f28),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f29),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f30),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::f31),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v0),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v1),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v2),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v3),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v4),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v5),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v6),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v7),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v8),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v9),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v10),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v11),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v12),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v13),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v14),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v15),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v16),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v17),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v18),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v19),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v20),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v21),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v22),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v23),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v24),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v25),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v26),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v27),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v28),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v29),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v30),
            InlineAsmReg::RiscV(RiscVInlineAsmReg::v31)]clobbered_regs! {
1285                RiscV RiscVInlineAsmReg {
1286                    // Refs:
1287                    // - ILP32E https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/draft-20240829-13bfa9f54634cb60d86b9b333e109f077805b4b3/riscv-cc.adoc#ilp32e-calling-convention
1288                    // - LP64E https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/299
1289
1290                    // ra
1291                    x1,
1292                    // t0-t2
1293                    x5, x6, x7,
1294                    // a0-a5
1295                    x10, x11, x12, x13, x14, x15,
1296                    // ft0-ft7
1297                    f0, f1, f2, f3, f4, f5, f6, f7,
1298                    // fa0-fa7
1299                    f10, f11, f12, f13, f14, f15, f16, f17,
1300                    // ft8-ft11
1301                    f28, f29, f30, f31,
1302
1303                    v0, v1, v2, v3, v4, v5, v6, v7,
1304                    v8, v9, v10, v11, v12, v13, v14, v15,
1305                    v16, v17, v18, v19, v20, v21, v22, v23,
1306                    v24, v25, v26, v27, v28, v29, v30, v31,
1307                }
1308            },
1309            InlineAsmClobberAbi::LoongArch => &[InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r1),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r4),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r5),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r6),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r7),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r8),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r9),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r10),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r11),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r12),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r13),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r14),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r15),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r16),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r17),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r18),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r19),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::r20),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f0),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f1),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f2),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f3),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f4),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f5),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f6),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f7),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f8),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f9),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f10),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f11),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f12),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f13),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f14),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f15),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f16),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f17),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f18),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f19),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f20),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f21),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f22),
            InlineAsmReg::LoongArch(LoongArchInlineAsmReg::f23)]clobbered_regs! {
1310                LoongArch LoongArchInlineAsmReg {
1311                    // ra
1312                    r1,
1313                    // a0-a7
1314                    r4, r5, r6, r7, r8, r9, r10, r11,
1315                    // t0-t8
1316                    r12, r13, r14, r15, r16, r17, r18, r19, r20,
1317                    // fa0-fa7
1318                    f0, f1, f2, f3, f4, f5, f6, f7,
1319                    // ft0-ft15
1320                    f8, f9, f10, f11, f12, f13, f14, f15,
1321                    f16, f17, f18, f19, f20, f21, f22, f23,
1322                }
1323            },
1324            InlineAsmClobberAbi::PowerPC => &[InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r3),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r4),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r8),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r9),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r10),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r11),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r12),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f1),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f2),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f3),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f4),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f8),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f9),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f10),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f11),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f12),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::f13),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs1),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs2),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs3),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs4),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs8),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs9),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs10),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs11),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs12),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs13),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs14),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs15),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs16),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs17),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs18),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs19),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs20),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs21),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs22),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs23),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs24),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs25),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs26),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs27),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs28),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs29),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs30),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::vs31),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v1),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v2),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v3),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v4),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v8),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v9),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v10),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v11),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v12),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v13),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v14),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v15),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v16),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v17),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v18),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::v19),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr1),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::ctr),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::lr),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::xer)]clobbered_regs! {
1325                PowerPC PowerPCInlineAsmReg {
1326                    // Refs:
1327                    // - PPC32 SysV: "3.2. Function Calling Sequence" in Power Architecture® 32-bit Application Binary Interface Supplement 1.0 - Linux® & Embedded
1328                    //   https://web.archive.org/web/20120608163804/https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Unified.pdf
1329                    // - PPC64 ELFv1: "3.2. Function Calling Sequence" in 64-bit PowerPC ELF Application Binary Interface Supplement 1.9
1330                    //   https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-CALL
1331                    // - PPC64 ELFv2: "2.2 Function Calling Sequence" in 64-Bit ELF V2 ABI Specification: Power Architecture, Revision 1.5
1332                    //   https://openpowerfoundation.org/specifications/64bitelfabi/
1333                    // - AIX:
1334                    //   - Register usage and conventions
1335                    //     https://www.ibm.com/docs/en/aix/7.3?topic=overview-register-usage-conventions
1336                    //   - Special registers in the PowerPC®
1337                    //     https://www.ibm.com/docs/en/aix/7.3?topic=overview-special-registers-in-powerpc
1338                    //   - AIX vector programming
1339                    //     https://www.ibm.com/docs/en/aix/7.3?topic=concepts-aix-vector-programming
1340
1341                    // r0, r3-r12
1342                    r0,
1343                    r3, r4, r5, r6, r7,
1344                    r8, r9, r10, r11, r12,
1345
1346                    // f0-f13 and their vsx overlays.
1347                    f0, f1, f2, f3, f4, f5, f6, f7,
1348                    f8, f9, f10, f11, f12, f13,
1349                    vs0, vs1, vs2, vs3, vs4, vs5, vs6, vs7,
1350                    vs8, vs9, vs10, vs11, vs12, vs13,
1351
1352                    // vs14-31, the fpr portion is saved, but the rest of the register is volatile.
1353                    // We can't express that here, so mark the entire vsx register as volatile.
1354                    vs14, vs15, vs16, vs17, vs18, vs19, vs20,
1355                    vs21, vs22, vs23, vs24, vs25, vs26, vs27,
1356                    vs28, vs29, vs30, vs31,
1357
1358                    // v0-v19
1359                    v0, v1, v2, v3, v4, v5, v6, v7,
1360                    v8, v9, v10, v11, v12, v13, v14,
1361                    v15, v16, v17, v18, v19,
1362
1363                    // cr0-cr1, cr5-cr7, ctr, lr, xer
1364                    cr0, cr1,
1365                    cr5, cr6, cr7,
1366                    ctr,
1367                    lr,
1368                    xer,
1369                }
1370            },
1371            InlineAsmClobberAbi::PowerPCSPE => &[InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r3),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r4),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r8),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r9),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r10),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r11),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::r12),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr0),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr1),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr5),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr6),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::cr7),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::ctr),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::lr),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::xer),
            InlineAsmReg::PowerPC(PowerPCInlineAsmReg::spe_acc)]clobbered_regs! {
1372                PowerPC PowerPCInlineAsmReg {
1373                    // r0, r3-r12
1374                    r0,
1375                    r3, r4, r5, r6, r7,
1376                    r8, r9, r10, r11, r12,
1377
1378                    // cr0-cr1, cr5-cr7, ctr, lr, xer, spe_acc
1379                    cr0, cr1,
1380                    cr5, cr6, cr7,
1381                    ctr,
1382                    lr,
1383                    xer,
1384                    spe_acc,
1385                }
1386            },
1387            InlineAsmClobberAbi::S390x => &[InlineAsmReg::S390x(S390xInlineAsmReg::r0),
            InlineAsmReg::S390x(S390xInlineAsmReg::r1),
            InlineAsmReg::S390x(S390xInlineAsmReg::r2),
            InlineAsmReg::S390x(S390xInlineAsmReg::r3),
            InlineAsmReg::S390x(S390xInlineAsmReg::r4),
            InlineAsmReg::S390x(S390xInlineAsmReg::r5),
            InlineAsmReg::S390x(S390xInlineAsmReg::r14),
            InlineAsmReg::S390x(S390xInlineAsmReg::f0),
            InlineAsmReg::S390x(S390xInlineAsmReg::f1),
            InlineAsmReg::S390x(S390xInlineAsmReg::f2),
            InlineAsmReg::S390x(S390xInlineAsmReg::f3),
            InlineAsmReg::S390x(S390xInlineAsmReg::f4),
            InlineAsmReg::S390x(S390xInlineAsmReg::f5),
            InlineAsmReg::S390x(S390xInlineAsmReg::f6),
            InlineAsmReg::S390x(S390xInlineAsmReg::f7),
            InlineAsmReg::S390x(S390xInlineAsmReg::v0),
            InlineAsmReg::S390x(S390xInlineAsmReg::v1),
            InlineAsmReg::S390x(S390xInlineAsmReg::v2),
            InlineAsmReg::S390x(S390xInlineAsmReg::v3),
            InlineAsmReg::S390x(S390xInlineAsmReg::v4),
            InlineAsmReg::S390x(S390xInlineAsmReg::v5),
            InlineAsmReg::S390x(S390xInlineAsmReg::v6),
            InlineAsmReg::S390x(S390xInlineAsmReg::v7),
            InlineAsmReg::S390x(S390xInlineAsmReg::v8),
            InlineAsmReg::S390x(S390xInlineAsmReg::v9),
            InlineAsmReg::S390x(S390xInlineAsmReg::v10),
            InlineAsmReg::S390x(S390xInlineAsmReg::v11),
            InlineAsmReg::S390x(S390xInlineAsmReg::v12),
            InlineAsmReg::S390x(S390xInlineAsmReg::v13),
            InlineAsmReg::S390x(S390xInlineAsmReg::v14),
            InlineAsmReg::S390x(S390xInlineAsmReg::v15),
            InlineAsmReg::S390x(S390xInlineAsmReg::v16),
            InlineAsmReg::S390x(S390xInlineAsmReg::v17),
            InlineAsmReg::S390x(S390xInlineAsmReg::v18),
            InlineAsmReg::S390x(S390xInlineAsmReg::v19),
            InlineAsmReg::S390x(S390xInlineAsmReg::v20),
            InlineAsmReg::S390x(S390xInlineAsmReg::v21),
            InlineAsmReg::S390x(S390xInlineAsmReg::v22),
            InlineAsmReg::S390x(S390xInlineAsmReg::v23),
            InlineAsmReg::S390x(S390xInlineAsmReg::v24),
            InlineAsmReg::S390x(S390xInlineAsmReg::v25),
            InlineAsmReg::S390x(S390xInlineAsmReg::v26),
            InlineAsmReg::S390x(S390xInlineAsmReg::v27),
            InlineAsmReg::S390x(S390xInlineAsmReg::v28),
            InlineAsmReg::S390x(S390xInlineAsmReg::v29),
            InlineAsmReg::S390x(S390xInlineAsmReg::v30),
            InlineAsmReg::S390x(S390xInlineAsmReg::v31),
            InlineAsmReg::S390x(S390xInlineAsmReg::a2),
            InlineAsmReg::S390x(S390xInlineAsmReg::a3),
            InlineAsmReg::S390x(S390xInlineAsmReg::a4),
            InlineAsmReg::S390x(S390xInlineAsmReg::a5),
            InlineAsmReg::S390x(S390xInlineAsmReg::a6),
            InlineAsmReg::S390x(S390xInlineAsmReg::a7),
            InlineAsmReg::S390x(S390xInlineAsmReg::a8),
            InlineAsmReg::S390x(S390xInlineAsmReg::a9),
            InlineAsmReg::S390x(S390xInlineAsmReg::a10),
            InlineAsmReg::S390x(S390xInlineAsmReg::a11),
            InlineAsmReg::S390x(S390xInlineAsmReg::a12),
            InlineAsmReg::S390x(S390xInlineAsmReg::a13),
            InlineAsmReg::S390x(S390xInlineAsmReg::a14),
            InlineAsmReg::S390x(S390xInlineAsmReg::a15)]clobbered_regs! {
1388                S390x S390xInlineAsmReg {
1389                    r0, r1, r2, r3, r4, r5,
1390                    r14,
1391
1392                    // f0-f7, v0-v7
1393                    f0, f1, f2, f3, f4, f5, f6, f7,
1394                    v0, v1, v2, v3, v4, v5, v6, v7,
1395
1396                    // Technically the left halves of v8-v15 (i.e., f8-f15) are saved, but
1397                    // we have no way of expressing this using clobbers.
1398                    v8, v9, v10, v11, v12, v13, v14, v15,
1399
1400                    // Other vector registers are volatile
1401                    v16, v17, v18, v19, v20, v21, v22, v23,
1402                    v24, v25, v26, v27, v28, v29, v30, v31,
1403
1404                    // a0-a1 are reserved, other access registers are volatile
1405                    a2, a3, a4, a5, a6, a7,
1406                    a8, a9, a10, a11, a12, a13, a14, a15,
1407                }
1408            },
1409            InlineAsmClobberAbi::Bpf => &[InlineAsmReg::Bpf(BpfInlineAsmReg::r0),
            InlineAsmReg::Bpf(BpfInlineAsmReg::r1),
            InlineAsmReg::Bpf(BpfInlineAsmReg::r2),
            InlineAsmReg::Bpf(BpfInlineAsmReg::r3),
            InlineAsmReg::Bpf(BpfInlineAsmReg::r4),
            InlineAsmReg::Bpf(BpfInlineAsmReg::r5)]clobbered_regs! {
1410                Bpf BpfInlineAsmReg {
1411                    // Refs: Section 1.1 "Registers and calling convention" in BPF ABI Recommended Conventions and Guidelines v1.0
1412                    // https://www.kernel.org/doc/html/latest/bpf/standardization/abi.html#registers-and-calling-convention
1413
1414                    r0, r1, r2, r3, r4, r5,
1415                }
1416            },
1417            InlineAsmClobberAbi::Msp430 => &[InlineAsmReg::Msp430(Msp430InlineAsmReg::r11),
            InlineAsmReg::Msp430(Msp430InlineAsmReg::r12),
            InlineAsmReg::Msp430(Msp430InlineAsmReg::r13),
            InlineAsmReg::Msp430(Msp430InlineAsmReg::r14),
            InlineAsmReg::Msp430(Msp430InlineAsmReg::r15)]clobbered_regs! {
1418                Msp430 Msp430InlineAsmReg {
1419                    r11, r12, r13, r14, r15,
1420                }
1421            },
1422            InlineAsmClobberAbi::Xtensa => &[InlineAsmReg::Xtensa(XtensaInlineAsmReg::a2),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a3),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a4),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a5),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a6),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a7),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a8),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a9),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a10),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::a11),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f0),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f1),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f2),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f3),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f4),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f5),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f6),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f7),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f8),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f9),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f10),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f11),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f12),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f13),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f14),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::f15),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::sar),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::scompare1),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::lbeg),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::lend),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::lcount),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::acclo),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::acchi),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::m0),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::m1),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::m2),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::m3),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b0),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b1),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b2),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b3),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b4),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b5),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b6),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b7),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b8),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b9),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b10),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b11),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b12),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b13),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b14),
            InlineAsmReg::Xtensa(XtensaInlineAsmReg::b15)]clobbered_regs! {
1423                Xtensa XtensaInlineAsmReg {
1424                    // Refs:
1425                    // - Xtensa ISA Reference Manual, Section 8.1.4 & 8.1.6
1426                    // - "Except for LITBASE, all non-privileged special registers are
1427                    //   caller-saved."
1428
1429                    // Caller-saved general-purpose registers (a2-a11).
1430                    // a0 is the return address (reserved by LLVM).
1431                    // a1/sp is the stack pointer (reserved by LLVM).
1432                    // a12-a15 are callee-saved.
1433                    a2, a3, a4, a5, a6, a7,
1434                    a8, a9, a10, a11,
1435
1436                    // All floating-point registers are caller-saved.
1437                    f0, f1, f2, f3, f4, f5, f6, f7,
1438                    f8, f9, f10, f11, f12, f13, f14, f15,
1439
1440                    // SAR (Shift Amount Register) - caller-saved, always present.
1441                    sar,
1442
1443                    // SCOMPARE1 - caller-saved (s32c1i option).
1444                    scompare1,
1445
1446                    // Loop registers - caller-saved (loop option).
1447                    lbeg, lend, lcount,
1448
1449                    // MAC16 registers - caller-saved (mac16 option).
1450                    acclo, acchi,
1451                    m0, m1, m2, m3,
1452
1453                    // Boolean registers - caller-saved (boolean option).
1454                    b0, b1, b2, b3, b4, b5, b6, b7,
1455                    b8, b9, b10, b11, b12, b13, b14, b15,
1456                }
1457            },
1458        }
1459    }
1460}