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
+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.
#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);
}
+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. */
#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
(use (reg:SI LP_REGNO))]
""
"#"
- "reload_completed"
+ "epilogue_completed"
[(const_int 1)]
"mep_emit_eh_epilogue (operands); DONE;"
[(set_attr "slot" "multi")])