summaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-07 19:17:37 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-07 19:17:37 +0000
commit615bdf5c2e75eec756e018c522f884003de68ea4 (patch)
treef37c7454d22dd409224a66eb0ff4242c096607a2 /gcc/machmode.h
parent6c2c7775afb37c671db1b8bcc62c52597236489d (diff)
downloadgcc-615bdf5c2e75eec756e018c522f884003de68ea4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index bdaf1bee274..b95d05b096e 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];