OSDN Git Service

Fix sparc -msoft-float abort while compiling newlib.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Feb 2000 21:08:47 +0000 (21:08 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Feb 2000 21:08:47 +0000 (21:08 +0000)
* config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Delete 'E' check for
FP constants.  Add ! TARGET_FPU check for FP constants.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31762 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.h

index 69794c0..9e38249 100644 (file)
@@ -1,3 +1,8 @@
+Wed Feb  2 13:07:10 2000  Jim Wilson  <wilson@cygnus.com>
+
+       * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Delete 'E' check for
+       FP constants.  Add ! TARGET_FPU check for FP constants.
+
 2000-02-02  Clinton Popetz  <cpopetz@cygnus.com>
        
        * flow.c (find_basic_blocks): Don't kill label_value_list
index e69217d..495eed1 100644 (file)
@@ -1475,8 +1475,9 @@ extern char leaf_reg_remap[];
    in class CLASS, return the class of reg to actually use.
    In general this is just CLASS; but on some machines
    in some cases it is preferable to use a more restrictive class.  */
-/* - We can't load constants into FP registers.  We can't load any FP
-     constant if an 'E' constraint fails to match it.
+/* - We can't load constants into FP registers.
+   - We can't load FP constants into integer registers when soft-float,
+     because there is no soft-float pattern with a r/F constraint.
    - Try and reload integer constants (symbolic or otherwise) back into
      registers directly, rather than having them dumped to memory.  */
 
@@ -1484,8 +1485,7 @@ extern char leaf_reg_remap[];
   (CONSTANT_P (X)                                      \
    ? ((FP_REG_CLASS_P (CLASS)                          \
        || (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
-          && (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT   \
-              || HOST_BITS_PER_INT != BITS_PER_WORD))) \
+          && ! TARGET_FPU))                            \
       ? NO_REGS                                                \
       : (!FP_REG_CLASS_P (CLASS)                       \
          && GET_MODE_CLASS (GET_MODE (X)) == MODE_INT) \