]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs.
authorRichard Henderson <rth@cygnus.com>
Sun, 14 Mar 1999 02:05:38 +0000 (18:05 -0800)
committerJeff Law <law@gcc.gnu.org>
Sun, 14 Mar 1999 02:05:38 +0000 (19:05 -0700)
        * alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs.
        (MODES_TIEABLE_P): Update.

From-SVN: r25761

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

index 6dd29b27e44fba6d4c7162636493cf9068d872bc..3e8515aaef60a3caa17bd8d5de99829e2ea59705 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 00:20:52 1999  Alexandre Oliva <oliva@dcc.unicamp.br>
 
        * gcc.texi: Update bug reporting instructions to match
index 2f69908284fda9167f312056bddedd7e30d8570a..43b0deed743f365510d31c7e459b5a4ff1c25bf9 100644 (file)
@@ -611,18 +611,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.  */