Register Guide

RISC-V vxsat / vxsat Register: Vector Fixed-Point Saturate Flag CSR

vxsat is the Vector Fixed-Point Saturate Flag register; a single sticky bit set whenever a fixed-point vector instruction saturates its output. Cleared by vsetvl.

ABI name: vxsat; physical register: vxsat.
Save rule: Caller.
Read it through its psABI role first, then inspect how each instruction reads or writes it.
Physical Name vxsatABI Name vxsatSave Rule Caller
Role
Vector Fixed-Point Saturate Flag CSR
Convention
Caller-saved
Remember This First
t* registers are caller-saved, so callees may overwrite them.
psABI Reference

ABI register

vxsat is the Vector Fixed-Point Saturate Flag register; a single sticky bit set whenever a fixed-point vector instruction saturates its output. Cleared by vsetvl.

Preserved across calls: Caller
RISC-V psABI integer register convention

When It Fits Best

  • - Hold short-lived temporary computation results.
  • - Use them for local computations that do not need to survive calls.
  • - Use them as caller-managed scratch registers.

When Not To Use It This Way

  • - Do not keep values in t* across a call unless you save them yourself first.
  • - Do not expect callees to restore t* for you.

What Happens Around A Call

1

t* registers are caller-saved, so callees may overwrite them.

2

If the caller still needs a t* value after a call, it must save it in advance.

Protect Temporary Values Before A Call

Examples explain the rule, not a complete program
addi t0, a0, 1
# If t0 is needed after the call, save it to an ABI-valid location first
call foo
# restore t0 from that saved location after the call returns