OSDN Git Service

(mips_split_addresses, mips_check_split, move_operand):
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 1996 19:00:17 +0000 (19:00 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 1996 19:00:17 +0000 (19:00 +0000)
New declarations
(GO_IF_LEGITIMATE_ADDRESS): Reject constant addresses when
mips_split_addresses is TRUE.  Add LO_SUM support.
(LEGITIMIZE_ADDRESS): Add LO_SUM support.
(PREDICATE_CODES): Modify call_insn_operand support.  Add
move_operand.

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

gcc/config/mips/mips.h

index 043a992..9db54b4 100644 (file)
@@ -138,6 +138,7 @@ extern int mips_isa;                        /* architectural level */
 extern char *mips_cpu_string;          /* for -mcpu=<xxx> */
 extern char *mips_isa_string;          /* for -mips{1,2,3,4} */
 extern char *mips_abi_string;          /* for -misa={32,n32,64} */
+extern int mips_split_addresses;       /* perform high/lo_sum support */
 extern int dslots_load_total;          /* total # load related delay slots */
 extern int dslots_load_filled;         /* # filled load delay slots */
 extern int dslots_jump_total;          /* total # jump related delay slots */
@@ -180,6 +181,7 @@ extern void         mips_declare_object ();
 extern int             mips_epilogue_delay_slots ();
 extern void            mips_expand_epilogue ();
 extern void            mips_expand_prologue ();
+extern int             mips_check_split ();
 extern char           *mips_fill_delay_slot ();
 extern char           *mips_move_1word ();
 extern char           *mips_move_2words ();
@@ -214,6 +216,7 @@ extern int          nonimmediate_operand ();
 extern int             nonmemory_operand ();
 extern int             register_operand ();
 extern int             scratch_operand ();
+extern int             move_operand ();
 
 /* Functions to change what output section we are using.  */
 extern void            data_section ();
@@ -2350,9 +2353,20 @@ typedef struct mips_args {
   if (GET_CODE (xinsn) == REG && REG_OK_FOR_BASE_P (xinsn))            \
     goto ADDR;                                                         \
                                                                        \
-  if (CONSTANT_ADDRESS_P (xinsn))                                      \
+  if (CONSTANT_ADDRESS_P (xinsn)                                       \
+      && ! (mips_split_addresses && mips_check_split (xinsn, MODE)))   \
     goto ADDR;                                                         \
                                                                        \
+  if (GET_CODE (xinsn) == LO_SUM && mips_split_addresses)              \
+    {                                                                  \
+      register rtx xlow0 = XEXP (xinsn, 0);                            \
+      register rtx xlow1 = XEXP (xinsn, 1);                            \
+                                                                       \
+      if (GET_CODE (xlow0) == REG && REG_OK_FOR_BASE_P (xlow0)         \
+         && mips_check_split (xlow1, MODE))                            \
+       goto ADDR;                                                      \
+    }                                                                  \
+                                                                       \
   if (GET_CODE (xinsn) == PLUS)                                                \
     {                                                                  \
       register rtx xplus0 = XEXP (xinsn, 0);                           \
@@ -2396,6 +2410,7 @@ typedef struct mips_args {
          if (!TARGET_DEBUG_A_MODE                                      \
              && mips_abi == ABI_32                                     \
              && CONSTANT_ADDRESS_P (xplus1)                            \
+             && ! mips_split_addresses                                 \
              && (!TARGET_EMBEDDED_PIC                                  \
                  || code1 != CONST                                     \
                  || GET_CODE (XEXP (xplus1, 0)) != MINUS))             \
@@ -2493,6 +2508,14 @@ typedef struct mips_args {
       GO_DEBUG_RTX (xinsn);                                            \
     }                                                                  \
                                                                        \
+  if (mips_split_addresses && mips_check_split (X, MODE))              \
+    {                                                                  \
+      /* ??? Is this ever executed?  */                                        \
+      X = gen_rtx (LO_SUM, Pmode,                                      \
+                  copy_to_mode_reg (Pmode, gen_rtx (HIGH, Pmode, X)), X); \
+      goto WIN;                                                                \
+    }                                                                  \
+                                                                       \
   if (GET_CODE (xinsn) == CONST                                                \
       && ((flag_pic && pic_address_needs_scratch (xinsn))              \
          /* ??? SGI's Irix 6 assembler can't handle CONST.  */         \
@@ -3034,7 +3057,10 @@ while (0)
   {"cmp_op",                   { EQ, NE, GT, GE, GTU, GEU, LT, LE,     \
                                  LTU, LEU }},                          \
   {"pc_or_label_operand",      { PC, LABEL_REF }},                     \
-  {"call_insn_operand",                { MEM }},                               \
+  {"call_insn_operand",                { CONST_INT, CONST, SYMBOL_REF, REG}},  \
+  {"move_operand",             { CONST_INT, CONST_DOUBLE, CONST,       \
+                                 SYMBOL_REF, LABEL_REF, SUBREG,        \
+                                 REG, MEM}},                           \
 
 \f
 /* If defined, a C statement to be executed just prior to the