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
> - On x86 we treat `reg_byte` differently from `reg` because the compiler can allocate `al` and `ah` separately whereas `reg` reserves the whole register.
@@ -288,6 +294,10 @@ The availability of supported types for a particular register class may depend o
> **Note**: For the purposes of the above table pointers, function pointers and `isize`/`usize` are treated as the equivalent integer type (`i16`/`i32`/`i64` depending on the target).
293
303
@@ -372,8 +382,8 @@ Some registers cannot be used for input or output operands:
372
382
373
383
| Architecture | Unsupported register | Reason |
374
384
| ------------ | -------------------- | ------ |
375
-
| 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. |
385
+
| 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. |
377
387
| 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
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. |
379
389
| x86 |`ip`| This is the program counter, not a real register. |
@@ -386,6 +396,8 @@ Some registers cannot be used for input or output operands:
386
396
| LoongArch |`$r0` or `$zero`| This is a constant zero register which can't be modified. |
387
397
| LoongArch |`$r2` or `$tp`| This is reserved for TLS. |
388
398
| LoongArch |`$r21`| This is reserved by the ABI. |
399
+
| s390x |`c[0-15]`| Reserved by the kernel. |
400
+
| s390x |`a[0-1]`| Reserved for system use. |
389
401
390
402
r[asm.register-names.fp-bp-reserved]
391
403
The frame pointer and base pointer registers are reserved for internal use by LLVM. While `asm!` statements cannot explicitly specify the use of reserved registers, in some cases LLVM will allocate one of these reserved registers for `reg` operands. Assembly code making use of reserved registers should be careful since `reg` operands may use the same registers.
@@ -441,6 +453,9 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
441
453
| RISC-V |`freg`| None |`f0`| None |
442
454
| LoongArch |`reg`| None |`$r1`| None |
443
455
| LoongArch |`freg`| None |`$f0`| None |
456
+
| s390x |`reg`| None |`%r0`| None |
457
+
| s390x |`reg_addr`| None |`%r1`| None |
458
+
| s390x |`freg`| None |`%f0`| None |
444
459
445
460
> **Notes**:
446
461
> - on ARM `e` / `f`: this prints the low or high doubleword register name of a NEON quad (128-bit) register.
@@ -485,6 +500,7 @@ The following ABIs can be used with `clobber_abi`:
0 commit comments