aboutsummaryrefslogtreecommitdiff
path: root/gcc/target.h
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-09-04 08:50:36 +0000
committerRichard Sandiford <rsandifo@redhat.com>2004-09-04 08:50:36 +0000
commit06834ccaa68df039bf45ad2bde2df394bace2a90 (patch)
tree4320b41f468e28f9439feab3f57dff953085081c /gcc/target.h
parentecfecbc7d82f6871d3024d2760972770b3e8bd53 (diff)
* doc/md.texi (shift patterns): New anchor. Add reference to
TARGET_SHIFT_TRUNCATION_MASK. * doc/tm.texi (TARGET_SHIFT_TRUNCATION_MASK): Document. * target.h (shift_truncation_mask): New target hook. * targhook.h (default_shift_truncation_mask): Declare. * targhook.c (default_shift_truncation_mask): Define. * target-def.h (TARGET_SHIFT_TRUNCATION_MASK): Define. (TARGET_INITIALIZER): Include it. * simplify-rtx.c (simplify_binary_operation): Combine ASHIFT, ASHIFTRT and LSHIFTRT cases. Truncate arg1 if SHIFT_COUNT_TRUNCATED, otherwise reject all out-of-range values. Fix sign-extension code for modes whose width is smaller than HOST_BITS_PER_WIDE_INT. * optabs.c (simplify_expand_binop, force_expand_binop): New functions. (expand_superword_shift, expand_subword_shift): Likewise. (expand_doubleword_shift_condmove, expand_doubleword_shift): Likewise. (expand_binop): Use them to implement double-word shifts. * config/arm/arm.c (arm_shift_truncation_mask): New function. (TARGET_SHIFT_TRUNCATION_MASK): Define. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.h')
-rw-r--r--gcc/target.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h
index 035aeed4426..735a85d11dd 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -378,6 +378,10 @@ struct gcc_target
/* Undo the effects of encode_section_info on the symbol string. */
const char * (* strip_name_encoding) (const char *);
+ /* If shift optabs for MODE are known to always truncate the shift count,
+ return the mask that they apply. Return 0 otherwise. */
+ unsigned HOST_WIDE_INT (* shift_truncation_mask) (enum machine_mode mode);
+
/* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */
bool (* valid_pointer_mode) (enum machine_mode mode);