Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Allow use of fs0-fs11 as call-clobbered registers in soft-float ABI
Browse files Browse the repository at this point in the history
Note this change does not cause ABI breakage, because previously we had
disallowed use of fs0-fs11 altogether in the soft-float ABI.
  • Loading branch information
aswaterman authored and palmer-dabbelt committed Nov 8, 2017
1 parent a59d503 commit 9a3711d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gcc/config/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4038,6 +4038,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. */
Expand Down

0 comments on commit 9a3711d

Please sign in to comment.