diff options
author | DJ Delorie <dj@redhat.com> | 2009-09-10 21:06:36 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2009-09-10 21:06:36 -0400 |
commit | 5ba863d70d67fe53afb11ec0e71fc703ba843507 (patch) | |
tree | b69489c02c52fc31e99819ea360ac4da2d3024ea /gcc/config | |
parent | 24f7037972cbedeeea8b3629245ba7ef2117c297 (diff) | |
download | gcc-5ba863d70d67fe53afb11ec0e71fc703ba843507.zip gcc-5ba863d70d67fe53afb11ec0e71fc703ba843507.tar.gz gcc-5ba863d70d67fe53afb11ec0e71fc703ba843507.tar.bz2 |
mep.md (eh_epilogue): Defer until after epilogue is emitted.
* 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.
From-SVN: r151625
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/mep/mep-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/mep/mep.c | 14 | ||||
-rw-r--r-- | gcc/config/mep/mep.h | 3 | ||||
-rw-r--r-- | gcc/config/mep/mep.md | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/gcc/config/mep/mep-protos.h b/gcc/config/mep/mep-protos.h index a4de754..e53ca79 100644 --- a/gcc/config/mep/mep-protos.h +++ b/gcc/config/mep/mep-protos.h @@ -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); diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 80d3995..6ff6405 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -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. */ diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h index cb09c30..39837df 100644 --- a/gcc/config/mep/mep.h +++ b/gcc/config/mep/mep.h @@ -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 diff --git a/gcc/config/mep/mep.md b/gcc/config/mep/mep.md index 20beef6..773a9a0 100644 --- a/gcc/config/mep/mep.md +++ b/gcc/config/mep/mep.md @@ -2192,7 +2192,7 @@ (use (reg:SI LP_REGNO))] "" "#" - "reload_completed" + "epilogue_completed" [(const_int 1)] "mep_emit_eh_epilogue (operands); DONE;" [(set_attr "slot" "multi")]) |