Definition
Floating-Point Register (RISC-V)
A floating-point register is a register used to store floating-point values.
RISC-V provides 32 floating-point registers named
f0tof31. They also have conventional alias names such asft0,fs0, andfa0.
Register Set
| Name | Register Number | Usage |
|---|---|---|
| ft0-7 | f0-7 | Temporary variables |
| fs0-1 | f8-9 | Saved variables |
| fa0-1 | f10-11 | Function arguments/return values |
| fa2-7 | f12-17 | Function arguments |
| fs2-11 | f18-27 | Saved variables |
| ft8-11 | f28-31 | Temporary variables |
Width
The width of a floating-point register is the width of the highest implemented floating-point precision.
If multiple floating-point extensions are implemented, lower-precision values occupy the lower bits of the register.