Patch to rs6000/eabispe.h and rs6000/linuxspe.h to disallow -m64
Daniel Jacobowitz
dan@codesourcery.com
Thu Oct 14 21:14:00 GMT 2004
On Thu, Oct 14, 2004 at 03:32:22PM -0400, Aldy Hernandez wrote:
> On Thu, Oct 14, 2004 at 06:36:57PM +0000, Joseph S. Myers wrote:
> > powerpc-eabispe and powerpc-linuxspe should not support -m64, but
> > wrongly permitted that option. Fixed thus.
> >
> > Cross tested with no regressions to powerpc-eabispe, and tested that
> > cc1 builds and produces the proper messages for powerpc-linuxspe. OK
>
> OK.
>
> > to commit? (Testing was done on 3.4 branch because of a pre-existing
> > build failure for powerpc-eabispe on mainline. The same patch will apply
> > without changes to both mainline and 3.4 branch.)
>
> Poop. I was hoping you had addressed this :-).
[Geoff, this is in reference to:
http://gcc.gnu.org/ml/gcc/2004-08/msg00307.html
]
I took a look at it. The problem is that movdi32_internal has two
workable alternatives for the failing instruction: r->o<> or f->m.
In each case one side matches precisely and the other side matches with
a reload; REJECT gets a +2 for the reload. One of the reloads is a
reload for input and the other is a reload for output; therefore,
reload prefers the possibility with an input reload.
So reload picks f->m. Obviously this will fail - there are no avaiable
registers in class FLOAT_REGS. This patch tells reload this, forcing
rejection of FPR constraints by mapping 'f' to NO_REGS. Untested other
than that one testcase; Aldy offered to give it a spin.
Like Geoff wrote in his response to Aldy in August, this is a
suspicious choice for reload to make. Another way to fix this would be
to not penalize output reloads which are only for the memory address;
those are no more or less likely to be reused than memory address
reloads on an input. Yet another way would be to penalize the f->m
alternative in the rs6000 backend. Yet another would be to have a
target hook to determine how much to reject by. But I think this patch
will do for now.
--
Daniel Jacobowitz
2004-10-14 Daniel Jacobowitz <dan@codesourcery.com>
* config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Return NO_REGS
for 'f' if !TARGET_FPRS.
Index: rs6000.h
===================================================================
RCS file: /home/drow/rsync/gcc-cvs/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.340
diff -u -p -r1.340 rs6000.h
--- rs6000.h 23 Sep 2004 14:34:29 -0000 1.340
+++ rs6000.h 14 Oct 2004 20:43:45 -0000
@@ -1283,7 +1283,7 @@ enum reg_class
/* Get reg_class from a letter such as appears in the machine description. */
#define REG_CLASS_FROM_LETTER(C) \
- ((C) == 'f' ? FLOAT_REGS \
+ ((C) == 'f' ? (TARGET_FPRS ? FLOAT_REGS : NO_REGS) \
: (C) == 'b' ? BASE_REGS \
: (C) == 'h' ? SPECIAL_REGS \
: (C) == 'q' ? MQ_REGS \
More information about the Gcc-patches
mailing list