OSDN Git Service

* config/mep/mep.md (eh_epilogue): Defer until after epilogue is
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Sep 2009 01:06:36 +0000 (01:06 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Sep 2009 01:06:36 +0000 (01:06 +0000)
emitted.

* config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
* config/mep/mep.c (mep_legitimate_constant_p): New.
* config/mep/mep-protos.h: Prototype it.

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

gcc/ChangeLog
gcc/config/mep/mep-protos.h
gcc/config/mep/mep.c
gcc/config/mep/mep.h
gcc/config/mep/mep.md

index f5724f5..64b946a 100644 (file)
@@ -1,3 +1,12 @@
+2009-09-10  DJ Delorie  <dj@redhat.com>
+
+       * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
+       emitted.
+
+       * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
+       * config/mep/mep.c (mep_legitimate_constant_p): New.
+       * config/mep/mep-protos.h: Prototype it.
+
 2009-09-10  Richard Henderson  <rth@redhat.com>
 
        * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
index a4de754..e53ca79 100644 (file)
@@ -48,6 +48,7 @@ extern void mep_split_wide_move (rtx *, enum machine_mode);
 #ifdef RTX_CODE
 extern bool mep_expand_setcc (rtx *);
 extern rtx mep_expand_cbranch (rtx *);
+extern bool mep_legitimate_constant_p (rtx);
 #endif
 extern const char *mep_emit_cbranch (rtx *, int);
 extern void mep_expand_call (rtx *, int);
index 80d3995..6ff6405 100644 (file)
@@ -1211,6 +1211,20 @@ mep_multi_slot (rtx x)
 }
 
 
+bool
+mep_legitimate_constant_p (rtx x)
+{
+  /* We can't convert symbol values to gp- or tp-rel values after
+     reload, as reload might have used $gp or $tp for other
+     purposes.  */
+  if (GET_CODE (x) == SYMBOL_REF && (reload_in_progress || reload_completed))
+    {
+      char e = mep_section_tag (x);
+      return (e != 't' && e != 'b');
+    }
+  return 1;
+}
+
 /* Be careful not to use macros that need to be compiled one way for
    strict, and another way for not-strict, like REG_OK_FOR_BASE_P.  */
 
index cb09c30..39837df 100644 (file)
@@ -599,7 +599,8 @@ typedef struct
 
 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
 
-#define LEGITIMATE_CONSTANT_P(X) 1
+#define LEGITIMATE_CONSTANT_P(X) \
+  mep_legitimate_constant_p(X)
 
 #define SELECT_CC_MODE(OP, X, Y)  CCmode
 \f
index 20beef6..773a9a0 100644 (file)
    (use (reg:SI LP_REGNO))]
   ""
   "#"
-  "reload_completed"
+  "epilogue_completed"
   [(const_int 1)]
   "mep_emit_eh_epilogue (operands); DONE;"
   [(set_attr "slot" "multi")])