alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs.
authorRichard Henderson <rth@cygnus.com>
Thu, 11 Mar 1999 14:01:27 +0000 (06:01 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 11 Mar 1999 14:01:27 +0000 (06:01 -0800)
        * alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs.
        (MODES_TIEABLE_P): Update.

From-SVN: r25704

gcc/ChangeLog
gcc/config/alpha/alpha.h

index 85ae797c53e9f26353a43629152176da6e0e1ae4..21a9c221a83799d31557bed88a8ea41311234b4c 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar 11 14:00:58 1999  Richard Henderson  <rth@cygnus.com>
+
+       * alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs.
+       (MODES_TIEABLE_P): Update.
+
 Thu Mar 11 13:55:52 1999  Richard Henderson  <rth@cygnus.com>
 
        * machmode.h (smallest_mode_for_size): Prototype.
index f5ab13bb1a644003cc309149fae008e85ceeb19f..3e119a70afdd54e2b0ba3c655557e5f95d6945df 100644 (file)
@@ -620,18 +620,20 @@ extern void override_options ();
 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
    On Alpha, the integer registers can hold any mode.  The floating-point
    registers can hold 32-bit and 64-bit integers as well, but not 16-bit
-   or 8-bit values.  If we only allowed the larger integers into FP registers,
-   we'd have to say that QImode and SImode aren't tiable, which is a
-   pain.  So say all registers can hold everything and see how that works.  */
+   or 8-bit values.  */
 
-#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
+#define HARD_REGNO_MODE_OK(REGNO, MODE)                        \
+  ((REGNO) < 32 || ((MODE) != QImode && (MODE) != HImode))
 
 /* 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.  */
 
-#define MODES_TIEABLE_P(MODE1, MODE2) 1
+#define MODES_TIEABLE_P(MODE1, MODE2)                          \
+  ((MODE1) == QImode || (MODE1) == HImode                      \
+   ? (MODE2) == QImode || (MODE2) == HImode                    \
+   : 1)
 
 /* Specify the registers used for certain standard purposes.
    The values of these macros are register numbers.  */