@@ -733,6 +733,11 @@ Sign extension of 32-bit values on RV64 is not reflected in the interface.
733
733
This section lists operand constraints that can be used with inline assembly
734
734
statements, including both RISC-V specific and common operand constraints.
735
735
736
+ "Floating-point register" in both the `f` and `cf` rows means "a register
737
+ suitable for passing a floating-point value", so when using the `Zfinx`,
738
+ `Zdinx`, or `Zhinxmin` extensions this will allocate an X register. This is done
739
+ to aid portability of floating-point code.
740
+
736
741
.Constraints on Operands of Inline Assembly Statements
737
742
[%autowidth]
738
743
|===
@@ -747,13 +752,19 @@ statements, including both RISC-V specific and common operand constraints.
747
752
|J |Zero integer immediate operand |
748
753
|s |symbol or label reference with a constant offset |
749
754
|cr |RVC general purpose register (`x8`-`x15`) |
750
- |cf |RVC floating point register (`f8`-`f15`) |
755
+ |cf |RVC floating- point register (`f8`-`f15`) |
751
756
|Pr |Even-odd general purpose register pair |
752
757
|vr |Vector register |
753
758
|vd |Vector register, excluding v0 |
754
759
|vm |Vector register, only v0 |
755
760
|===
756
761
762
+ The `Pr` constraint should print as the even register in the pair, as this
763
+ matches how the `amocas.q` instruction (on RV64) or the `amocas.d` and `Zdinx`
764
+ instructions (on RV32) expect to parse their pair register operands. However,
765
+ both registers in the pair should be considered to be live or clobbered
766
+ together.
767
+
757
768
NOTE: Immediate value must be a compile-time constant.
758
769
759
770
NOTE: The `c*` and `P*` constraints are designed to be extensible to more kinds of registers in the future.
0 commit comments