Feature request: FP control and status instructions
Opened this issue · 0 comments
davipatury commented
Is it possible to implement some floating point control and status instructions?
The image above shows the control/status register structure.
Some instructions are:
frcsr t0
- Read FP control/status registerfrflags t0
- Read FP exception flags (idk if it can be implemented in this case)frrm t0
- Read FP rounding modefsrm t0
- Write FP rounding modefsrmi 2
- Write FP rounding mode (imm)
It would be extremely useful, especially the rounding mode instructions.
The rounding mode works according to this table:
So, when I use fcvt.w.s t0, ft0
, t0's value will be ft0's value rounded according to the rounding mode defined in the control/status register.