diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-22 07:18:33 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-22 07:18:33 +0000 |
commit | 5115372146c7762b67b0c30b01906d3fe6dad0c3 (patch) | |
tree | 4b5d0ea58d499c4b232c97da3fe08e4bad5182b5 /gcc/config/m32r/m32r.c | |
parent | a8761b59fd725a476ce823908fa43b62367e02d3 (diff) | |
download | gcc-5115372146c7762b67b0c30b01906d3fe6dad0c3.tar.gz |
2010-11-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 167021
2010-11-22 Basile Starynkevitch <basile@starynkevitch.net>
* melt-runtime.c: replaced strerror by xstrerror everywhere, while
merging with trunk 167021.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@167023 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32r/m32r.c')
-rw-r--r-- | gcc/config/m32r/m32r.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index d17742dc9e4..18ac2608dab 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -101,6 +101,7 @@ static rtx m32r_function_arg (CUMULATIVE_ARGS *, enum machine_mode, static void m32r_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, const_tree, bool); static bool m32r_can_eliminate (const int, const int); +static void m32r_conditional_register_usage (void); static void m32r_trampoline_init (rtx, tree, rtx); /* M32R specific attributes. */ @@ -204,6 +205,9 @@ static const struct default_options m32r_option_optimization_table[] = #undef TARGET_CAN_ELIMINATE #define TARGET_CAN_ELIMINATE m32r_can_eliminate +#undef TARGET_CONDITIONAL_REGISTER_USAGE +#define TARGET_CONDITIONAL_REGISTER_USAGE m32r_conditional_register_usage + #undef TARGET_TRAMPOLINE_INIT #define TARGET_TRAMPOLINE_INIT m32r_trampoline_init @@ -2837,3 +2841,13 @@ m32r_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) gen_int_mode (TRAMPOLINE_SIZE, SImode), SImode, GEN_INT (3), SImode); } + +static void +m32r_conditional_register_usage (void) +{ + if (flag_pic) + { + fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; + } +} |