/src/wasmtime/target/debug/build/cranelift-codegen-ae4c7f8e8f9c755f/out/settings-arm64.rs
Line | Count | Source |
1 | | #[derive(Clone, PartialEq, Hash)] // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:397 |
2 | | /// Flags group `arm64`. |
3 | | pub struct Flags { |
4 | | bytes: [u8; 2], // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:400 |
5 | | } |
6 | | impl Flags { |
7 | | /// Create flags arm64 settings group. |
8 | | #[allow(unused_variables, reason = "generated code")] // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:24 |
9 | 5.86k | pub fn new(shared: &settings::Flags, builder: &Builder) -> Self { |
10 | 5.86k | let bvec = builder.state_for("arm64"); // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:29 |
11 | 5.86k | let mut arm64 = Self { bytes: [0; 2] }; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:30 |
12 | 5.86k | debug_assert_eq!(bvec.len(), 2); // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:36 |
13 | 5.86k | arm64.bytes[0..2].copy_from_slice(&bvec); // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:41 |
14 | 5.86k | arm64 // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:48 |
15 | 5.86k | } |
16 | | } |
17 | | impl Flags { |
18 | | /// Iterates the setting values. |
19 | 3.86k | pub fn iter(&self) -> impl Iterator<Item = Value> + use<> { |
20 | 3.86k | let mut bytes = [0; 2]; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:58 |
21 | 3.86k | bytes.copy_from_slice(&self.bytes[0..2]); // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:59 |
22 | 34.7k | DESCRIPTORS.iter().filter_map(move |d| { |
23 | 34.7k | let values = match &d.detail { |
24 | 0 | detail::Detail::Preset => return None, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:62 |
25 | 0 | detail::Detail::Enum { last, enumerators } => Some(TEMPLATE.enums(*last, *enumerators)), // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:63 |
26 | 34.7k | _ => None // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:64 |
27 | | } |
28 | | ; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:66 |
29 | 34.7k | Some(Value { name: d.name, detail: d.detail, values, value: bytes[d.offset as usize] }) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:67 |
30 | 34.7k | } |
31 | | ) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:69 |
32 | 3.86k | } |
33 | | } |
34 | | /// User-defined settings. |
35 | | #[allow(dead_code, reason = "generated code")] // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:183 |
36 | | impl Flags { |
37 | | /// Dynamic numbered predicate getter. |
38 | 21.8k | fn numbered_predicate(&self, p: usize) -> bool { |
39 | 21.8k | self.bytes[0 + p / 8] & (1 << (p % 8)) != 0 // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:188 |
40 | 21.8k | } |
41 | | /// Has Large System Extensions (FEAT_LSE) support. |
42 | 656 | pub fn has_lse(&self) -> bool { |
43 | 656 | self.numbered_predicate(0) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
44 | 656 | } |
45 | | /// Has Pointer authentication (FEAT_PAuth) support; enables the use of non-HINT instructions, but does not have an effect on code generation by itself. |
46 | 1.02k | pub fn has_pauth(&self) -> bool { |
47 | 1.02k | self.numbered_predicate(1) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
48 | 1.02k | } |
49 | | /// Use half-precision floating point (FEAT_FP16) instructions. |
50 | 42 | pub fn has_fp16(&self) -> bool { |
51 | 42 | self.numbered_predicate(2) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
52 | 42 | } |
53 | | /// Has Dot Product (FEAT_DotProd) support; enables lowering i8 dot products (e.g. the relaxed-SIMD i8x16 dot) to SDOT/UDOT instead of a smull/saddlp widening fallback. |
54 | 0 | pub fn has_dotprod(&self) -> bool { |
55 | 0 | self.numbered_predicate(3) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
56 | 0 | } |
57 | | /// If function return address signing is enabled, then apply it to all functions; does not have an effect on code generation by itself. |
58 | 572 | pub fn sign_return_address_all(&self) -> bool { |
59 | 572 | self.numbered_predicate(4) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
60 | 572 | } |
61 | | /// Use pointer authentication instructions to sign function return addresses; HINT-space instructions using the A key are generated and simple functions that do not use the stack are not affected unless overridden by other settings. |
62 | 7.50k | pub fn sign_return_address(&self) -> bool { |
63 | 7.50k | self.numbered_predicate(5) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
64 | 7.50k | } |
65 | | /// Use the B key with pointer authentication instructions instead of the default A key; does not have an effect on code generation by itself. Some platform ABIs may require this, for example. |
66 | 2.19k | pub fn sign_return_address_with_bkey(&self) -> bool { |
67 | 2.19k | self.numbered_predicate(6) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
68 | 2.19k | } |
69 | | /// Use Branch Target Identification (FEAT_BTI) instructions. |
70 | 6.37k | pub fn use_bti(&self) -> bool { |
71 | 6.37k | self.numbered_predicate(7) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
72 | 6.37k | } |
73 | | /// Use the `csdb` instruction when spectre mitigations are enabled |
74 | 3.43k | pub fn use_csdb(&self) -> bool { |
75 | 3.43k | self.numbered_predicate(8) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:155 |
76 | 3.43k | } |
77 | | } |
78 | | static DESCRIPTORS: [detail::Descriptor; 9] = [ // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:224 |
79 | | detail::Descriptor { |
80 | | name: "has_lse", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
81 | | description: "Has Large System Extensions (FEAT_LSE) support.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
82 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
83 | | detail: detail::Detail::Bool { bit: 0 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
84 | | } |
85 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
86 | | detail::Descriptor { |
87 | | name: "has_pauth", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
88 | | description: "Has Pointer authentication (FEAT_PAuth) support; enables the use of non-HINT instructions, but does not have an effect on code generation by itself.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
89 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
90 | | detail: detail::Detail::Bool { bit: 1 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
91 | | } |
92 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
93 | | detail::Descriptor { |
94 | | name: "has_fp16", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
95 | | description: "Use half-precision floating point (FEAT_FP16) instructions.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
96 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
97 | | detail: detail::Detail::Bool { bit: 2 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
98 | | } |
99 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
100 | | detail::Descriptor { |
101 | | name: "has_dotprod", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
102 | | description: "Has Dot Product (FEAT_DotProd) support; enables lowering i8 dot products (e.g. the relaxed-SIMD i8x16 dot) to SDOT/UDOT instead of a smull/saddlp widening fallback.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
103 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
104 | | detail: detail::Detail::Bool { bit: 3 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
105 | | } |
106 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
107 | | detail::Descriptor { |
108 | | name: "sign_return_address_all", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
109 | | description: "If function return address signing is enabled, then apply it to all functions; does not have an effect on code generation by itself.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
110 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
111 | | detail: detail::Detail::Bool { bit: 4 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
112 | | } |
113 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
114 | | detail::Descriptor { |
115 | | name: "sign_return_address", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
116 | | description: "Use pointer authentication instructions to sign function return addresses; HINT-space instructions using the A key are generated and simple functions that do not use the stack are not affected unless overridden by other settings.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
117 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
118 | | detail: detail::Detail::Bool { bit: 5 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
119 | | } |
120 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
121 | | detail::Descriptor { |
122 | | name: "sign_return_address_with_bkey", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
123 | | description: "Use the B key with pointer authentication instructions instead of the default A key; does not have an effect on code generation by itself. Some platform ABIs may require this, for example.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
124 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
125 | | detail: detail::Detail::Bool { bit: 6 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
126 | | } |
127 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
128 | | detail::Descriptor { |
129 | | name: "use_bti", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
130 | | description: "Use Branch Target Identification (FEAT_BTI) instructions.", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
131 | | offset: 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
132 | | detail: detail::Detail::Bool { bit: 7 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
133 | | } |
134 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
135 | | detail::Descriptor { |
136 | | name: "use_csdb", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:232 |
137 | | description: "Use the `csdb` instruction when spectre mitigations are enabled", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:233 |
138 | | offset: 1, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:234 |
139 | | detail: detail::Detail::Bool { bit: 0 }, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:237 |
140 | | } |
141 | | , // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:259 |
142 | | ]; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:275 |
143 | | static ENUMERATORS: [&str; 0] = [ // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:278 |
144 | | ]; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:284 |
145 | | static HASH_TABLE: [u16; 16] = [ // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:294 |
146 | | 8, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
147 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
148 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
149 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
150 | | 6, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
151 | | 7, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
152 | | 3, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
153 | | 0, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
154 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
155 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
156 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
157 | | 1, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
158 | | 2, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
159 | | 5, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
160 | | 4, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:298 |
161 | | 0xffff, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:306 |
162 | | ]; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:310 |
163 | | static PRESETS: [(u8, u8); 0] = [ // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:313 |
164 | | ]; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:330 |
165 | | static TEMPLATE: detail::Template = detail::Template { |
166 | | name: "arm64", // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:345 |
167 | | descriptors: &DESCRIPTORS, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:346 |
168 | | enumerators: &ENUMERATORS, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:347 |
169 | | hash_table: &HASH_TABLE, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:348 |
170 | | defaults: &[0x00, 0x00], // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:349 |
171 | | presets: &PRESETS, // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:350 |
172 | | } |
173 | | ; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:353 |
174 | | /// Create a `settings::Builder` for the arm64 settings group. |
175 | 5.86k | pub fn builder() -> Builder { |
176 | 5.86k | Builder::new(&TEMPLATE) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:360 |
177 | 5.86k | } |
178 | | impl fmt::Display for Flags { |
179 | 0 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
180 | 0 | writeln!(f, "[arm64]")?; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:369 |
181 | 0 | for d in &DESCRIPTORS { |
182 | 0 | if !d.detail.is_preset() { |
183 | 0 | write!(f, "{} = ", d.name)?; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:372 |
184 | 0 | TEMPLATE.format_toml_value(d.detail, self.bytes[d.offset as usize], f)?; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:373 |
185 | 0 | writeln!(f)?; // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:377 |
186 | 0 | } |
187 | | } |
188 | 0 | Ok(()) // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:380 |
189 | 0 | } |
190 | | } |
191 | | impl Flags { |
192 | | /// Get the flag values as raw bytes for hashing. |
193 | 3.72k | pub fn hash_key(&self) -> &[u8] { |
194 | 3.72k | &self.bytes // /src/wasmtime/cranelift/codegen/meta/src/gen_settings.rs:390 |
195 | 3.72k | } |
196 | | } |