This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

regrename_optimize problem


Hi,

I have a problem in regrename_optimize, which I don't know how to solve
correctly, below is the patch I use currently to solve it.
gcc.c-torture/compile/920825-2.c fails with -funroll-loops for m68k. The
problems is that regrename_optimize tries to rename a data register into a
floating point register. That data register is only used to prepare the
loop and regrename_optimize thinks it can reuse during the loop it. With
the patch below I can avoid this.
The question I have now is, whether that's really the right solution or
if there is a more general solution. Only two other targets define this
macro and I'm not sure if there aren't more targets, with this potential
problem.

bye, Roman

Index: config/m68k/m68k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/m68k.h,v
retrieving revision 1.48
diff -u -r1.48 m68k.h
--- m68k.h	2001/01/01 20:35:31	1.48
+++ m68k.h	2001/07/17 00:51:10
@@ -497,6 +497,12 @@

 #ifndef SUPPORT_SUN_FPA

+#define HARD_REGNO_RENAME_OK(REG1, REG2)	\
+  (((REG1) < 16 && (REG2) < 16) ||		\
+   ((REG1) >= 16 && (REG2) >= 16 &&		\
+    (REG1) < 24 && (REG2) < 24))
+
+
 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
    On the 68000, the cpu registers can hold any mode but the 68881 registers
    can hold only SFmode or DFmode.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]