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
Auto merge of rust-lang#84732 - DrChat:asm_powerpc, r=Amanieu
Add asm!() support for PowerPC
This includes GPRs and FPRs only.
Note that this does not include PowerPC64.
For my reference, this was mostly duplicated from PR rust-lang#73214.
The macro will initially be supported only on ARM, AArch64, Hexagon, x86, x86-64 and RISC-V targets. Support for more targets may be added in the future. The compiler will emit an error if `asm!` is used on an unsupported target.
463
+
The macro will initially be supported only on ARM, AArch64, Hexagon, PowerPC, x86, x86-64 and RISC-V targets. Support for more targets may be added in the future. The compiler will emit an error if `asm!` is used on an unsupported target.
> **Note**: On x86 we treat `reg_byte` differently from `reg` because the compiler can allocate `al` and `ah` separately whereas `reg` reserves the whole register.
@@ -607,6 +611,9 @@ Each register class has constraints on which value types they can be used with.
> **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).
@@ -744,6 +751,9 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
744
751
| RISC-V |`reg`| None |`x1`| None |
745
752
| RISC-V |`freg`| None |`f0`| None |
746
753
| Hexagon |`reg`| None |`r0`| None |
754
+
| PowerPC |`reg`| None |`0`| None |
755
+
| PowerPC |`reg_nonzero`| None |`3`|`b`|
756
+
| PowerPC |`freg`| None |`0`| None |
747
757
748
758
> Notes:
749
759
> - on ARM `e` / `f`: this prints the low or high doubleword register name of a NEON quad (128-bit) register.
0 commit comments