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
| PowerPC/PowerPC64 |`cr`|`cr[0-7]`, `cr`| Only clobbers |
614
+
| PowerPC/PowerPC64 |`ctr`|`ctr`| Only clobbers |
615
+
| PowerPC/PowerPC64 |`lr`|`lr`| Only clobbers |
616
+
| PowerPC/PowerPC64 |`xer`|`xer`| Only clobbers |
605
617
606
618
> [!NOTE]
607
619
> - On x86 we treat `reg_byte` differently from `reg` because the compiler can allocate `al` and `ah` separately whereas `reg` reserves the whole register.
@@ -649,6 +661,16 @@ The availability of supported types for a particular register class may depend o
| PowerPC/PowerPC64 |`vsreg`|`vsx`| The union of vsx and altivec vreg types |
670
+
| PowerPC/PowerPC64 |`cr`| None | Only clobbers |
671
+
| PowerPC/PowerPC64 |`ctr`| None | Only clobbers |
672
+
| PowerPC/PowerPC64 |`lr`| None | Only clobbers |
673
+
| PowerPC/PowerPC64 |`xer`| None | Only clobbers |
652
674
653
675
> [!NOTE]
654
676
> 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).
@@ -790,6 +812,10 @@ Here is the list of all supported register aliases:
790
812
| LoongArch |`$f[0-7]`|`$fa[0-7]`|
791
813
| LoongArch |`$f[8-23]`|`$ft[0-15]`|
792
814
| LoongArch |`$f[24-31]`|`$fs[0-7]`|
815
+
| PowerPC/PowerPC64 |`r1`|`sp`|
816
+
| PowerPC/PowerPC64 |`r31`|`fp`|
817
+
| PowerPC/PowerPC64 |`r[0-31]`|`[0-31]`|
818
+
| PowerPC/PowerPC64 |`f[0-31]`|`fr[0-31]`|
793
819
794
820
```rust
795
821
# #[cfg(target_arch ="x86_64")] {
@@ -804,10 +830,10 @@ Some registers cannot be used for input or output operands:
804
830
805
831
| Architecture | Unsupported register | Reason |
806
832
| ------------ | -------------------- | ------ |
807
-
| All |`sp`, `r15` (s390x) | The stack pointer must be restored to its original value at the end of the assembly code or before jumping to a `label` block. |
808
-
| 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. |
833
+
| All |`sp`, `r15` (s390x), `r1` (PowerPC and PowerPC64)| The stack pointer must be restored to its original value at the end of the assembly code or before jumping to a `label` block. |
834
+
| All |`bp` (x86), `x29` (AArch64 and Arm64EC), `x8` (RISC-V), `$fp` (LoongArch), `r11` (s390x), `fp` (PowerPC and PowerPC64)| The frame pointer cannot be used as an input or output. |
809
835
| 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. |
810
-
| 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. |
836
+
| All |`si` (x86-32), `bx` (x86-64), `r6` (ARM), `x19` (AArch64 and Arm64EC), `x9` (RISC-V), `$s8` (LoongArch), `r29` and `r30` (PowerPC), `r30` (PowerPC64)| This is used internally by LLVM as a "base pointer" for functions with complex stack frames. |
811
837
| x86 |`ip`| This is the program counter, not a real register. |
812
838
| AArch64 |`xzr`| This is a constant zero register which can't be modified. |
813
839
| AArch64 |`x18`| This is an OS-reserved register on some AArch64 targets. |
@@ -823,6 +849,8 @@ Some registers cannot be used for input or output operands:
823
849
| LoongArch |`$r21`| This is reserved by the ABI. |
824
850
| s390x |`c[0-15]`| Reserved by the kernel. |
825
851
| s390x |`a[0-1]`| Reserved for system use. |
852
+
| PowerPC/PowerPC64 |`r2`, `r13`| These are system reserved registers. |
853
+
| PowerPC/PowerPC64 |`vrsave`| The vrsave register cannot be used as an input or output. |
826
854
827
855
```rust,compile_fail
828
856
# #[cfg(target_arch = "x86_64")] {
@@ -898,6 +926,11 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
0 commit comments