1use std::borrow::Cow;
2use std::fmt;
3
4use rustc_abi::Size;
5use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
6use rustc_macros::{Decodable, Encodable, StableHash};
7use rustc_span::Symbol;
8
9use crate::spec::{Arch, RelocModel, Target};
10
11pub struct ModifierInfo {
12 pub modifier: char,
13 pub result: &'static str,
14 pub size: u16,
15}
16
17impl From<(char, &'static str, u16)> for ModifierInfo {
18 fn from((modifier, result, size): (char, &'static str, u16)) -> Self {
19 Self { modifier, result, size }
20 }
21}
22
23macro_rules! def_reg_class {
24 ($arch:ident $arch_regclass:ident {
25 $(
26 $class:ident,
27 )*
28 }) => {
29 #[derive(Copy, Clone, rustc_macros::Encodable, rustc_macros::Decodable, Debug, Eq, PartialEq, PartialOrd, Hash, rustc_macros::StableHash)]
30 #[allow(non_camel_case_types)]
31 pub enum $arch_regclass {
32 $($class,)*
33 }
34
35 impl $arch_regclass {
36 pub fn name(self) -> rustc_span::Symbol {
37 match self {
38 $(Self::$class => rustc_span::sym::$class,)*
39 }
40 }
41
42 pub fn parse(name: rustc_span::Symbol) -> Result<Self, &'static [rustc_span::Symbol]> {
43 match name {
44 $(
45 rustc_span::sym::$class => Ok(Self::$class),
46 )*
47 _ => Err(&[$(rustc_span::sym::$class),*]),
48 }
49 }
50 }
51
52 pub(super) fn regclass_map() -> rustc_data_structures::fx::FxHashMap<
53 super::InlineAsmRegClass,
54 rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>,
55 > {
56 use rustc_data_structures::fx::FxHashMap;
57 use rustc_data_structures::fx::FxIndexSet;
58 use super::InlineAsmRegClass;
59 let mut map = FxHashMap::default();
60 $(
61 map.insert(InlineAsmRegClass::$arch($arch_regclass::$class), FxIndexSet::default());
62 )*
63 map
64 }
65 }
66}
67
68macro_rules! def_regs {
69 ($arch:ident $arch_reg:ident $arch_regclass:ident {
70 $(
71 $reg:ident: $class:ident $(, $extra_class:ident)* = [$reg_name:literal $(, $alias:literal)*] $(% $filter:ident)*,
72 )*
73 $(
74 #error = [$($bad_reg:literal),+] => $error:literal,
75 )*
76 }) => {
77 #[allow(unreachable_code)]
78 #[derive(Copy, Clone, rustc_macros::Encodable, rustc_macros::Decodable, Debug, Eq, PartialEq, PartialOrd, Hash, rustc_macros::StableHash)]
79 #[allow(non_camel_case_types)]
80 pub enum $arch_reg {
81 $($reg,)*
82 }
83
84 impl $arch_reg {
85 pub fn name(self) -> &'static str {
86 match self {
87 $(Self::$reg => $reg_name,)*
88 }
89 }
90
91 pub fn reg_class(self) -> $arch_regclass {
92 match self {
93 $(Self::$reg => $arch_regclass::$class,)*
94 }
95 }
96
97 pub fn parse(name: &str) -> Result<Self, &'static str> {
98 match name {
99 $(
100 $($alias)|* | $reg_name => Ok(Self::$reg),
101 )*
102 $(
103 $($bad_reg)|* => Err($error),
104 )*
105 _ => Err("unknown register"),
106 }
107 }
108
109 pub fn validate(self,
110 _arch: super::InlineAsmArch,
111 _reloc_model: crate::spec::RelocModel,
112 _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
113 _target: &crate::spec::Target,
114 _is_clobber: bool,
115 ) -> Result<(), &'static str> {
116 match self {
117 $(
118 Self::$reg => {
119 $($filter(
120 _arch,
121 _reloc_model,
122 _target_features,
123 _target,
124 _is_clobber
125 )?;)*
126 Ok(())
127 }
128 )*
129 }
130 }
131 }
132
133 pub(super) fn fill_reg_map(
134 _arch: super::InlineAsmArch,
135 _reloc_model: crate::spec::RelocModel,
136 _target_features: &rustc_data_structures::fx::FxIndexSet<Symbol>,
137 _target: &crate::spec::Target,
138 _map: &mut rustc_data_structures::fx::FxHashMap<
139 super::InlineAsmRegClass,
140 rustc_data_structures::fx::FxIndexSet<super::InlineAsmReg>,
141 >,
142 ) {
143 #[allow(unused_imports)]
144 use super::{InlineAsmReg, InlineAsmRegClass};
145 $(
146 if $($filter(_arch, _reloc_model, _target_features, _target, false).is_ok() &&)* true {
147 if let Some(set) = _map.get_mut(&InlineAsmRegClass::$arch($arch_regclass::$class)) {
148 set.insert(InlineAsmReg::$arch($arch_reg::$reg));
149 }
150 $(
151 if let Some(set) = _map.get_mut(&InlineAsmRegClass::$arch($arch_regclass::$extra_class)) {
152 set.insert(InlineAsmReg::$arch($arch_reg::$reg));
153 }
154 )*
155 }
156 )*
157 }
158 }
159}
160
161macro_rules! types {
162 (
163 $(_ : $($ty:expr),+;)?
164 $($feature:ident: $($ty2:expr),+;)*
165 ) => {
166 {
167 use super::InlineAsmType::*;
168 &[
169 $($(
170 ($ty, None),
171 )*)?
172 $($(
173 ($ty2, Some(rustc_span::sym::$feature)),
174 )*)*
175 ]
176 }
177 };
178}
179
180mod aarch64;
181mod amdgpu;
182mod arm;
183mod avr;
184mod bpf;
185mod csky;
186mod hexagon;
187mod loongarch;
188mod m68k;
189mod mips;
190mod msp430;
191mod nvptx;
192mod powerpc;
193mod riscv;
194mod s390x;
195mod sparc;
196mod spirv;
197mod wasm;
198mod x86;
199mod xtensa;
200
201pub use aarch64::{AArch64InlineAsmReg, AArch64InlineAsmRegClass};
202pub use amdgpu::{AmdgpuInlineAsmReg, AmdgpuInlineAsmRegClass};
203pub use arm::{ArmInlineAsmReg, ArmInlineAsmRegClass};
204pub use avr::{AvrInlineAsmReg, AvrInlineAsmRegClass};
205pub use bpf::{BpfInlineAsmReg, BpfInlineAsmRegClass};
206pub use csky::{CSKYInlineAsmReg, CSKYInlineAsmRegClass};
207pub use hexagon::{HexagonInlineAsmReg, HexagonInlineAsmRegClass};
208pub use loongarch::{LoongArchInlineAsmReg, LoongArchInlineAsmRegClass};
209pub use m68k::{M68kInlineAsmReg, M68kInlineAsmRegClass};
210pub use mips::{MipsInlineAsmReg, MipsInlineAsmRegClass};
211pub use msp430::{Msp430InlineAsmReg, Msp430InlineAsmRegClass};
212pub use nvptx::{NvptxInlineAsmReg, NvptxInlineAsmRegClass};
213pub use powerpc::{PowerPCInlineAsmReg, PowerPCInlineAsmRegClass};
214pub use riscv::{RiscVInlineAsmReg, RiscVInlineAsmRegClass};
215pub use s390x::{S390xInlineAsmReg, S390xInlineAsmRegClass};
216pub use sparc::{SparcInlineAsmReg, SparcInlineAsmRegClass};
217pub use spirv::{SpirVInlineAsmReg, SpirVInlineAsmRegClass};
218pub use wasm::{WasmInlineAsmReg, WasmInlineAsmRegClass};
219pub use x86::{X86InlineAsmReg, X86InlineAsmRegClass};
220pub use xtensa::{XtensaInlineAsmReg, XtensaInlineAsmRegClass};
221
222#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmArch { }Copy, #[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);
match *self {
InlineAsmArch::X86 => {}
InlineAsmArch::X86_64 => {}
InlineAsmArch::Arm => {}
InlineAsmArch::AArch64 => {}
InlineAsmArch::Arm64EC => {}
InlineAsmArch::RiscV32 => {}
InlineAsmArch::RiscV64 => {}
InlineAsmArch::Nvptx64 => {}
InlineAsmArch::Amdgpu => {}
InlineAsmArch::Hexagon => {}
InlineAsmArch::LoongArch32 => {}
InlineAsmArch::LoongArch64 => {}
InlineAsmArch::Mips => {}
InlineAsmArch::Mips64 => {}
InlineAsmArch::PowerPC => {}
InlineAsmArch::PowerPC64 => {}
InlineAsmArch::S390x => {}
InlineAsmArch::Sparc => {}
InlineAsmArch::Sparc64 => {}
InlineAsmArch::SpirV => {}
InlineAsmArch::Wasm32 => {}
InlineAsmArch::Wasm64 => {}
InlineAsmArch::Xtensa => {}
InlineAsmArch::Bpf => {}
InlineAsmArch::Avr => {}
InlineAsmArch::Msp430 => {}
InlineAsmArch::M68k => {}
InlineAsmArch::CSKY => {}
}
}
}
};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::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)]
223pub enum InlineAsmArch {
224 X86,
225 X86_64,
226 Arm,
227 AArch64,
228 Arm64EC,
229 RiscV32,
230 RiscV64,
231 Nvptx64,
232 Amdgpu,
233 Hexagon,
234 LoongArch32,
235 LoongArch64,
236 Mips,
237 Mips64,
238 PowerPC,
239 PowerPC64,
240 S390x,
241 Sparc,
242 Sparc64,
243 SpirV,
244 Wasm32,
245 Wasm64,
246 Xtensa,
247 Bpf,
248 Avr,
249 Msp430,
250 M68k,
251 CSKY,
252}
253
254impl InlineAsmArch {
255 pub fn from_arch(arch: &Arch) -> Option<Self> {
256 match arch {
257 Arch::X86 => Some(Self::X86),
258 Arch::X86_64 => Some(Self::X86_64),
259 Arch::Arm => Some(Self::Arm),
260 Arch::Arm64EC => Some(Self::Arm64EC),
261 Arch::AArch64 => Some(Self::AArch64),
262 Arch::AmdGpu => Some(Self::Amdgpu),
263 Arch::RiscV32 => Some(Self::RiscV32),
264 Arch::RiscV64 => Some(Self::RiscV64),
265 Arch::Nvptx64 => Some(Self::Nvptx64),
266 Arch::Hexagon => Some(Self::Hexagon),
267 Arch::LoongArch32 => Some(Self::LoongArch32),
268 Arch::LoongArch64 => Some(Self::LoongArch64),
269 Arch::Mips | Arch::Mips32r6 => Some(Self::Mips),
270 Arch::Mips64 | Arch::Mips64r6 => Some(Self::Mips64),
271 Arch::PowerPC => Some(Self::PowerPC),
272 Arch::PowerPC64 => Some(Self::PowerPC64),
273 Arch::S390x => Some(Self::S390x),
274 Arch::Sparc => Some(Self::Sparc),
275 Arch::Sparc64 => Some(Self::Sparc64),
276 Arch::SpirV => Some(Self::SpirV),
277 Arch::Wasm32 => Some(Self::Wasm32),
278 Arch::Wasm64 => Some(Self::Wasm64),
279 Arch::Bpf => Some(Self::Bpf),
280 Arch::Avr => Some(Self::Avr),
281 Arch::Msp430 => Some(Self::Msp430),
282 Arch::M68k => Some(Self::M68k),
283 Arch::CSky => Some(Self::CSKY),
284 Arch::Xtensa => Some(Self::Xtensa),
285 Arch::Other(_) => None,
286 }
287 }
288}
289
290#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmReg { }Copy, #[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::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)]
291#[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)]
292pub enum InlineAsmReg {
293 X86(X86InlineAsmReg),
294 Arm(ArmInlineAsmReg),
295 Amdgpu(AmdgpuInlineAsmReg),
296 AArch64(AArch64InlineAsmReg),
297 RiscV(RiscVInlineAsmReg),
298 Nvptx(NvptxInlineAsmReg),
299 PowerPC(PowerPCInlineAsmReg),
300 Hexagon(HexagonInlineAsmReg),
301 LoongArch(LoongArchInlineAsmReg),
302 Mips(MipsInlineAsmReg),
303 S390x(S390xInlineAsmReg),
304 Sparc(SparcInlineAsmReg),
305 SpirV(SpirVInlineAsmReg),
306 Wasm(WasmInlineAsmReg),
307 Xtensa(XtensaInlineAsmReg),
308 Bpf(BpfInlineAsmReg),
309 Avr(AvrInlineAsmReg),
310 Msp430(Msp430InlineAsmReg),
311 M68k(M68kInlineAsmReg),
312 CSKY(CSKYInlineAsmReg),
313 Err,
315}
316
317impl InlineAsmReg {
318 pub fn name(self) -> Cow<'static, str> {
319 match self {
320 Self::X86(r) => r.name().into(),
321 Self::Arm(r) => r.name().into(),
322 Self::AArch64(r) => r.name().into(),
323 Self::Amdgpu(r) => r.name().into(),
324 Self::RiscV(r) => r.name().into(),
325 Self::PowerPC(r) => r.name().into(),
326 Self::Hexagon(r) => r.name().into(),
327 Self::LoongArch(r) => r.name().into(),
328 Self::Mips(r) => r.name().into(),
329 Self::S390x(r) => r.name().into(),
330 Self::Sparc(r) => r.name().into(),
331 Self::Xtensa(r) => r.name().into(),
332 Self::Bpf(r) => r.name().into(),
333 Self::Avr(r) => r.name().into(),
334 Self::Msp430(r) => r.name().into(),
335 Self::M68k(r) => r.name().into(),
336 Self::CSKY(r) => r.name().into(),
337 Self::Err => "<reg>".into(),
338 }
339 }
340
341 pub fn reg_class(self) -> InlineAsmRegClass {
342 match self {
343 Self::X86(r) => InlineAsmRegClass::X86(r.reg_class()),
344 Self::Arm(r) => InlineAsmRegClass::Arm(r.reg_class()),
345 Self::AArch64(r) => InlineAsmRegClass::AArch64(r.reg_class()),
346 Self::Amdgpu(r) => InlineAsmRegClass::Amdgpu(r.reg_class()),
347 Self::RiscV(r) => InlineAsmRegClass::RiscV(r.reg_class()),
348 Self::PowerPC(r) => InlineAsmRegClass::PowerPC(r.reg_class()),
349 Self::Hexagon(r) => InlineAsmRegClass::Hexagon(r.reg_class()),
350 Self::LoongArch(r) => InlineAsmRegClass::LoongArch(r.reg_class()),
351 Self::Mips(r) => InlineAsmRegClass::Mips(r.reg_class()),
352 Self::S390x(r) => InlineAsmRegClass::S390x(r.reg_class()),
353 Self::Sparc(r) => InlineAsmRegClass::Sparc(r.reg_class()),
354 Self::Xtensa(r) => InlineAsmRegClass::Xtensa(r.reg_class()),
355 Self::Bpf(r) => InlineAsmRegClass::Bpf(r.reg_class()),
356 Self::Avr(r) => InlineAsmRegClass::Avr(r.reg_class()),
357 Self::Msp430(r) => InlineAsmRegClass::Msp430(r.reg_class()),
358 Self::M68k(r) => InlineAsmRegClass::M68k(r.reg_class()),
359 Self::CSKY(r) => InlineAsmRegClass::CSKY(r.reg_class()),
360 Self::Err => InlineAsmRegClass::Err,
361 }
362 }
363
364 pub fn parse(arch: InlineAsmArch, name: Symbol) -> Result<Self, &'static str> {
365 let name = name.as_str();
368 Ok(match arch {
369 InlineAsmArch::X86 | InlineAsmArch::X86_64 => Self::X86(X86InlineAsmReg::parse(name)?),
370 InlineAsmArch::Arm => Self::Arm(ArmInlineAsmReg::parse(name)?),
371 InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
372 Self::AArch64(AArch64InlineAsmReg::parse(name)?)
373 }
374 InlineAsmArch::Amdgpu => Self::Amdgpu(AmdgpuInlineAsmReg::parse(name)?),
375 InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
376 Self::RiscV(RiscVInlineAsmReg::parse(name)?)
377 }
378 InlineAsmArch::Nvptx64 => Self::Nvptx(NvptxInlineAsmReg::parse(name)?),
379 InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
380 Self::PowerPC(PowerPCInlineAsmReg::parse(name)?)
381 }
382 InlineAsmArch::Hexagon => Self::Hexagon(HexagonInlineAsmReg::parse(name)?),
383 InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
384 Self::LoongArch(LoongArchInlineAsmReg::parse(name)?)
385 }
386 InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
387 Self::Mips(MipsInlineAsmReg::parse(name)?)
388 }
389 InlineAsmArch::Xtensa => Self::Xtensa(XtensaInlineAsmReg::parse(name)?),
390 InlineAsmArch::S390x => Self::S390x(S390xInlineAsmReg::parse(name)?),
391 InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
392 Self::Sparc(SparcInlineAsmReg::parse(name)?)
393 }
394 InlineAsmArch::SpirV => Self::SpirV(SpirVInlineAsmReg::parse(name)?),
395 InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
396 Self::Wasm(WasmInlineAsmReg::parse(name)?)
397 }
398 InlineAsmArch::Bpf => Self::Bpf(BpfInlineAsmReg::parse(name)?),
399 InlineAsmArch::Avr => Self::Avr(AvrInlineAsmReg::parse(name)?),
400 InlineAsmArch::Msp430 => Self::Msp430(Msp430InlineAsmReg::parse(name)?),
401 InlineAsmArch::M68k => Self::M68k(M68kInlineAsmReg::parse(name)?),
402 InlineAsmArch::CSKY => Self::CSKY(CSKYInlineAsmReg::parse(name)?),
403 })
404 }
405
406 pub fn validate(
407 self,
408 arch: InlineAsmArch,
409 reloc_model: RelocModel,
410 target_features: &FxIndexSet<Symbol>,
411 target: &Target,
412 is_clobber: bool,
413 ) -> Result<(), &'static str> {
414 match self {
415 Self::X86(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
416 Self::Arm(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
417 Self::AArch64(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
418 Self::Amdgpu(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
419 Self::RiscV(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
420 Self::PowerPC(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
421 Self::Hexagon(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
422 Self::LoongArch(r) => {
423 r.validate(arch, reloc_model, target_features, target, is_clobber)
424 }
425 Self::Mips(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
426 Self::S390x(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
427 Self::Sparc(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
428 Self::Bpf(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
429 Self::Avr(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
430 Self::Xtensa(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
431 Self::Msp430(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
432 Self::M68k(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
433 Self::CSKY(r) => r.validate(arch, reloc_model, target_features, target, is_clobber),
434 Self::Err => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
435 }
436 }
437
438 pub fn emit(
441 self,
442 out: &mut dyn fmt::Write,
443 arch: InlineAsmArch,
444 modifier: Option<char>,
445 ) -> fmt::Result {
446 match self {
447 Self::X86(r) => r.emit(out, arch, modifier),
448 Self::Arm(r) => r.emit(out, arch, modifier),
449 Self::AArch64(r) => r.emit(out, arch, modifier),
450 Self::Amdgpu(r) => r.emit(out, arch, modifier),
451 Self::RiscV(r) => r.emit(out, arch, modifier),
452 Self::PowerPC(r) => r.emit(out, arch, modifier),
453 Self::Hexagon(r) => r.emit(out, arch, modifier),
454 Self::LoongArch(r) => r.emit(out, arch, modifier),
455 Self::Mips(r) => r.emit(out, arch, modifier),
456 Self::S390x(r) => r.emit(out, arch, modifier),
457 Self::Sparc(r) => r.emit(out, arch, modifier),
458 Self::Xtensa(r) => r.emit(out, arch, modifier),
459 Self::Bpf(r) => r.emit(out, arch, modifier),
460 Self::Avr(r) => r.emit(out, arch, modifier),
461 Self::Msp430(r) => r.emit(out, arch, modifier),
462 Self::M68k(r) => r.emit(out, arch, modifier),
463 Self::CSKY(r) => r.emit(out, arch, modifier),
464 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"),
465 }
466 }
467
468 pub fn overlapping_regs(self, mut cb: impl FnMut(InlineAsmReg)) {
469 match self {
470 Self::X86(r) => r.overlapping_regs(|r| cb(Self::X86(r))),
471 Self::Arm(r) => r.overlapping_regs(|r| cb(Self::Arm(r))),
472 Self::AArch64(_) => cb(self),
473 Self::Amdgpu(r) => r.overlapping_regs(|r| cb(Self::Amdgpu(r))),
474 Self::RiscV(_) => cb(self),
475 Self::PowerPC(r) => r.overlapping_regs(|r| cb(Self::PowerPC(r))),
476 Self::Hexagon(r) => r.overlapping_regs(|r| cb(Self::Hexagon(r))),
477 Self::LoongArch(_) => cb(self),
478 Self::Mips(_) => cb(self),
479 Self::S390x(r) => r.overlapping_regs(|r| cb(Self::S390x(r))),
480 Self::Sparc(_) => cb(self),
481 Self::Xtensa(_) => cb(self),
482 Self::Bpf(r) => r.overlapping_regs(|r| cb(Self::Bpf(r))),
483 Self::Avr(r) => r.overlapping_regs(|r| cb(Self::Avr(r))),
484 Self::Msp430(_) => cb(self),
485 Self::M68k(_) => cb(self),
486 Self::CSKY(_) => cb(self),
487 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"),
488 }
489 }
490}
491
492#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmRegClass { }Copy, #[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::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)]
493#[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)]
494pub enum InlineAsmRegClass {
495 X86(X86InlineAsmRegClass),
496 Arm(ArmInlineAsmRegClass),
497 AArch64(AArch64InlineAsmRegClass),
498 Amdgpu(AmdgpuInlineAsmRegClass),
499 RiscV(RiscVInlineAsmRegClass),
500 Nvptx(NvptxInlineAsmRegClass),
501 PowerPC(PowerPCInlineAsmRegClass),
502 Hexagon(HexagonInlineAsmRegClass),
503 LoongArch(LoongArchInlineAsmRegClass),
504 Mips(MipsInlineAsmRegClass),
505 S390x(S390xInlineAsmRegClass),
506 Sparc(SparcInlineAsmRegClass),
507 SpirV(SpirVInlineAsmRegClass),
508 Wasm(WasmInlineAsmRegClass),
509 Xtensa(XtensaInlineAsmRegClass),
510 Bpf(BpfInlineAsmRegClass),
511 Avr(AvrInlineAsmRegClass),
512 Msp430(Msp430InlineAsmRegClass),
513 M68k(M68kInlineAsmRegClass),
514 CSKY(CSKYInlineAsmRegClass),
515 Err,
517}
518
519impl InlineAsmRegClass {
520 pub fn name(self) -> Symbol {
521 match self {
522 Self::X86(r) => r.name(),
523 Self::Arm(r) => r.name(),
524 Self::AArch64(r) => r.name(),
525 Self::Amdgpu(r) => r.name(),
526 Self::RiscV(r) => r.name(),
527 Self::Nvptx(r) => r.name(),
528 Self::PowerPC(r) => r.name(),
529 Self::Hexagon(r) => r.name(),
530 Self::LoongArch(r) => r.name(),
531 Self::Mips(r) => r.name(),
532 Self::S390x(r) => r.name(),
533 Self::Sparc(r) => r.name(),
534 Self::SpirV(r) => r.name(),
535 Self::Wasm(r) => r.name(),
536 Self::Xtensa(r) => r.name(),
537 Self::Bpf(r) => r.name(),
538 Self::Avr(r) => r.name(),
539 Self::Msp430(r) => r.name(),
540 Self::M68k(r) => r.name(),
541 Self::CSKY(r) => r.name(),
542 Self::Err => rustc_span::sym::reg,
543 }
544 }
545
546 pub fn suggest_class(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<Self> {
550 match self {
551 Self::X86(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::X86),
552 Self::Arm(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Arm),
553 Self::AArch64(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::AArch64),
554 Self::Amdgpu(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Amdgpu),
555 Self::RiscV(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::RiscV),
556 Self::Nvptx(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Nvptx),
557 Self::PowerPC(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::PowerPC),
558 Self::Hexagon(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Hexagon),
559 Self::LoongArch(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::LoongArch),
560 Self::Mips(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Mips),
561 Self::S390x(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::S390x),
562 Self::Sparc(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Sparc),
563 Self::SpirV(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::SpirV),
564 Self::Wasm(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Wasm),
565 Self::Xtensa(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Xtensa),
566 Self::Bpf(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Bpf),
567 Self::Avr(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Avr),
568 Self::Msp430(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::Msp430),
569 Self::M68k(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::M68k),
570 Self::CSKY(r) => r.suggest_class(arch, ty).map(InlineAsmRegClass::CSKY),
571 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"),
572 }
573 }
574
575 pub fn suggest_modifier(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<ModifierInfo> {
582 match self {
583 Self::X86(r) => r.suggest_modifier(arch, ty),
584 Self::Arm(r) => r.suggest_modifier(arch, ty),
585 Self::AArch64(r) => r.suggest_modifier(arch, ty),
586 Self::Amdgpu(r) => r.suggest_modifier(arch, ty),
587 Self::RiscV(r) => r.suggest_modifier(arch, ty),
588 Self::Nvptx(r) => r.suggest_modifier(arch, ty),
589 Self::PowerPC(r) => r.suggest_modifier(arch, ty),
590 Self::Hexagon(r) => r.suggest_modifier(arch, ty),
591 Self::LoongArch(r) => r.suggest_modifier(arch, ty),
592 Self::Mips(r) => r.suggest_modifier(arch, ty),
593 Self::S390x(r) => r.suggest_modifier(arch, ty),
594 Self::Sparc(r) => r.suggest_modifier(arch, ty),
595 Self::SpirV(r) => r.suggest_modifier(arch, ty),
596 Self::Wasm(r) => r.suggest_modifier(arch, ty),
597 Self::Xtensa(r) => r.suggest_modifier(arch, ty),
598 Self::Bpf(r) => r.suggest_modifier(arch, ty),
599 Self::Avr(r) => r.suggest_modifier(arch, ty),
600 Self::Msp430(r) => r.suggest_modifier(arch, ty),
601 Self::M68k(r) => r.suggest_modifier(arch, ty),
602 Self::CSKY(r) => r.suggest_modifier(arch, ty),
603 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"),
604 }
605 }
606
607 pub fn default_modifier(self, arch: InlineAsmArch) -> Option<ModifierInfo> {
614 match self {
615 Self::X86(r) => r.default_modifier(arch),
616 Self::Arm(r) => r.default_modifier(arch),
617 Self::AArch64(r) => r.default_modifier(arch),
618 Self::Amdgpu(r) => r.default_modifier(arch),
619 Self::RiscV(r) => r.default_modifier(arch),
620 Self::Nvptx(r) => r.default_modifier(arch),
621 Self::PowerPC(r) => r.default_modifier(arch),
622 Self::Hexagon(r) => r.default_modifier(arch),
623 Self::LoongArch(r) => r.default_modifier(arch),
624 Self::Mips(r) => r.default_modifier(arch),
625 Self::S390x(r) => r.default_modifier(arch),
626 Self::Sparc(r) => r.default_modifier(arch),
627 Self::SpirV(r) => r.default_modifier(arch),
628 Self::Wasm(r) => r.default_modifier(arch),
629 Self::Xtensa(r) => r.default_modifier(arch),
630 Self::Bpf(r) => r.default_modifier(arch),
631 Self::Avr(r) => r.default_modifier(arch),
632 Self::Msp430(r) => r.default_modifier(arch),
633 Self::M68k(r) => r.default_modifier(arch),
634 Self::CSKY(r) => r.default_modifier(arch),
635 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"),
636 }
637 }
638
639 pub fn supported_types(
645 self,
646 arch: InlineAsmArch,
647 allow_experimental_reg: bool,
648 ) -> Cow<'static, [(InlineAsmType, Option<Symbol>)]> {
649 match self {
650 Self::X86(r) => r.supported_types(arch, allow_experimental_reg).into(),
651 Self::Arm(r) => r.supported_types(arch).into(),
652 Self::AArch64(r) => r.supported_types(arch).into(),
653 Self::Amdgpu(r) => r.supported_types(arch).into(),
654 Self::RiscV(r) => r.supported_types(arch).into(),
655 Self::Nvptx(r) => r.supported_types(arch).into(),
656 Self::PowerPC(r) => r.supported_types(arch).into(),
657 Self::Hexagon(r) => r.supported_types(arch).into(),
658 Self::LoongArch(r) => r.supported_types(arch).into(),
659 Self::Mips(r) => r.supported_types(arch).into(),
660 Self::S390x(r) => r.supported_types(arch).into(),
661 Self::Sparc(r) => r.supported_types(arch).into(),
662 Self::SpirV(r) => r.supported_types(arch).into(),
663 Self::Wasm(r) => r.supported_types(arch).into(),
664 Self::Xtensa(r) => r.supported_types(arch).into(),
665 Self::Bpf(r) => r.supported_types(arch).into(),
666 Self::Avr(r) => r.supported_types(arch).into(),
667 Self::Msp430(r) => r.supported_types(arch).into(),
668 Self::M68k(r) => r.supported_types(arch).into(),
669 Self::CSKY(r) => r.supported_types(arch).into(),
670 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"),
671 }
672 }
673
674 pub fn parse(arch: InlineAsmArch, name: Symbol) -> Result<Self, &'static [rustc_span::Symbol]> {
675 Ok(match arch {
676 InlineAsmArch::X86 | InlineAsmArch::X86_64 => {
677 Self::X86(X86InlineAsmRegClass::parse(name)?)
678 }
679 InlineAsmArch::Arm => Self::Arm(ArmInlineAsmRegClass::parse(name)?),
680 InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
681 Self::AArch64(AArch64InlineAsmRegClass::parse(name)?)
682 }
683 InlineAsmArch::Amdgpu => Self::Amdgpu(AmdgpuInlineAsmRegClass::parse(name)?),
684 InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
685 Self::RiscV(RiscVInlineAsmRegClass::parse(name)?)
686 }
687 InlineAsmArch::Nvptx64 => Self::Nvptx(NvptxInlineAsmRegClass::parse(name)?),
688 InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
689 Self::PowerPC(PowerPCInlineAsmRegClass::parse(name)?)
690 }
691 InlineAsmArch::Hexagon => Self::Hexagon(HexagonInlineAsmRegClass::parse(name)?),
692 InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
693 Self::LoongArch(LoongArchInlineAsmRegClass::parse(name)?)
694 }
695 InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
696 Self::Mips(MipsInlineAsmRegClass::parse(name)?)
697 }
698 InlineAsmArch::S390x => Self::S390x(S390xInlineAsmRegClass::parse(name)?),
699 InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
700 Self::Sparc(SparcInlineAsmRegClass::parse(name)?)
701 }
702 InlineAsmArch::SpirV => Self::SpirV(SpirVInlineAsmRegClass::parse(name)?),
703 InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
704 Self::Wasm(WasmInlineAsmRegClass::parse(name)?)
705 }
706 InlineAsmArch::Bpf => Self::Bpf(BpfInlineAsmRegClass::parse(name)?),
707 InlineAsmArch::Avr => Self::Avr(AvrInlineAsmRegClass::parse(name)?),
708 InlineAsmArch::Xtensa => Self::Xtensa(XtensaInlineAsmRegClass::parse(name)?),
709 InlineAsmArch::Msp430 => Self::Msp430(Msp430InlineAsmRegClass::parse(name)?),
710 InlineAsmArch::M68k => Self::M68k(M68kInlineAsmRegClass::parse(name)?),
711 InlineAsmArch::CSKY => Self::CSKY(CSKYInlineAsmRegClass::parse(name)?),
712 })
713 }
714
715 pub fn valid_modifiers(self, arch: InlineAsmArch) -> &'static [char] {
718 match self {
719 Self::X86(r) => r.valid_modifiers(arch),
720 Self::Arm(r) => r.valid_modifiers(arch),
721 Self::AArch64(r) => r.valid_modifiers(arch),
722 Self::Amdgpu(r) => r.valid_modifiers(arch),
723 Self::RiscV(r) => r.valid_modifiers(arch),
724 Self::Nvptx(r) => r.valid_modifiers(arch),
725 Self::PowerPC(r) => r.valid_modifiers(arch),
726 Self::Hexagon(r) => r.valid_modifiers(arch),
727 Self::LoongArch(r) => r.valid_modifiers(arch),
728 Self::Mips(r) => r.valid_modifiers(arch),
729 Self::S390x(r) => r.valid_modifiers(arch),
730 Self::Sparc(r) => r.valid_modifiers(arch),
731 Self::SpirV(r) => r.valid_modifiers(arch),
732 Self::Wasm(r) => r.valid_modifiers(arch),
733 Self::Xtensa(r) => r.valid_modifiers(arch),
734 Self::Bpf(r) => r.valid_modifiers(arch),
735 Self::Avr(r) => r.valid_modifiers(arch),
736 Self::Msp430(r) => r.valid_modifiers(arch),
737 Self::M68k(r) => r.valid_modifiers(arch),
738 Self::CSKY(r) => r.valid_modifiers(arch),
739 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"),
740 }
741 }
742
743 pub fn is_clobber_only(self, arch: InlineAsmArch, allow_experimental_reg: bool) -> bool {
749 self.supported_types(arch, allow_experimental_reg).is_empty()
750 }
751}
752
753#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmRegOrRegClass { }Copy, #[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::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)]
754#[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)]
755pub enum InlineAsmRegOrRegClass {
756 Reg(InlineAsmReg),
757 RegClass(InlineAsmRegClass),
758}
759
760impl InlineAsmRegOrRegClass {
761 pub fn reg_class(self) -> InlineAsmRegClass {
762 match self {
763 Self::Reg(r) => r.reg_class(),
764 Self::RegClass(r) => r,
765 }
766 }
767}
768
769impl fmt::Display for InlineAsmRegOrRegClass {
770 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
771 match self {
772 Self::Reg(r) => f.write_fmt(format_args!("\"{0}\"", r.name()))write!(f, "\"{}\"", r.name()),
773 Self::RegClass(r) => f.write_fmt(format_args!("{0}", r.name()))write!(f, "{}", r.name()),
774 }
775 }
776}
777
778#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmType { }Copy, #[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),
}
}
}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::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)]
780pub enum InlineAsmType {
781 I8,
782 I16,
783 I32,
784 I64,
785 I128,
786 F16,
787 F32,
788 F64,
789 F128,
790 VecI8(u64),
791 VecI16(u64),
792 VecI32(u64),
793 VecI64(u64),
794 VecI128(u64),
795 VecF16(u64),
796 VecF32(u64),
797 VecF64(u64),
798 VecF128(u64),
799}
800
801impl InlineAsmType {
802 pub fn is_integer(self) -> bool {
803 #[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)
804 }
805
806 pub fn size(self) -> Size {
807 Size::from_bytes(match self {
808 Self::I8 => 1,
809 Self::I16 => 2,
810 Self::I32 => 4,
811 Self::I64 => 8,
812 Self::I128 => 16,
813 Self::F16 => 2,
814 Self::F32 => 4,
815 Self::F64 => 8,
816 Self::F128 => 16,
817 Self::VecI8(n) => n * 1,
818 Self::VecI16(n) => n * 2,
819 Self::VecI32(n) => n * 4,
820 Self::VecI64(n) => n * 8,
821 Self::VecI128(n) => n * 16,
822 Self::VecF16(n) => n * 2,
823 Self::VecF32(n) => n * 4,
824 Self::VecF64(n) => n * 8,
825 Self::VecF128(n) => n * 16,
826 })
827 }
828}
829
830impl fmt::Display for InlineAsmType {
831 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
832 match *self {
833 Self::I8 => f.write_str("i8"),
834 Self::I16 => f.write_str("i16"),
835 Self::I32 => f.write_str("i32"),
836 Self::I64 => f.write_str("i64"),
837 Self::I128 => f.write_str("i128"),
838 Self::F16 => f.write_str("f16"),
839 Self::F32 => f.write_str("f32"),
840 Self::F64 => f.write_str("f64"),
841 Self::F128 => f.write_str("f128"),
842 Self::VecI8(n) => f.write_fmt(format_args!("i8x{0}", n))write!(f, "i8x{n}"),
843 Self::VecI16(n) => f.write_fmt(format_args!("i16x{0}", n))write!(f, "i16x{n}"),
844 Self::VecI32(n) => f.write_fmt(format_args!("i32x{0}", n))write!(f, "i32x{n}"),
845 Self::VecI64(n) => f.write_fmt(format_args!("i64x{0}", n))write!(f, "i64x{n}"),
846 Self::VecI128(n) => f.write_fmt(format_args!("i128x{0}", n))write!(f, "i128x{n}"),
847 Self::VecF16(n) => f.write_fmt(format_args!("f16x{0}", n))write!(f, "f16x{n}"),
848 Self::VecF32(n) => f.write_fmt(format_args!("f32x{0}", n))write!(f, "f32x{n}"),
849 Self::VecF64(n) => f.write_fmt(format_args!("f64x{0}", n))write!(f, "f64x{n}"),
850 Self::VecF128(n) => f.write_fmt(format_args!("f128x{0}", n))write!(f, "f128x{n}"),
851 }
852 }
853}
854
855pub fn allocatable_registers(
864 arch: InlineAsmArch,
865 reloc_model: RelocModel,
866 target_features: &FxIndexSet<Symbol>,
867 target: &crate::spec::Target,
868) -> FxHashMap<InlineAsmRegClass, FxIndexSet<InlineAsmReg>> {
869 match arch {
870 InlineAsmArch::X86 | InlineAsmArch::X86_64 => {
871 let mut map = x86::regclass_map();
872 x86::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
873 map
874 }
875 InlineAsmArch::Arm => {
876 let mut map = arm::regclass_map();
877 arm::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
878 map
879 }
880 InlineAsmArch::AArch64 | InlineAsmArch::Arm64EC => {
881 let mut map = aarch64::regclass_map();
882 aarch64::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
883 map
884 }
885 InlineAsmArch::Amdgpu => {
886 let mut map = amdgpu::regclass_map();
887 amdgpu::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
888 map
889 }
890 InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
891 let mut map = riscv::regclass_map();
892 riscv::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
893 map
894 }
895 InlineAsmArch::Nvptx64 => {
896 let mut map = nvptx::regclass_map();
897 nvptx::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
898 map
899 }
900 InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
901 let mut map = powerpc::regclass_map();
902 powerpc::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
903 map
904 }
905 InlineAsmArch::Hexagon => {
906 let mut map = hexagon::regclass_map();
907 hexagon::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
908 map
909 }
910 InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => {
911 let mut map = loongarch::regclass_map();
912 loongarch::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
913 map
914 }
915 InlineAsmArch::Mips | InlineAsmArch::Mips64 => {
916 let mut map = mips::regclass_map();
917 mips::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
918 map
919 }
920 InlineAsmArch::S390x => {
921 let mut map = s390x::regclass_map();
922 s390x::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
923 map
924 }
925 InlineAsmArch::Sparc | InlineAsmArch::Sparc64 => {
926 let mut map = sparc::regclass_map();
927 sparc::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
928 map
929 }
930 InlineAsmArch::SpirV => {
931 let mut map = spirv::regclass_map();
932 spirv::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
933 map
934 }
935 InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {
936 let mut map = wasm::regclass_map();
937 wasm::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
938 map
939 }
940 InlineAsmArch::Xtensa => {
941 let mut map = xtensa::regclass_map();
942 xtensa::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
943 map
944 }
945 InlineAsmArch::Bpf => {
946 let mut map = bpf::regclass_map();
947 bpf::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
948 map
949 }
950 InlineAsmArch::Avr => {
951 let mut map = avr::regclass_map();
952 avr::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
953 map
954 }
955 InlineAsmArch::Msp430 => {
956 let mut map = msp430::regclass_map();
957 msp430::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
958 map
959 }
960 InlineAsmArch::M68k => {
961 let mut map = m68k::regclass_map();
962 m68k::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
963 map
964 }
965 InlineAsmArch::CSKY => {
966 let mut map = csky::regclass_map();
967 csky::fill_reg_map(arch, reloc_model, target_features, target, &mut map);
968 map
969 }
970 }
971}
972
973#[derive(#[automatically_derived]
impl ::core::marker::Copy for InlineAsmClobberAbi { }Copy, #[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::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)]
974#[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);
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 => {}
}
}
}
};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)]
975pub enum InlineAsmClobberAbi {
976 X86,
977 X86_64Win,
978 X86_64SysV,
979 Arm,
980 AArch64,
981 AArch64NoX18,
982 Arm64EC,
983 Avr,
984 RiscV,
985 RiscVE,
986 LoongArch,
987 PowerPC,
988 PowerPCSPE,
989 S390x,
990 Bpf,
991 Msp430,
992 Xtensa,
993}
994
995impl InlineAsmClobberAbi {
996 pub fn parse(
999 arch: InlineAsmArch,
1000 target: &Target,
1001 target_features: &FxIndexSet<Symbol>,
1002 name: Symbol,
1003 ) -> Result<Self, &'static [&'static str]> {
1004 let name = name.as_str();
1005 match arch {
1006 InlineAsmArch::X86 => match name {
1007 "C" | "system" | "efiapi" | "cdecl" | "stdcall" | "fastcall" => {
1008 Ok(InlineAsmClobberAbi::X86)
1009 }
1010 _ => Err(&["C", "system", "efiapi", "cdecl", "stdcall", "fastcall"]),
1011 },
1012 InlineAsmArch::X86_64 => match name {
1013 "C" | "system" if !target.is_like_windows => Ok(InlineAsmClobberAbi::X86_64SysV),
1014 "C" | "system" if target.is_like_windows => Ok(InlineAsmClobberAbi::X86_64Win),
1015 "win64" | "efiapi" => Ok(InlineAsmClobberAbi::X86_64Win),
1016 "sysv64" => Ok(InlineAsmClobberAbi::X86_64SysV),
1017 _ => Err(&["C", "system", "efiapi", "win64", "sysv64"]),
1018 },
1019 InlineAsmArch::Arm => match name {
1020 "C" | "system" | "efiapi" | "aapcs" => Ok(InlineAsmClobberAbi::Arm),
1021 _ => Err(&["C", "system", "efiapi", "aapcs"]),
1022 },
1023 InlineAsmArch::AArch64 => match name {
1024 "C" | "system" | "efiapi" => {
1025 Ok(if aarch64::target_reserves_x18(target, target_features) {
1026 InlineAsmClobberAbi::AArch64NoX18
1027 } else {
1028 InlineAsmClobberAbi::AArch64
1029 })
1030 }
1031 _ => Err(&["C", "system", "efiapi"]),
1032 },
1033 InlineAsmArch::Arm64EC => match name {
1034 "C" | "system" => Ok(InlineAsmClobberAbi::Arm64EC),
1035 _ => Err(&["C", "system"]),
1036 },
1037 InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => match name {
1038 "C" | "system" | "efiapi" => Ok(if riscv::is_e(target_features) {
1039 InlineAsmClobberAbi::RiscVE
1040 } else {
1041 InlineAsmClobberAbi::RiscV
1042 }),
1043 _ => Err(&["C", "system", "efiapi"]),
1044 },
1045 InlineAsmArch::Avr => match name {
1046 "C" | "system" => Ok(InlineAsmClobberAbi::Avr),
1047 _ => Err(&["C", "system"]),
1048 },
1049 InlineAsmArch::LoongArch32 | InlineAsmArch::LoongArch64 => match name {
1050 "C" | "system" | "efiapi" => Ok(InlineAsmClobberAbi::LoongArch),
1051 _ => Err(&["C", "system", "efiapi"]),
1052 },
1053 InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => match name {
1054 "C" | "system" => Ok(if powerpc::is_spe(target) {
1055 InlineAsmClobberAbi::PowerPCSPE
1056 } else {
1057 InlineAsmClobberAbi::PowerPC
1058 }),
1059 _ => Err(&["C", "system"]),
1060 },
1061 InlineAsmArch::S390x => match name {
1062 "C" | "system" => Ok(InlineAsmClobberAbi::S390x),
1063 _ => Err(&["C", "system"]),
1064 },
1065 InlineAsmArch::Bpf => match name {
1066 "C" | "system" => Ok(InlineAsmClobberAbi::Bpf),
1067 _ => Err(&["C", "system"]),
1068 },
1069 InlineAsmArch::Msp430 => match name {
1070 "C" | "system" => Ok(InlineAsmClobberAbi::Msp430),
1071 _ => Err(&["C", "system"]),
1072 },
1073 InlineAsmArch::Xtensa => match name {
1074 "C" | "system" => Ok(InlineAsmClobberAbi::Xtensa),
1075 _ => Err(&["C", "system"]),
1076 },
1077 _ => Err(&[]),
1078 }
1079 }
1080
1081 pub fn clobbered_regs(self) -> &'static [InlineAsmReg] {
1083 macro_rules! clobbered_regs {
1084 ($arch:ident $arch_reg:ident {
1085 $(
1086 $reg:ident,
1087 )*
1088 }) => {
1089 &[
1090 $(InlineAsmReg::$arch($arch_reg::$reg),)*
1091 ]
1092 };
1093 }
1094 match self {
1095 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! {
1096 X86 X86InlineAsmReg {
1097 ax, cx, dx,
1098
1099 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1100
1101 k0, k1, k2, k3, k4, k5, k6, k7,
1102
1103 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1104 st0, st1, st2, st3, st4, st5, st6, st7,
1105 }
1106 },
1107 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! {
1108 X86 X86InlineAsmReg {
1109 ax, cx, dx, si, di, r8, r9, r10, r11,
1110
1111 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1112 xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,
1113 zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23,
1114 zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31,
1115
1116 k0, k1, k2, k3, k4, k5, k6, k7,
1117
1118 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1119 st0, st1, st2, st3, st4, st5, st6, st7,
1120 tmm0, tmm1, tmm2, tmm3, tmm4, tmm5, tmm6, tmm7,
1121 }
1122 },
1123 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! {
1124 X86 X86InlineAsmReg {
1125 ax, cx, dx, r8, r9, r10, r11,
1127
1128 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
1132 xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,
1133 zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23,
1134 zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31,
1135
1136 k0, k1, k2, k3, k4, k5, k6, k7,
1137
1138 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7,
1139 st0, st1, st2, st3, st4, st5, st6, st7,
1140 tmm0, tmm1, tmm2, tmm3, tmm4, tmm5, tmm6, tmm7,
1141 }
1142 },
1143 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! {
1144 AArch64 AArch64InlineAsmReg {
1145 x0, x1, x2, x3, x4, x5, x6, x7,
1146 x8, x9, x10, x11, x12, x13, x14, x15,
1147 x16, x17, x18, x30,
1148
1149 v0, v1, v2, v3, v4, v5, v6, v7,
1152 v8, v9, v10, v11, v12, v13, v14, v15,
1153 v16, v17, v18, v19, v20, v21, v22, v23,
1154 v24, v25, v26, v27, v28, v29, v30, v31,
1155
1156 p0, p1, p2, p3, p4, p5, p6, p7,
1157 p8, p9, p10, p11, p12, p13, p14, p15,
1158 ffr,
1159 }
1160 },
1161 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! {
1162 AArch64 AArch64InlineAsmReg {
1163 x0, x1, x2, x3, x4, x5, x6, x7,
1164 x8, x9, x10, x11, x12, x13, x14, x15,
1165 x16, x17, x30,
1166
1167 v0, v1, v2, v3, v4, v5, v6, v7,
1170 v8, v9, v10, v11, v12, v13, v14, v15,
1171 v16, v17, v18, v19, v20, v21, v22, v23,
1172 v24, v25, v26, v27, v28, v29, v30, v31,
1173
1174 p0, p1, p2, p3, p4, p5, p6, p7,
1175 p8, p9, p10, p11, p12, p13, p14, p15,
1176 ffr,
1177 }
1178 },
1179 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! {
1180 AArch64 AArch64InlineAsmReg {
1181 x0, x1, x2, x3, x4, x5, x6, x7,
1183 x8, x9, x10, x11, x12, x15,
1184 x16, x17, x30,
1185
1186 v0, v1, v2, v3, v4, v5, v6, v7,
1189 v8, v9, v10, v11, v12, v13, v14, v15,
1190 }
1192 },
1193 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! {
1194 Arm ArmInlineAsmReg {
1195 r0, r1, r2, r3, r12, r14,
1198
1199 s0, s1, s2, s3, s4, s5, s6, s7,
1202 s8, s9, s10, s11, s12, s13, s14, s15,
1203 d16, d17, d18, d19, d20, d21, d22, d23,
1205 d24, d25, d26, d27, d28, d29, d30, d31,
1206 }
1207 },
1208 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! {
1209 Avr AvrInlineAsmReg {
1210 r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r30, r31,
1215 }
1224 },
1225 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! {
1226 RiscV RiscVInlineAsmReg {
1227 x1,
1229 x5, x6, x7,
1231 x10, x11, x12, x13, x14, x15, x16, x17,
1233 x28, x29, x30, x31,
1235 f0, f1, f2, f3, f4, f5, f6, f7,
1237 f10, f11, f12, f13, f14, f15, f16, f17,
1239 f28, f29, f30, f31,
1241
1242 v0, v1, v2, v3, v4, v5, v6, v7,
1243 v8, v9, v10, v11, v12, v13, v14, v15,
1244 v16, v17, v18, v19, v20, v21, v22, v23,
1245 v24, v25, v26, v27, v28, v29, v30, v31,
1246 }
1247 },
1248 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! {
1249 RiscV RiscVInlineAsmReg {
1250 x1,
1256 x5, x6, x7,
1258 x10, x11, x12, x13, x14, x15,
1260 f0, f1, f2, f3, f4, f5, f6, f7,
1262 f10, f11, f12, f13, f14, f15, f16, f17,
1264 f28, f29, f30, f31,
1266
1267 v0, v1, v2, v3, v4, v5, v6, v7,
1268 v8, v9, v10, v11, v12, v13, v14, v15,
1269 v16, v17, v18, v19, v20, v21, v22, v23,
1270 v24, v25, v26, v27, v28, v29, v30, v31,
1271 }
1272 },
1273 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! {
1274 LoongArch LoongArchInlineAsmReg {
1275 r1,
1277 r4, r5, r6, r7, r8, r9, r10, r11,
1279 r12, r13, r14, r15, r16, r17, r18, r19, r20,
1281 f0, f1, f2, f3, f4, f5, f6, f7,
1283 f8, f9, f10, f11, f12, f13, f14, f15,
1285 f16, f17, f18, f19, f20, f21, f22, f23,
1286 }
1287 },
1288 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! {
1289 PowerPC PowerPCInlineAsmReg {
1290 r0,
1307 r3, r4, r5, r6, r7,
1308 r8, r9, r10, r11, r12,
1309
1310 f0, f1, f2, f3, f4, f5, f6, f7,
1312 f8, f9, f10, f11, f12, f13,
1313 vs0, vs1, vs2, vs3, vs4, vs5, vs6, vs7,
1314 vs8, vs9, vs10, vs11, vs12, vs13,
1315
1316 vs14, vs15, vs16, vs17, vs18, vs19, vs20,
1319 vs21, vs22, vs23, vs24, vs25, vs26, vs27,
1320 vs28, vs29, vs30, vs31,
1321
1322 v0, v1, v2, v3, v4, v5, v6, v7,
1324 v8, v9, v10, v11, v12, v13, v14,
1325 v15, v16, v17, v18, v19,
1326
1327 cr0, cr1,
1329 cr5, cr6, cr7,
1330 ctr,
1331 lr,
1332 xer,
1333 }
1334 },
1335 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! {
1336 PowerPC PowerPCInlineAsmReg {
1337 r0,
1339 r3, r4, r5, r6, r7,
1340 r8, r9, r10, r11, r12,
1341
1342 cr0, cr1,
1344 cr5, cr6, cr7,
1345 ctr,
1346 lr,
1347 xer,
1348 spe_acc,
1349 }
1350 },
1351 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! {
1352 S390x S390xInlineAsmReg {
1353 r0, r1, r2, r3, r4, r5,
1354 r14,
1355
1356 f0, f1, f2, f3, f4, f5, f6, f7,
1358 v0, v1, v2, v3, v4, v5, v6, v7,
1359
1360 v8, v9, v10, v11, v12, v13, v14, v15,
1363
1364 v16, v17, v18, v19, v20, v21, v22, v23,
1366 v24, v25, v26, v27, v28, v29, v30, v31,
1367
1368 a2, a3, a4, a5, a6, a7,
1370 a8, a9, a10, a11, a12, a13, a14, a15,
1371 }
1372 },
1373 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! {
1374 Bpf BpfInlineAsmReg {
1375 r0, r1, r2, r3, r4, r5,
1379 }
1380 },
1381 InlineAsmClobberAbi::Msp430 => &[InlineAsmReg::Msp430(Msp430InlineAsmReg::r11),
InlineAsmReg::Msp430(Msp430InlineAsmReg::r12),
InlineAsmReg::Msp430(Msp430InlineAsmReg::r13),
InlineAsmReg::Msp430(Msp430InlineAsmReg::r14),
InlineAsmReg::Msp430(Msp430InlineAsmReg::r15)]clobbered_regs! {
1382 Msp430 Msp430InlineAsmReg {
1383 r11, r12, r13, r14, r15,
1384 }
1385 },
1386 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! {
1387 Xtensa XtensaInlineAsmReg {
1388 a2, a3, a4, a5, a6, a7,
1398 a8, a9, a10, a11,
1399
1400 f0, f1, f2, f3, f4, f5, f6, f7,
1402 f8, f9, f10, f11, f12, f13, f14, f15,
1403
1404 sar,
1406
1407 scompare1,
1409
1410 lbeg, lend, lcount,
1412
1413 acclo, acchi,
1415 m0, m1, m2, m3,
1416
1417 b0, b1, b2, b3, b4, b5, b6, b7,
1419 b8, b9, b10, b11, b12, b13, b14, b15,
1420 }
1421 },
1422 }
1423 }
1424}