]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (standard_80387_constant_p): Also prefer the x87's load constant instructions...
authorRoger Sayle <roger@eyesopen.com>
Sat, 21 Feb 2004 18:48:19 +0000 (18:48 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 21 Feb 2004 18:48:19 +0000 (18:48 +0000)
* config/i386/i386.c (standard_80387_constant_p): Also prefer
the x87's load constant instructions when optimizing for size.

From-SVN: r78231

gcc/ChangeLog
gcc/config/i386/i386.c

index 7ebb41639fb167686c589ce8b811e4c22516028a..00e79b069b246793d5e0d257aaa05d057cfae635 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-21  Roger Sayle  <roger@eyesopen.com>
+
+       * config/i386/i386.c (standard_80387_constant_p): Also prefer
+       the x87's load constant instructions when optimizing for size.
+
 2004-02-21  Kazu Hirata  <kazu@cs.umass.edu>
 
        * combine.c (SHIFT_COUNT_TRUNCATED): Remove.
index 3e5556d08e021b1c0292ad3e4044ea368fb4f850..92d56a004a0dcf10ae218202e1fdf16795c136e1 100644 (file)
@@ -4333,10 +4333,10 @@ standard_80387_constant_p (rtx x)
   if (x == CONST1_RTX (GET_MODE (x)))
     return 2;
 
-  /* For XFmode constants, try to find a special 80387 instruction on
-     those CPUs that benefit from them.  */
+  /* For XFmode constants, try to find a special 80387 instruction when
+     optimizing for size or on those CPUs that benefit from them.  */
   if (GET_MODE (x) == XFmode
-      && x86_ext_80387_constants & TUNEMASK)
+      && (optimize_size || x86_ext_80387_constants & TUNEMASK))
     {
       REAL_VALUE_TYPE r;
       int i;