Skip to content

Commit 81b4ba1

Browse files
committed
Add Arm64EC to inline-assembly documentation
1 parent 7ce3563 commit 81b4ba1

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

src/inline-assembly.md

+29-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ r[asm.stable-targets]
1313
Support for inline assembly is stable on the following architectures:
1414
- x86 and x86-64
1515
- ARM
16-
- AArch64
16+
- AArch64 and Arm64EC
1717
- RISC-V
1818
- LoongArch
1919

@@ -234,6 +234,9 @@ Here is the list of currently supported register classes:
234234
| AArch64 | `vreg` | `v[0-31]` | `w` |
235235
| AArch64 | `vreg_low16` | `v[0-15]` | `x` |
236236
| AArch64 | `preg` | `p[0-15]`, `ffr` | Only clobbers |
237+
| Arm64EC | `reg` | `x[0-12]`, `x[15-22]`, `x[25-27]`, `x30` | `r` |
238+
| Arm64EC | `vreg` | `v[0-15]` | `w` |
239+
| Arm64EC | `vreg_low16` | `v[0-15]` | `x` |
237240
| ARM (ARM/Thumb2) | `reg` | `r[0-12]`, `r14` | `r` |
238241
| ARM (Thumb1) | `reg` | `r[0-7]` | `r` |
239242
| ARM | `sreg` | `s[0-31]` | `t` |
@@ -277,6 +280,8 @@ The availability of supported types for a particular register class may depend o
277280
| AArch64 | `reg` | None | `i8`, `i16`, `i32`, `f32`, `i64`, `f64` |
278281
| AArch64 | `vreg` | `neon` | `i8`, `i16`, `i32`, `f32`, `i64`, `f64`, <br> `i8x8`, `i16x4`, `i32x2`, `i64x1`, `f32x2`, `f64x1`, <br> `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` |
279282
| AArch64 | `preg` | N/A | Only clobbers |
283+
| Arm64EC | `reg` | None | `i8`, `i16`, `i32`, `f32`, `i64`, `f64` |
284+
| Arm64EC | `vreg` | `neon` | `i8`, `i16`, `i32`, `f32`, `i64`, `f64`, <br> `i8x8`, `i16x4`, `i32x2`, `i64x1`, `f32x2`, `f64x1`, <br> `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` |
280285
| ARM | `reg` | None | `i8`, `i16`, `i32`, `f32` |
281286
| ARM | `sreg` | `vfp2` | `i32`, `f32` |
282287
| ARM | `dreg` | `vfp2` | `i64`, `f64`, `i8x8`, `i16x4`, `i32x2`, `i64x1`, `f32x2` |
@@ -329,6 +334,12 @@ Here is the list of all supported register aliases:
329334
| AArch64 | `sp` | `wsp` |
330335
| AArch64 | `xzr` | `wzr` |
331336
| AArch64 | `v[0-31]` | `b[0-31]`, `h[0-31]`, `s[0-31]`, `d[0-31]`, `q[0-31]` |
337+
| Arm64EC | `x[0-30]` | `w[0-30]` |
338+
| Arm64EC | `x29` | `fp` |
339+
| Arm64EC | `x30` | `lr` |
340+
| Arm64EC | `sp` | `wsp` |
341+
| Arm64EC | `xzr` | `wzr` |
342+
| Arm64EC | `v[0-15]` | `b[0-15]`, `h[0-15]`, `s[0-15]`, `d[0-15]`, `q[0-15]` |
332343
| ARM | `r[0-3]` | `a[1-4]` |
333344
| ARM | `r[4-9]` | `v[1-6]` |
334345
| ARM | `r9` | `rfp` |
@@ -373,12 +384,15 @@ Some registers cannot be used for input or output operands:
373384
| Architecture | Unsupported register | Reason |
374385
| ------------ | -------------------- | ------ |
375386
| All | `sp` | The stack pointer must be restored to its original value at the end of an asm code block. |
376-
| All | `bp` (x86), `x29` (AArch64), `x8` (RISC-V), `$fp` (LoongArch) | The frame pointer cannot be used as an input or output. |
387+
| All | `bp` (x86), `x29` (AArch64 and Arm64EC), `x8` (RISC-V), `$fp` (LoongArch) | The frame pointer cannot be used as an input or output. |
377388
| ARM | `r7` or `r11` | On ARM the frame pointer can be either `r7` or `r11` depending on the target. The frame pointer cannot be used as an input or output. |
378-
| All | `si` (x86-32), `bx` (x86-64), `r6` (ARM), `x19` (AArch64), `x9` (RISC-V), `$s8` (LoongArch) | This is used internally by LLVM as a "base pointer" for functions with complex stack frames. |
389+
| All | `si` (x86-32), `bx` (x86-64), `r6` (ARM), `x19` (AArch64 and Arm64EC), `x9` (RISC-V), `$s8` (LoongArch) | This is used internally by LLVM as a "base pointer" for functions with complex stack frames. |
379390
| x86 | `ip` | This is the program counter, not a real register. |
380391
| AArch64 | `xzr` | This is a constant zero register which can't be modified. |
381392
| AArch64 | `x18` | This is an OS-reserved register on some AArch64 targets. |
393+
| Arm64EC | `xzr` | This is a constant zero register which can't be modified. |
394+
| Arm64EC | `x18` | This is an OS-reserved register. |
395+
| Arm64EC | `x13`, `x14`, `x23`, `x24`, `x28`, `v[16-31]`, `p[0-15]`, `ffr` | These are AArch64 registers that are not supported for Arm64EC. |
382396
| ARM | `pc` | This is the program counter, not a real register. |
383397
| ARM | `r9` | This is an OS-reserved register on some ARM targets. |
384398
| RISC-V | `x0` | This is a constant zero register which can't be modified. |
@@ -432,6 +446,16 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
432446
| AArch64 | `vreg` | `s` | `s0` | `s` |
433447
| AArch64 | `vreg` | `d` | `d0` | `d` |
434448
| AArch64 | `vreg` | `q` | `q0` | `q` |
449+
| Arm64EC | `reg` | None | `x0` | `x` |
450+
| Arm64EC | `reg` | `w` | `w0` | `w` |
451+
| Arm64EC | `reg` | `x` | `x0` | `x` |
452+
| Arm64EC | `vreg` | None | `v0` | None |
453+
| Arm64EC | `vreg` | `v` | `v0` | None |
454+
| Arm64EC | `vreg` | `b` | `b0` | `b` |
455+
| Arm64EC | `vreg` | `h` | `h0` | `h` |
456+
| Arm64EC | `vreg` | `s` | `s0` | `s` |
457+
| Arm64EC | `vreg` | `d` | `d0` | `d` |
458+
| Arm64EC | `vreg` | `q` | `q0` | `q` |
435459
| ARM | `reg` | None | `r0` | None |
436460
| ARM | `sreg` | None | `s0` | None |
437461
| ARM | `dreg` | None | `d0` | `P` |
@@ -482,6 +506,7 @@ The following ABIs can be used with `clobber_abi`:
482506
| x86-64 | `"C"`, `"system"` (on Windows), `"efiapi"`, `"win64"` | `ax`, `cx`, `dx`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[0-7]`, `st([0-7])`, `tmm[0-7]` |
483507
| x86-64 | `"C"`, `"system"` (on non-Windows), `"sysv64"` | `ax`, `cx`, `dx`, `si`, `di`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[0-7]`, `st([0-7])`, `tmm[0-7]` |
484508
| AArch64 | `"C"`, `"system"`, `"efiapi"` | `x[0-17]`, `x18`\*, `x30`, `v[0-31]`, `p[0-15]`, `ffr` |
509+
| Arm64EC | `"C"`, `"system"` | `x[0-12]`, `x[15-17]`, `x30`, `v[0-15]` |
485510
| ARM | `"C"`, `"system"`, `"efiapi"`, `"aapcs"` | `r[0-3]`, `r12`, `r14`, `s[0-15]`, `d[0-7]`, `d[16-31]` |
486511
| RISC-V | `"C"`, `"system"`, `"efiapi"` | `x1`, `x[5-7]`, `x[10-17]`, `x[28-31]`, `f[0-7]`, `f[10-17]`, `f[28-31]`, `v[0-31]` |
487512
| LoongArch | `"C"`, `"system"` | `$r1`, `$r[4-20]`, `$f[0-23]` |
@@ -616,7 +641,7 @@ r[asm.rules.preserved-registers]
616641
- Condition flags in `FPSCR` (N, Z, C, V)
617642
- Saturation flag in `FPSCR` (QC)
618643
- Floating-point exception flags in `FPSCR` (IDC, IXC, UFC, OFC, DZC, IOC).
619-
- AArch64
644+
- AArch64 and Arm64EC
620645
- Condition flags (`NZCV` register).
621646
- Floating-point status (`FPSR` register).
622647
- RISC-V

0 commit comments

Comments
 (0)