From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25000 invoked by alias); 26 Sep 2008 03:32:23 -0000 Received: (qmail 24779 invoked by uid 48); 26 Sep 2008 03:31:02 -0000 Date: Fri, 26 Sep 2008 03:32:00 -0000 Message-ID: <20080926033102.24778.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/37633] [4.4 Regression] wrong register use on sh64 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kkojima at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg02762.txt.bz2 ------- Comment #1 from kkojima at gcc dot gnu dot org 2008-09-26 03:31 ------- I've tried --- ORIG/trunk/gcc/ira-color.c Wed Sep 17 09:48:49 2008 +++ LOCAL/trunk/gcc/ira-color.c Thu Sep 25 12:09:30 2008 @@ -514,7 +514,9 @@ assign_hard_reg (ira_allocno_t allocno, #endif if (! ira_hard_reg_not_in_set_p (hard_regno, mode, conflicting_regs) || TEST_HARD_REG_BIT (prohibited_class_mode_regs[cover_class][mode], - hard_regno)) + hard_regno) + || (ALLOCNO_CALLS_CROSSED_NUM (allocno) != 0 + && HARD_REGNO_CALL_PART_CLOBBERED (hard_regno, mode))) continue; cost = costs[i]; full_cost = full_costs[i]; @@ -3064,7 +3066,9 @@ ira_fast_allocation (void) #endif if (!ira_hard_reg_not_in_set_p (hard_regno, mode, conflict_hard_regs) || (TEST_HARD_REG_BIT - (prohibited_class_mode_regs[cover_class][mode], hard_regno))) + (prohibited_class_mode_regs[cover_class][mode], hard_regno)) + || (ALLOCNO_CALLS_CROSSED_NUM (a) != 0 + && HARD_REGNO_CALL_PART_CLOBBERED (hard_regno, mode))) continue; ALLOCNO_HARD_REGNO (a) = hard_regno; for (r = ALLOCNO_LIVE_RANGES (a); r != NULL; r = r->next) It works for me, though it could be completely wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37633