diff options
author | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-12 01:43:51 +0000 |
---|---|---|
committer | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-12 01:43:51 +0000 |
commit | ddaaa5fd96ff1e4883766ab1464be455336efde7 (patch) | |
tree | 17b74d6c0d2b8115708bd51066642a01bb9cafd5 /gcc/global.c | |
parent | de7259bba747db23296a213b990194556753b7cf (diff) | |
download | gcc-ddaaa5fd96ff1e4883766ab1464be455336efde7.tar.gz |
* global.c (find_reg): Check for HARD_REGNO_CALL_PART_CLOBBERED
every where we allocate a register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/global.c b/gcc/global.c index 99f54caf045..0d9618c27b7 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1086,6 +1086,9 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (allocno[num].hard_reg_copy_preferences, i) && HARD_REGNO_MODE_OK (i, mode) + && (allocno[num].calls_crossed == 0 + || accept_call_clobbered + || ! HARD_REGNO_CALL_PART_CLOBBERED (i, mode)) && (REGNO_REG_CLASS (i) == REGNO_REG_CLASS (best_reg) || reg_class_subset_p (REGNO_REG_CLASS (i), REGNO_REG_CLASS (best_reg)) @@ -1122,6 +1125,9 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (allocno[num].hard_reg_preferences, i) && HARD_REGNO_MODE_OK (i, mode) + && (allocno[num].calls_crossed == 0 + || accept_call_clobbered + || ! HARD_REGNO_CALL_PART_CLOBBERED (i, mode)) && (REGNO_REG_CLASS (i) == REGNO_REG_CLASS (best_reg) || reg_class_subset_p (REGNO_REG_CLASS (i), REGNO_REG_CLASS (best_reg)) @@ -1202,6 +1208,9 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying) /* Don't use a reg no good for this pseudo. */ && ! TEST_HARD_REG_BIT (used2, regno) && HARD_REGNO_MODE_OK (regno, mode) + && (allocno[num].calls_crossed == 0 + || accept_call_clobbered + || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) #ifdef CLASS_CANNOT_CHANGE_MODE && ! (REG_CHANGES_MODE (allocno[num].reg) && (TEST_HARD_REG_BIT |