mips.c (override_options): Don't allow too small integers in FP registers.
authorThiemo Seufer <ths@networkno.de>
Fri, 9 Dec 2005 08:19:15 +0000 (08:19 +0000)
committerThiemo Seufer <ths@gcc.gnu.org>
Fri, 9 Dec 2005 08:19:15 +0000 (08:19 +0000)
* config/mips/mips.c (override_options): Don't allow too small
integers in FP registers.

From-SVN: r108276

gcc/ChangeLog
gcc/config/mips/mips.c

index 5faabaf6f4dc381bde9b0a399f8a2985ddd4dd06..22a9fbccd62b12a75096ec1e39db0db5943a2495 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-09  Thiemo Seufer  <ths@networkno.de>
+
+       * config/mips/mips.c (override_options): Don't allow too small
+       integers in FP registers.
+
 2005-12-09  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (s390_function_ok_for_sibcall): Use
index 3e7d0f0baa38095ad4bf4ab5f0f714139fb76cfe..5a655f6edf02b19ac7b0391990b9339c038eb9ad 100644 (file)
@@ -4916,8 +4916,13 @@ override_options (void)
                         && size <= UNITS_PER_FPVALUE)
                        /* Allow integer modes that fit into a single
                           register.  We need to put integers into FPRs
-                          when using instructions like cvt and trunc.  */
-                       || (class == MODE_INT && size <= UNITS_PER_FPREG)
+                          when using instructions like cvt and trunc.
+                          We can't allow sizes smaller than a word,
+                          the FPU has no appropriate load/store
+                          instructions for those.  */
+                       || (class == MODE_INT
+                           && size >= MIN_UNITS_PER_WORD
+                           && size <= UNITS_PER_FPREG)
                        /* Allow TFmode for CCmode reloads.  */
                        || (ISA_HAS_8CC && mode == TFmode));