diff options
author | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-17 01:59:41 +0000 |
---|---|---|
committer | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-17 01:59:41 +0000 |
commit | 4956440ac07a9f23c0c768685dbb1f7cf172b9e2 (patch) | |
tree | 58a07ed2ef2fe0457a23ba7f949c521901afd762 /gcc/target.h | |
parent | 1bb0349635e7ca67875558ca5679943027928589 (diff) | |
download | gcc-4956440ac07a9f23c0c768685dbb1f7cf172b9e2.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.h')
-rw-r--r-- | gcc/target.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h index b9d35782a61..f0287545d7e 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); |