diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-20 09:52:14 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-20 09:52:14 +0000 |
commit | 19047a6ac7ef32eaa0c2ede0b914d0e30e4cd840 (patch) | |
tree | 577d8857ebceccf6f97ebb912ea0316a3e005c83 /gcc/global.c | |
parent | 4c286961f9ff0fa9ffa4d232978e6617454a8d39 (diff) | |
download | gcc-19047a6ac7ef32eaa0c2ede0b914d0e30e4cd840.tar.gz |
* global.c (find_reg): Check HARD_REGNO_NREGS before kicking
out another register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/global.c b/gcc/global.c index dfbe0388d01..471e42e8fd9 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1192,6 +1192,11 @@ 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) + /* The code below assumes that we need only a single + register, but the check of allocno[num].size above + was not enough. Sometimes we need more than one + register for a single-word value. */ + && HARD_REGNO_NREGS (regno, mode) == 1 && (allocno[num].calls_crossed == 0 || accept_call_clobbered || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) |