diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2004-09-04 08:50:36 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2004-09-04 08:50:36 +0000 |
commit | 273a2526bdccb1cde0f332d254616982cc142a64 (patch) | |
tree | 4320b41f468e28f9439feab3f57dff953085081c /gcc/targhooks.c | |
parent | caf29de78e1a609a86f4f883db628e97f51b96c8 (diff) | |
download | gcc-273a2526bdccb1cde0f332d254616982cc142a64.zip gcc-273a2526bdccb1cde0f332d254616982cc142a64.tar.gz gcc-273a2526bdccb1cde0f332d254616982cc142a64.tar.bz2 |
md.texi (shift patterns): New anchor.
* 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.
From-SVN: r87079
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 6aa2e071..5ecb6d83 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -135,6 +135,14 @@ default_eh_return_filter_mode (void) return word_mode; } +/* The default implementation of TARGET_SHIFT_TRUNCATION_MASK. */ + +unsigned HOST_WIDE_INT +default_shift_truncation_mask (enum machine_mode mode) +{ + return SHIFT_COUNT_TRUNCATED ? GET_MODE_BITSIZE (mode) - 1 : 0; +} + /* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true. */ bool |