You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -373,12 +384,15 @@ Some registers cannot be used for input or output operands:
373
384
| Architecture | Unsupported register | Reason |
374
385
| ------------ | -------------------- | ------ |
375
386
| 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. |
377
388
| 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. |
379
390
| x86 |`ip`| This is the program counter, not a real register. |
380
391
| AArch64 |`xzr`| This is a constant zero register which can't be modified. |
381
392
| 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. |
382
396
| ARM |`pc`| This is the program counter, not a real register. |
383
397
| ARM |`r9`| This is an OS-reserved register on some ARM targets. |
384
398
| 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
432
446
| AArch64 |`vreg`|`s`|`s0`|`s`|
433
447
| AArch64 |`vreg`|`d`|`d0`|`d`|
434
448
| 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`|
435
459
| ARM |`reg`| None |`r0`| None |
436
460
| ARM |`sreg`| None |`s0`| None |
437
461
| ARM |`dreg`| None |`d0`|`P`|
@@ -482,6 +506,7 @@ The following ABIs can be used with `clobber_abi`:
- On x86, the x87 floating-point register stack must remain unchanged unless all of the `st([0-7])` registers have been marked as clobbered with `out("st(0)") _, out("st(1)") _, ...`.
634
659
- If all x87 registers are clobbered then the x87 register stack is guaranteed to be empty upon entering an `asm` block. Assembly code must ensure that the x87 register stack is also empty when exiting the asm block.
635
660
661
+
r[asm.rules.arm64ec]
662
+
- On arm64ec, [call checkers with appropriate thunks](https://learn.microsoft.com/en-us/windows/arm/arm64ec-abi#authoring-arm64ec-in-assembly) are mandatory when calling functions.
663
+
636
664
r[asm.rules.only-on-exit]
637
665
- The requirement of restoring the stack pointer and non-output registers to their original value only applies when exiting an `asm!` block.
638
666
- This means that `asm!` blocks that never return (even if not marked `noreturn`) don't need to preserve these registers.
0 commit comments