This is the mail archive of the
mailing list for the GCC project.
- To: <gcc-bugs at gcc dot gnu dot org>
- Subject: regrename_optimize problem
- From: Roman Zippel <zippel at linux-m68k dot org>
- Date: Fri, 20 Jul 2001 02:32:58 +0200 (CEST)
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
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 @@
+#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. */