diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2012-10-07 19:17:37 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2012-10-07 19:17:37 +0000 |
commit | 40c5ed5b5a7f1fc4e05c36c3f9d069467390b5d3 (patch) | |
tree | f37c7454d22dd409224a66eb0ff4242c096607a2 /gcc/machmode.h | |
parent | ed901e4c617dec0b7388b2410e802545a2a55bb0 (diff) | |
download | gcc-40c5ed5b5a7f1fc4e05c36c3f9d069467390b5d3.zip gcc-40c5ed5b5a7f1fc4e05c36c3f9d069467390b5d3.tar.gz gcc-40c5ed5b5a7f1fc4e05c36c3f9d069467390b5d3.tar.bz2 |
machmode.h (GET_MODE_UNIT_PRECISION): New macro.
gcc/
* machmode.h (GET_MODE_UNIT_PRECISION): New macro.
* simplify-rtx.c (simplify_truncation): New function,
extracted from simplify_subreg and (in small part) from
simplify_unary_operation_1.
(simplify_unary_operation_1) <TRUNCATE>: Use it. Remove sign bit
test for !TRULY_NOOP_TRUNCATION_MODES_P.
(simplify_subreg): Use simplify_truncate for lowpart subregs
where both the inner and outer modes are scalar integers.
* config/mips/mips.c (mips_truncated_op_cost): New function.
(mips_rtx_costs): Adjust test for BADDU.
* config/mips/mips.md (*baddu_di<mode>): Push truncates to operands.
From-SVN: r192186
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r-- | gcc/machmode.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h index bdaf1be..b95d05b 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -217,6 +217,11 @@ extern const unsigned char mode_inner[NUM_MACHINE_MODES]; #define GET_MODE_UNIT_BITSIZE(MODE) \ ((unsigned short) (GET_MODE_UNIT_SIZE (MODE) * BITS_PER_UNIT)) +#define GET_MODE_UNIT_PRECISION(MODE) \ + (GET_MODE_INNER (MODE) == VOIDmode \ + ? GET_MODE_PRECISION (MODE) \ + : GET_MODE_PRECISION (GET_MODE_INNER (MODE))) + /* Get the number of units in the object. */ extern const unsigned char mode_nunits[NUM_MACHINE_MODES]; |