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
@@ -383,12 +394,15 @@ Some registers cannot be used for input or output operands:
383
394
| Architecture | Unsupported register | Reason |
384
395
| ------------ | -------------------- | ------ |
385
396
| All |`sp`, `r15` (s390x) | The stack pointer must be restored to its original value at the end of an asm code block. |
386
-
| All |`bp` (x86), `x29` (AArch64), `x8` (RISC-V), `$fp` (LoongArch), `r11` (s390x) | The frame pointer cannot be used as an input or output. |
397
+
| All |`bp` (x86), `x29` (AArch64 and Arm64EC), `x8` (RISC-V), `$fp` (LoongArch), `r11` (s390x) | The frame pointer cannot be used as an input or output. |
387
398
| 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. |
388
-
| 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. |
399
+
| 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. |
389
400
| x86 |`ip`| This is the program counter, not a real register. |
390
401
| AArch64 |`xzr`| This is a constant zero register which can't be modified. |
391
402
| AArch64 |`x18`| This is an OS-reserved register on some AArch64 targets. |
403
+
| Arm64EC |`xzr`| This is a constant zero register which can't be modified. |
404
+
| Arm64EC |`x18`| This is an OS-reserved register. |
405
+
| Arm64EC |`x13`, `x14`, `x23`, `x24`, `x28`, `v[16-31]`, `p[0-15]`, `ffr`| These are AArch64 registers that are not supported for Arm64EC. |
392
406
| ARM |`pc`| This is the program counter, not a real register. |
393
407
| ARM |`r9`| This is an OS-reserved register on some ARM targets. |
394
408
| RISC-V |`x0`| This is a constant zero register which can't be modified. |
@@ -434,16 +448,16 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
434
448
| x86 |`*mm_reg`|`y`|`ymm0`|`t`|
435
449
| x86 |`*mm_reg`|`z`|`zmm0`|`g`|
436
450
| x86 |`kreg`| None |`k1`| None |
437
-
| AArch64 |`reg`| None |`x0`|`x`|
438
-
| AArch64 |`reg`|`w`|`w0`|`w`|
439
-
| AArch64 |`reg`|`x`|`x0`|`x`|
440
-
| AArch64 |`vreg`| None |`v0`| None |
441
-
| AArch64 |`vreg`|`v`|`v0`| None |
442
-
| AArch64 |`vreg`|`b`|`b0`|`b`|
443
-
| AArch64 |`vreg`|`h`|`h0`|`h`|
444
-
| AArch64 |`vreg`|`s`|`s0`|`s`|
445
-
| AArch64 |`vreg`|`d`|`d0`|`d`|
446
-
| AArch64 |`vreg`|`q`|`q0`|`q`|
451
+
| AArch64/Arm64EC|`reg`| None |`x0`|`x`|
452
+
| AArch64/Arm64EC|`reg`|`w`|`w0`|`w`|
453
+
| AArch64/Arm64EC|`reg`|`x`|`x0`|`x`|
454
+
| AArch64/Arm64EC|`vreg`| None |`v0`| None |
455
+
| AArch64/Arm64EC|`vreg`|`v`|`v0`| None |
456
+
| AArch64/Arm64EC|`vreg`|`b`|`b0`|`b`|
457
+
| AArch64/Arm64EC|`vreg`|`h`|`h0`|`h`|
458
+
| AArch64/Arm64EC|`vreg`|`s`|`s0`|`s`|
459
+
| AArch64/Arm64EC|`vreg`|`d`|`d0`|`d`|
460
+
| AArch64/Arm64EC|`vreg`|`q`|`q0`|`q`|
447
461
| ARM |`reg`| None |`r0`| None |
448
462
| ARM |`sreg`| None |`s0`| None |
449
463
| ARM |`dreg`| None |`d0`|`P`|
@@ -497,6 +511,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)") _, ...`.
652
667
- 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.
653
668
669
+
r[asm.rules.arm64ec]
670
+
- 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.
671
+
654
672
r[asm.rules.only-on-exit]
655
673
- The requirement of restoring the stack pointer and non-output registers to their original value only applies when exiting an `asm!` block.
656
674
- This means that `asm!` blocks that never return (even if not marked `noreturn`) don't need to preserve these registers.
0 commit comments