Skip to content

Commit 6d489f8

Browse files
a4lgehuss
authored andcommitted
RISC-V: Add vector state registers
`vxsat` (vector fixed-point saturation flag) and `vxrm` (vector fixed-point rounding mode) are subset, readable/writable mirrors of the `vcsr` register. Still, adding them to the default preserved register list will improve clarity. * `vcsr` * Bit 0–0 mirror: `vxsat` * Bit 1–2 mirror: `vxrm` Note that, the reason `vxrm` (rounding mode register which normally the developer writes) is in the list is, it is not preserved across calls on all ratified ABIs. Quoting `asm.rules.preserves_flags`, > As a general rule, the flags covered by `preserves_flags` are those > which are not preserved when performing a function call.
1 parent e5a1af4 commit 6d489f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inline-assembly.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ r[asm.rules.preserved-registers]
13431343
- Floating-point status (`FPSR` register).
13441344
- RISC-V
13451345
- Floating-point exception flags in `fcsr` (`fflags`).
1346-
- Vector extension state (`vtype`, `vl`, `vcsr`).
1346+
- Vector extension state (`vtype`, `vl`, `vxsat`, and `vxrm`).
13471347
- LoongArch
13481348
- Floating-point condition flags in `$fcc[0-7]`.
13491349
- s390x

0 commit comments

Comments
 (0)