RISC-V: Add vector state registers by a4lg · Pull Request #2005 · rust-lang/reference (original) (raw)
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
- Bit 0–0 mirror:
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_flagsare those which are not preserved when performing a function call.