From: aesok Date: Thu, 9 Sep 2010 18:29:36 +0000 (+0000) Subject: * config/m32r/m32r.c (m32r_mode_dependent_address_p): New functions. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c9a773b211b251cfe2f40303ea3eba7e4ec0aa3;p=thirdparty%2Fgcc.git * config/m32r/m32r.c (m32r_mode_dependent_address_p): New functions. (TARGET_MODE_DEPENDENT_ADDRESS_P): Define. * config/m32r/m32r.h: (GO_IF_MODE_DEPENDENT_ADDRESS): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164115 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e2b585699c7..377a64affb38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-09-09 Anatoly Sokolov + + * config/m32r/m32r.c (m32r_mode_dependent_address_p): New functions. + (TARGET_MODE_DEPENDENT_ADDRESS_P): Define. + * config/m32r/m32r.h: (GO_IF_MODE_DEPENDENT_ADDRESS): Remove. + 2010-09-09 Matthias Klose PR bootstrap/43847 diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 5fff1cce004a..b1175df0fa51 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -67,6 +67,7 @@ static void init_reg_tables (void); static void block_move_call (rtx, rtx, rtx); static int m32r_is_insn (rtx); static rtx m32r_legitimize_address (rtx, rtx, enum machine_mode); +static bool m32r_mode_dependent_address_p (const_rtx); static tree m32r_handle_model_attribute (tree *, tree, tree, int, bool *); static void m32r_print_operand (FILE *, rtx, int); static void m32r_print_operand_address (FILE *, rtx); @@ -117,6 +118,8 @@ static const struct attribute_spec m32r_attribute_table[] = #undef TARGET_LEGITIMIZE_ADDRESS #define TARGET_LEGITIMIZE_ADDRESS m32r_legitimize_address +#undef TARGET_MODE_DEPENDENT_ADDRESS_P +#define TARGET_MODE_DEPENDENT_ADDRESS_P m32r_mode_dependent_address_p #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t" @@ -2043,6 +2046,17 @@ m32r_legitimize_address (rtx x, rtx orig_x ATTRIBUTE_UNUSED, else return x; } + +/* Worker function for TARGET_MODE_DEPENDENT_ADDRESS_P. */ + +static bool +m32r_mode_dependent_address_p (const_rtx addr) +{ + if (GET_CODE (addr) == LO_SUM) + return true; + + return false; +} /* Nested function support. */ diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index 66ff1ec9bfb7..9aa354a23984 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -1048,16 +1048,6 @@ L2: .word STATIC goto ADDR; \ } \ while (0) - -/* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \ - do \ - { \ - if (GET_CODE (ADDR) == LO_SUM) \ - goto LABEL; \ - } \ - while (0) /* Condition code usage. */