diff options
author | Andrew Waterman <andrew@sifive.com> | 2018-01-17 19:07:20 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2018-01-17 11:07:20 -0800 |
commit | e423d5bc0481ee889c3fa251337978675848b0f4 (patch) | |
tree | 9cd09d5e17e012d78f2a6af1e6b44739d42d823e /gcc | |
parent | c1fa27707a4542803c1c04fba57eeee46c214f09 (diff) | |
download | gcc-e423d5bc0481ee889c3fa251337978675848b0f4.zip gcc-e423d5bc0481ee889c3fa251337978675848b0f4.tar.gz gcc-e423d5bc0481ee889c3fa251337978675848b0f4.tar.bz2 |
RISC-V: Mark fsX as call clobbered when soft-float.
2018-01-17 Andrew Waterman <andrew@sifive.com>
gcc/
* config/riscv/riscv.c (riscv_conditional_register_usage): If
UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
From-SVN: r256811
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/riscv/riscv.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b0146b..1943210 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-01-17 Andrew Waterman <andrew@sifive.com> + + * config/riscv/riscv.c (riscv_conditional_register_usage): If + UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs. + 2018-01-17 David Malcolm <dmalcolm@redhat.com> PR lto/83121 diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index 19a01e0..20660a4 100644 --- a/gcc/config/riscv/riscv.c +++ b/gcc/config/riscv/riscv.c @@ -4123,6 +4123,13 @@ riscv_conditional_register_usage (void) for (int regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) fixed_regs[regno] = call_used_regs[regno] = 1; } + + /* In the soft-float ABI, there are no callee-saved FP registers. */ + if (UNITS_PER_FP_ARG == 0) + { + for (int regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) + call_used_regs[regno] = 1; + } } /* Return a register priority for hard reg REGNO. */ |