]> gcc.gnu.org Git - gcc.git/commitdiff
mips.md (movdf_internal2): Add two new move constraints.
authorEric Christopher <echristo@gcc.gnu.org>
Sat, 16 Mar 2002 08:00:45 +0000 (08:00 +0000)
committerEric Christopher <echristo@gcc.gnu.org>
Sat, 16 Mar 2002 08:00:45 +0000 (08:00 +0000)
2002-03-15  Eric Christopher  <echristo@redhat.com>

* config/mips/mips.md (movdf_internal2): Add two new move constraints.
Fix register preference on last change.
* config/mips/mips.c (mips_return_in_memory): New function.
* config/mips/mips.h (RETURN_IN_MEMORY): Use.
* config/mips/mips-protos.h: Declare.
* config/mips/abi64.h (RETURN_IN_MEMORY): Remove. Add to above.
* config/mips/elf64.h: Add #ifndef/#endif brackets around defaults.

From-SVN: r50869

gcc/config/mips/abi64.h
gcc/config/mips/elf64.h
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md

index 653571792ed2af1cf547f5d0298e994ca1133b18..42ea208855a6421f3d1a9e58c1e3cadb8db91108 100644 (file)
@@ -99,18 +99,6 @@ Boston, MA 02111-1307, USA.  */
           && (FUNCTION_ARG_PADDING (MODE, TYPE)        \
               == (BYTES_BIG_ENDIAN ? upward : downward)))))
 
-/* Under the old (i.e., 32 and O64 ABIs) all BLKmode objects are
-   returned in memory.  Under the new (N32 and 64-bit MIPS ABIs) small
-   structures are returned in a register.  Objects with varying size
-   must still be returned in memory, of course.  */
-#undef RETURN_IN_MEMORY
-#define RETURN_IN_MEMORY(TYPE)                                          \
-  ((mips_abi == ABI_32 || mips_abi == ABI_O64)                          \
-   ? TYPE_MODE (TYPE) == BLKmode                                        \
-   : ((int_size_in_bytes (TYPE)                                                 \
-       > (2 * UNITS_PER_WORD))                                                  \
-      || (int_size_in_bytes (TYPE) == -1)))
-
 #undef FUNCTION_VALUE
 #define FUNCTION_VALUE(VALTYPE, FUNC)  mips_function_value (VALTYPE, FUNC)
 
index 130dbe747bc639f77733af11232f41b8116bc2b4..f0ac8133cfe1a783518371c1a417b12bd5924daa 100644 (file)
@@ -22,11 +22,18 @@ Boston, MA 02111-1307, USA.  */
 #define OBJECT_FORMAT_ELF
 
 /* Default to -mips3.  */
+#ifndef TARGET_DEFAULT
 #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT
+#endif
+
+#ifndef MIPS_ISA_DEFAULT
 #define MIPS_ISA_DEFAULT 3
+#endif
 
 /* This should change to n32 when it is supported in gas.  */
+#ifndef MIPS_ABI_DEFAULT
 #define MIPS_ABI_DEFAULT ABI_O64
+#endif
 
 /* Until we figure out what MIPS ELF targets normally use, just do
    stabs in ELF.  */
index 1acf3c1c2c6c341952c2b8451392e34445750fd2..e8b83bc13953c49e36e421889f15dccd60add805 100644 (file)
@@ -53,6 +53,8 @@ extern struct rtx_def  *mips_function_value PARAMS ((tree, tree));
 
 extern unsigned int    mips_hard_regno_nregs PARAMS ((int,
                                                       enum machine_mode));
+extern int              mips_return_in_memory PARAMS ((tree));
+
 extern struct rtx_def  *function_arg PARAMS ((CUMULATIVE_ARGS *,
                                              enum machine_mode, tree, int));
 extern void            function_arg_advance PARAMS ((CUMULATIVE_ARGS *,
index 773462fc7285e18383416984b04305c2304211bd..536f683a3127d37881d1dec430a4c39df39f38bc 100644 (file)
@@ -10035,6 +10035,24 @@ mips_hard_regno_nregs (regno, mode)
     return ((GET_MODE_SIZE (mode) + UNITS_PER_FPREG - 1) / UNITS_PER_FPREG);
 }
 
+int
+mips_return_in_memory (type)
+     tree type;
+{
+  /* Under the old (i.e., 32 and O64 ABIs) all BLKmode objects are
+     returned in memory.  Under the new (N32 and 64-bit MIPS ABIs) small
+     structures are returned in a register.  Objects with varying size
+     must still be returned in memory, of course.  */
+
+  if (mips_abi == ABI_32 || mips_abi == ABI_O64)
+    return (TYPE_MODE (type) == BLKmode);
+  else
+    return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
+           || (int_size_in_bytes (type) == -1));
+}
+
+
+
 \f
 #ifdef TARGET_IRIX6
 /* Output assembly to switch to section NAME with attribute FLAGS.  */
index 88042b67f408678ab4fa1f580ecb44417526a517..28ab83c2123531a70b5f447ff872ba289c25c9b5 100644 (file)
@@ -2751,7 +2751,7 @@ extern struct mips_frame_info current_frame_info;
    to give us MIPS cc compatibility.  */
 
 #define RETURN_IN_MEMORY(TYPE) \
-  (TYPE_MODE (TYPE) == BLKmode)
+       mips_return_in_memory (TYPE)
 \f
 
 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
index 19049af2ee33c55cad7bd68c81402a7574ccdb84..c31bc70a28ad1401afbc3c045e8da90828dac904 100644 (file)
@@ -6286,17 +6286,17 @@ move\\t%0,%z4\\n\\
    (set_attr "length"  "4,8,4,4,8,8,8,8,4,8,4,4")])
 
 (define_insn "movdf_internal2"
-  [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,To,*d")
-       (match_operand:DF 1 "general_operand" "dG,R,ToF,d,d,*f"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,To,d,f,f")
+       (match_operand:DF 1 "general_operand" "dG,R,ToF,d,d,f,d,f"))]
   "(TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) && !TARGET_MIPS16
    && (register_operand (operands[0], DFmode)
        || register_operand (operands[1], DFmode)
        || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0)
        || operands[1] == CONST0_RTX (DFmode))"
   "* return mips_move_2words (operands, insn); "
-  [(set_attr "type"    "move,load,load,store,store,xfer")
+  [(set_attr "type"    "move,load,load,store,store,xfer,load,move")
    (set_attr "mode"    "DF")
-   (set_attr "length"  "8,8,16,8,16,8")])
+   (set_attr "length"  "8,8,16,8,16,8,8,4")])
 
 (define_insn ""
   [(set (match_operand:DF 0 "nonimmediate_operand" "=d,y,d,d,d,R,To")
This page took 0.08439 seconds and 5 git commands to generate.