[Bug java/48417] -ffixed-regs option can't work in mips-elf-gcj compiler
licheng.1212 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Aug 27 07:46:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48417
--- Comment #6 from licheng.1212 at gmail dot com <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!!
More information about the Gcc-bugs
mailing list