We should save and restore the floating point status registers. This
became an issue when testing 32-bit float on a target with 64-bit with
the gdb.base/callfuncs.exp test.
gdb/ChangeLog:
* riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
fflags, and frm registers.
+2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
+ fflags, and frm registers.
+
2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
* riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
else if (reggroup == restore_reggroup || reggroup == save_reggroup)
{
if (riscv_has_fp_regs (gdbarch))
- return regnum <= RISCV_LAST_FP_REGNUM;
+ return (regnum <= RISCV_LAST_FP_REGNUM
+ || regnum == RISCV_CSR_FCSR_REGNUM
+ || regnum == RISCV_CSR_FFLAGS_REGNUM
+ || regnum == RISCV_CSR_FRM_REGNUM);
else
return regnum < RISCV_FIRST_FP_REGNUM;
}