aboutsummaryrefslogtreecommitdiff
path: root/gcc/target.h
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2006-04-17 01:59:41 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2006-04-17 01:59:41 +0000
commitb12cbf2cc559fa466b854d89bc4069d7282a881f (patch)
tree58a07ed2ef2fe0457a23ba7f949c521901afd762 /gcc/target.h
parentca8b30c8d14e272af6129abc5c7df4a1f2961889 (diff)
downloadgcc-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/target.h')
-rw-r--r--gcc/target.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h
index b9d3578..f028754 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -520,6 +520,14 @@ struct gcc_target
the reciprocal. */
unsigned int (* min_divisions_for_recip_mul) (enum machine_mode mode);
+ /* If the representation of integral MODE is such that values are
+ always sign-extended to a wider mode MODE_REP then return
+ SIGN_EXTEND. Return UNKNOWN otherwise. */
+ /* Note that the return type ought to be RTX_CODE, but that's not
+ necessarily defined at this point. */
+ int (* mode_rep_extended) (enum machine_mode mode,
+ enum machine_mode mode_rep);
+
/* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */
bool (* valid_pointer_mode) (enum machine_mode mode);