diff options
author | Bob Wilson <bob.wilson@acm.org> | 2004-03-05 01:13:43 +0000 |
---|---|---|
committer | Bob Wilson <bwilson@gcc.gnu.org> | 2004-03-05 01:13:43 +0000 |
commit | 6e5ff6e7fba04bf828f7440f6248306b28dae94c (patch) | |
tree | b078d18134ba9fa5d9cafa9c43403a2dcb7f8560 /gcc | |
parent | fd9361f7c4609f3602ab847cde013d47ede24987 (diff) | |
download | gcc-6e5ff6e7fba04bf828f7440f6248306b28dae94c.zip gcc-6e5ff6e7fba04bf828f7440f6248306b28dae94c.tar.gz gcc-6e5ff6e7fba04bf828f7440f6248306b28dae94c.tar.bz2 |
xtensa.c (xtensa_return_in_msb): New function.
* config/xtensa/xtensa.c (xtensa_return_in_msb): New function.
(TARGET_RETURN_IN_MSB): Define to xtensa_return_in_msb.
From-SVN: r78955
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 050d048..74fe101 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-04 Bob Wilson <bob.wilson@acm.org> + + * config/xtensa/xtensa.c (xtensa_return_in_msb): New function. + (TARGET_RETURN_IN_MSB): Define to xtensa_return_in_msb. + 2004-03-05 Hans-Peter Nilsson <hp@axis.com> PR other/14354 diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 09a2f34..cb03b53 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -200,6 +200,7 @@ static rtx gen_conditional_move (rtx); static rtx fixup_subreg_mem (rtx); static enum machine_mode xtensa_find_mode_for_size (unsigned); static struct machine_function * xtensa_init_machine_status (void); +static bool xtensa_return_in_msb (tree); static void printx (FILE *, signed int); static void xtensa_function_epilogue (FILE *, HOST_WIDE_INT); static rtx xtensa_builtin_saveregs (void); @@ -254,6 +255,9 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = #undef TARGET_EXPAND_BUILTIN_SAVEREGS #define TARGET_EXPAND_BUILTIN_SAVEREGS xtensa_builtin_saveregs +#undef TARGET_RETURN_IN_MSB +#define TARGET_RETURN_IN_MSB xtensa_return_in_msb + struct gcc_target targetm = TARGET_INITIALIZER; @@ -1815,6 +1819,15 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, } +static bool +xtensa_return_in_msb (tree valtype) +{ + return (TARGET_BIG_ENDIAN + && AGGREGATE_TYPE_P (valtype) + && int_size_in_bytes (valtype) >= UNITS_PER_WORD); +} + + void override_options (void) { |