diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2006-04-17 01:59:41 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2006-04-17 01:59:41 +0000 |
commit | b12cbf2cc559fa466b854d89bc4069d7282a881f (patch) | |
tree | 58a07ed2ef2fe0457a23ba7f949c521901afd762 /gcc/config/mips | |
parent | ca8b30c8d14e272af6129abc5c7df4a1f2961889 (diff) | |
download | gcc-b12cbf2cc559fa466b854d89bc4069d7282a881f.zip gcc-b12cbf2cc559fa466b854d89bc4069d7282a881f.tar.gz gcc-b12cbf2cc559fa466b854d89bc4069d7282a881f.tar.bz2 |
target.h (struct gcc_target): Add mode_rep_extended.
* target.h (struct gcc_target): Add mode_rep_extended.
* rtlanal.c (num_sign_bit_copies_in_rep): New global.
(init_num_sign_bit_copies_in_rep): Initialize it using
mode_rep_extended.
(truncate_to_mode): Use it.
(init_rtlanal): Call init_num_sign_bit_copies_in_rep.
* targhooks.h (default_mode_rep_extended): Declare it.
* targhooks.c (default_mode_rep_extended): Define it.
* target-def.h (TARGET_MODE_REP_EXTENDED): New macro. Default to
default_mode_rep_extended.
(TARGET_INITIALIZER): Include it.
* doc/tm.texi (Misc): Document it.
* config/mips/mips.c (TARGET_TRUNCATED_TO_MODE): Override it.
(mips_truncated_to_mode): New function.
From-SVN: r112998
Diffstat (limited to 'gcc/config/mips')
-rw-r--r-- | gcc/config/mips/mips.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index ffe047e..f66cdc2 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -409,6 +409,7 @@ static rtx mips_expand_builtin_compare (enum mips_builtin_type, static rtx mips_expand_builtin_bposge (enum mips_builtin_type, rtx); static void mips_encode_section_info (tree, rtx, int); static void mips_extra_live_on_entry (bitmap); +static int mips_mode_rep_extended (enum machine_mode, enum machine_mode); /* Structure to be filled in by compute_frame_size with register save masks, and offsets for the current function. */ @@ -1139,6 +1140,9 @@ static struct mips_rtx_cost_data const mips_rtx_cost_data[PROCESSOR_MAX] = #undef TARGET_ARG_PARTIAL_BYTES #define TARGET_ARG_PARTIAL_BYTES mips_arg_partial_bytes +#undef TARGET_MODE_REP_EXTENDED +#define TARGET_MODE_REP_EXTENDED mips_mode_rep_extended + #undef TARGET_VECTOR_MODE_SUPPORTED_P #define TARGET_VECTOR_MODE_SUPPORTED_P mips_vector_mode_supported_p @@ -10725,5 +10729,15 @@ mips_extra_live_on_entry (bitmap regs) bitmap_set_bit (regs, PIC_FUNCTION_ADDR_REGNUM); } +/* SImode values are represented as sign-extended to DImode. */ + +int +mips_mode_rep_extended (enum machine_mode mode, enum machine_mode mode_rep) +{ + if (TARGET_64BIT && mode == SImode && mode_rep == DImode) + return SIGN_EXTEND; + + return UNKNOWN; +} #include "gt-mips.h" |