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
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.
465
+
The macro will initially be supported only on ARM, AArch64, Hexagon, PowerPC, Xtensa, 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.
578
596
>
@@ -620,6 +638,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).
625
646
@@ -680,6 +701,7 @@ Some registers have multiple names. These are all treated by the compiler as ide
680
701
| Hexagon |`r30`|`fr`|
681
702
| Hexagon |`r31`|`lr`|
682
703
| BPF |`r[0-10]`|`w[0-10]`|
704
+
| Xtensa |`a1`|`sp`|
683
705
684
706
Some registers cannot be used for input or output operands:
685
707
@@ -703,6 +725,7 @@ Some registers cannot be used for input or output operands:
703
725
| MIPS |`$ra`| Return address cannot be used as inputs or outputs. |
704
726
| RISC-V |`x0`| This is a constant zero register which can't be modified. |
705
727
| RISC-V |`gp`, `tp`| These registers are reserved and cannot be used as inputs or outputs. |
728
+
| Xtensa |`a7` or `a15`| On Xtensa the frame pointer can be either `a7` or `a15` depending on whether the target supports the windowed ABI. The frame pointer cannot be used as an input or output. |
706
729
| Hexagon |`lr`| This is the link register which cannot be used as an input or output. |
707
730
708
731
In some cases LLVM will allocate a "reserved register" for `reg` operands even though this register cannot be explicitly specified. Assembly code making use of reserved registers should be careful since `reg` operands may alias with those registers. Reserved registers are the frame pointer and base pointer
@@ -760,6 +783,9 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen
760
783
| PowerPC |`reg`| None |`0`| None |
761
784
| PowerPC |`reg_nonzero`| None |`3`|`b`|
762
785
| PowerPC |`freg`| None |`0`| None |
786
+
| Xtensa |`reg`| None |`a0`| None |
787
+
| Xtensa |`breg`| None |`b0`| None |
788
+
| Xtensa |`freg`| None |`f0`| None |
763
789
764
790
> Notes:
765
791
> - on ARM `e` / `f`: this prints the low or high doubleword register name of a NEON quad (128-bit) register.
0 commit comments