aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJin Ma <jinma@linux.alibaba.com>2023-06-19 13:02:47 -0600
committerJeff Law <jlaw@ventanamicro.com>2023-06-19 13:02:47 -0600
commitdbcbc858c71f69da76d1f36d6bb5d72f2db11eda (patch)
tree4a9629434541228a56360add55d3ee12dc2fa2de /libcpp
parent827b2a279fc6ad5bb76e4d2c2eb3432955b5e11c (diff)
downloadgcc-dbcbc858c71f69da76d1f36d6bb5d72f2db11eda.zip
gcc-dbcbc858c71f69da76d1f36d6bb5d72f2db11eda.tar.gz
gcc-dbcbc858c71f69da76d1f36d6bb5d72f2db11eda.tar.bz2
RISC-V: Save and restore FCSR in interrupt functions to avoid program errors.
In order to avoid interrupt functions to change the FCSR, it needs to be saved and restored at the beginning and end of the function. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_compute_frame_info): Allocate frame for FCSR. (riscv_for_each_saved_reg): Save and restore FCSR in interrupt functions. * config/riscv/riscv.md (riscv_frcsr): New patterns. (riscv_fscsr): Likewise. gcc/testsuite/ChangeLog: * gcc.target/riscv/interrupt-fcsr-1.c: New test. * gcc.target/riscv/interrupt-fcsr-2.c: New test. * gcc.target/riscv/interrupt-fcsr-3.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions