From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30984 invoked by alias); 27 Aug 2011 06:12:37 -0000 Received: (qmail 30960 invoked by uid 22791); 27 Aug 2011 06:12:36 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Aug 2011 06:12:24 +0000 From: "licheng.1212 at gmail dot com" To: java-prs@gcc.gnu.org Subject: [Bug java/48417] -ffixed-regs option can't work in mips-elf-gcj compiler Date: Sat, 27 Aug 2011 06:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: licheng.1212 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2011-q3/txt/msg00025.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48417 --- Comment #6 from licheng.1212 at gmail dot com 2011-08-27 06:12:05 UTC --- (In reply to comment #5) > (In reply to comment #4) > > still hava this problem,please see the latest commit > > See PR43700, which I suspect was fixed by r172616 on trunk. PR43700's patch is bad,But PR43732's patch is OK PR43700: --- branches/gcc-4_4-branch/gcc/config/mips/mips.c 2011/05/29 17:51:03 174408 +++ branches/gcc-4_4-branch/gcc/config/mips/mips.c 2011/05/29 18:10:44 174409 @@ -8495,7 +8495,7 @@ property here. */ return (regno == GLOBAL_POINTER_REGNUM ? TARGET_CALL_SAVED_GP - : !call_really_used_regs[regno]); + : !global_regs[regno] && !call_really_used_regs[regno]); } /* Return true if the function body might clobber register REGNO. PR43732: diff -Naur gcc-4.4.3.base/gcc/config/mips/mips.c gcc-4.4.3/gcc/config/mips/mips.c --- gcc-4.4.3.base/gcc/config/mips/mips.c 2010-04-09 14:10:00.235609702 -0400 +++ gcc-4.4.3/gcc/config/mips/mips.c 2010-04-09 14:12:28.520998582 -0400 @@ -8495,7 +8495,7 @@ property here. */ return (regno == GLOBAL_POINTER_REGNUM ? TARGET_CALL_SAVED_GP - : !call_really_used_regs[regno]); + : !call_really_used_regs[regno] && !fixed_regs[regno]); } /* Return true if the function body might clobber register REGNO. Please check it!!