This is the mail archive of the
mailing list for the GCC project.
alpha tieable modes [Re: egcs/gcc internal errors in the recent snapshot]
On Thu, Mar 11, 1999 at 05:22:10PM -0800, Richard Henderson wrote:
> On Fri, Mar 12, 1999 at 02:14:09AM +0100, Torbjorn Granlund wrote:
> > Have you considered other possibilities, such as pretending that moves
> > between the register banks are very expensive? I didn't pursue this, and I
> > have no opinion whether it may be effective.
> No I hadn't. I should make a point to look at this soon...
When this came up some months ago for x86, we decided that an
asymmetric definition of MODES_TIABLE_P was ok. With this sort
of definition, we regain all the performance we lost on Spec95.
I've checked in this change for the development branch.
* alpha.h (HARD_REGNO_MODE_OK): Allow only 4 and 8 byte unit modes
in FP regs.
(MODES_TIEABLE_P): Define asymmetricly wrt modes illegal in FP regs.
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.60
diff -u -p -d -r1.60 alpha.h
--- alpha.h 1999/03/11 14:01:27 1.60
+++ alpha.h 1999/03/17 22:45:06
@@ -622,17 +622,20 @@ extern void override_options ();
registers can hold 32-bit and 64-bit integers as well, but not 16-bit
or 8-bit values. */
-#define HARD_REGNO_MODE_OK(REGNO, MODE) \
- ((REGNO) < 32 || ((MODE) != QImode && (MODE) != HImode))
+#define HARD_REGNO_MODE_OK(REGNO, MODE) \
+ ((REGNO) >= 32 && (REGNO) <= 62 \
+ ? GET_MODE_UNIT_SIZE (MODE) == 8 || GET_MODE_UNIT_SIZE (MODE) == 4 \
+ : 1)
-/* Value is 1 if it is a good idea to tie two pseudo registers
- when one has mode MODE1 and one has mode MODE2.
- If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
- for any hard reg, then this must be 0 for correct output. */
+/* A C expression that is nonzero if a value of mode
+ MODE1 is accessible in mode MODE2 without copying.
+ This asymmetric test is true when MODE1 could be put
+ in an FP register but MODE2 could not. */
#define MODES_TIEABLE_P(MODE1, MODE2) \
- ((MODE1) == QImode || (MODE1) == HImode \
- ? (MODE2) == QImode || (MODE2) == HImode \
+ (HARD_REGNO_MODE_OK (32, (MODE1)) \
+ ? HARD_REGNO_MODE_OK (32, (MODE2)) \
/* Specify the registers used for certain standard purposes.