On 6/10/26 08:25, Matt Turner wrote:
Factor FCR→fp_status and FSR→fp_status synchronisation out of the
wur_fpu{2k,}_fcr/wur_fpu_fsr helpers into cpu_set_fcr(), cpu_set_fsr(),
and cpu_get_fsr(). Signal delivery code needs to restore the FP rounding
mode and exception flags without duplicating the flag-mapping tables.

cpu_set_fcr() applies the union mask 0xfffff07f (superset of the
wur_fpu_fcr mask 0x0000007f and the wur_fpu2k_fcr mask 0xfffff07f) so
that FCR bits valid only on fpu2k configs are preserved while MBZ bits
7-11 are always cleared.

Signed-off-by: Matt Turner<[email protected]>
---
  target/xtensa/cpu.h        |   4 ++
  target/xtensa/fpu_helper.c | 111 ++++++++++++++++++++-----------------
  2 files changed, 64 insertions(+), 51 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to