From 19047a6ac7ef32eaa0c2ede0b914d0e30e4cd840 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Wed, 20 Nov 2002 09:52:14 +0000 Subject: * 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 --- gcc/global.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/global.c') 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)) -- cgit v1.2.1