Commit cdb76c7
authored
Rollup merge of rust-lang#131781 - taiki-e:arm64ec-stabilize-asm, r=Amanieu,traviscross
Stabilize Arm64EC inline assembly
This stabilizes inline assembly for Arm64EC ("Emulation Compatible").
Corresponding reference PR: rust-lang/reference#1653
---
From the requirements of stabilization mentioned in rust-lang#93335
> Each architecture needs to be reviewed before stabilization:
> - It must have clobber_abi.
Done in rust-lang#131332.
> - It must be possible to clobber every register that is normally clobbered by a function call.
This is possible from the time of the initial implementation.
> - Generally review that the exposed register classes make sense.
The registers available in this target are a subset of those available in the AArch64 inline assembly which is already stable.
The following registers cannot be used in Arm64EC compared to AArch64:
- `x13`, `x14`, `x23`, `x24`, `x28` (register class: `reg`)
- `v[16-31]` (register class: `vreg`)
- `p[0-15]`, `ffr` (clobber-only register class `preg`)
These are disallowed by the ABI (see also [abi docs](https://learn.microsoft.com/en-us/cpp/build/arm64ec-windows-abi-conventions?view=msvc-170#register-mapping) for `reg`/`vreg` and rust-lang#131332 (comment) for `preg`).
Although not listed in the above requirements, preserves_flags is also implemented and the same as AArch64.
---
cc `@dpaoliello`
r? `@Amanieu`
`@rustbot` label O-windows O-AArch64 +A-inline-assembly +T-lang -T-compiler +needs-fcpFile tree
5 files changed
+6
-33
lines changed- compiler/rustc_ast_lowering/src
- src/doc/unstable-book/src/language-features
- tests
- assembly/asm
- codegen/asm
- ui/asm/aarch64
5 files changed
+6
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
Lines changed: 2 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
| |||
92 | 88 | | |
93 | 89 | | |
94 | 90 | | |
95 | | - | |
96 | | - | |
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
| |||
134 | 128 | | |
135 | 129 | | |
136 | 130 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 131 | | |
144 | 132 | | |
145 | 133 | | |
| |||
150 | 138 | | |
151 | 139 | | |
152 | 140 | | |
153 | | - | |
154 | | - | |
| 141 | + | |
| 142 | + | |
155 | 143 | | |
156 | 144 | | |
157 | 145 | | |
| |||
176 | 164 | | |
177 | 165 | | |
178 | 166 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 167 | | |
183 | 168 | | |
184 | 169 | | |
| |||
197 | 182 | | |
198 | 183 | | |
199 | 184 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 185 | | |
211 | 186 | | |
212 | 187 | | |
| |||
220 | 195 | | |
221 | 196 | | |
222 | 197 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments