diff options
author | Yang Yujie <yangyujie@loongson.cn> | 2023-12-08 18:01:18 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2023-12-12 10:02:03 +0800 |
commit | 4b421728289e6f1caa0dfaa953a11698ab95d37d (patch) | |
tree | 6da9a92785d6030ff769006e35222bdc8423cf0d /libdecnumber | |
parent | 46cfafad9b3e64e9cd060b7a26bfe1890c74135f (diff) | |
download | gcc-4b421728289e6f1caa0dfaa953a11698ab95d37d.zip gcc-4b421728289e6f1caa0dfaa953a11698ab95d37d.tar.gz gcc-4b421728289e6f1caa0dfaa953a11698ab95d37d.tar.bz2 |
LoongArch: Fix eh_return epilogue for normal returns.
On LoongArch, the regitsters $r4 - $r7 (EH_RETURN_DATA_REGNO) will be saved
and restored in the function prologue and epilogue if the given function calls
__builtin_eh_return. This causes the return value to be overwritten on normal
return paths and breaks a rare case of libgcc's _Unwind_RaiseException.
gcc/ChangeLog:
* config/loongarch/loongarch.cc: Do not restore the saved eh_return
data registers ($r4-$r7) for a normal return of a function that calls
__builtin_eh_return elsewhere.
* config/loongarch/loongarch-protos.h: Same.
* config/loongarch/loongarch.md: Same.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/eh_return-normal-return.c: New test.
Diffstat (limited to 'libdecnumber')
0 files changed, 0 insertions, 0 deletions