aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2015-07-28 20:31:17 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-07-28 20:31:17 +0000
commit1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde (patch)
treed215dd29e4cf213704a2c9a5dbe053e8d2c8665d /gcc/machmode.h
parent726858e30955b401a568f397e22c60062a9f57a3 (diff)
downloadgcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.zip
gcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.tar.gz
gcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.tar.bz2
arm.c (neon_element_bits, [...]): Call GET_MODE_INNER unconditionally.
gcc/ 2015-07-28 David Sherwood <david.sherwood@arm.com> * config/arm/arm.c (neon_element_bits, neon_valid_immediate): Call GET_MODE_INNER unconditionally. * config/spu/spu.c (arith_immediate_p): Likewise. * config/i386/i386.c (ix86_build_signbit_mask): Likewise. * expmed.c (synth_mult): Remove check for VOIDmode result from GET_MODE_INNER. (expand_mult_const): Likewise. * fold-const.c (fold_binary_loc): Replace call to element_precision with call to GET_MODE_PRECISION. * genmodes.c (emit_mode_inner_inline): Replace void_mode->name with m->name. (emit_mode_inner): Likewise. * lto-streamer-out.c (lto_write_mode_table): Update GET_MODE_INNER result check. * machmode.h (GET_MODE_UNIT_SIZE): Simplify. (GET_MODE_UNIT_PRECISION): Likewise. * rtlanal.c (subreg_get_info): Call GET_MODE_INNER unconditionally. * simplify-rtx.c (simplify_immed_subreg): Likewise. * stor-layout.c (bitwise_type_for_mode): Update assert. (element_precision): Remove. From-SVN: r226328
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 5ab7eeb..6575517 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -209,7 +209,9 @@ extern const unsigned HOST_WIDE_INT mode_mask_array[NUM_MACHINE_MODES];
#define GET_MODE_MASK(MODE) mode_mask_array[MODE]
-/* Return the mode of the inner elements in a vector. */
+/* Return the mode of the basic parts of MODE. For vector modes this is the
+ mode of the vector elements. For complex modes it is the mode of the real
+ and imaginary parts. For other modes it is MODE itself. */
extern const unsigned char mode_inner[NUM_MACHINE_MODES];
#if GCC_VERSION >= 4001
@@ -220,21 +222,15 @@ extern const unsigned char mode_inner[NUM_MACHINE_MODES];
#define GET_MODE_INNER(MODE) ((machine_mode) mode_inner[MODE])
#endif
-/* Get the size in bytes or bites of the basic parts of an
+/* Get the size in bytes or bits of the basic parts of an
object of mode MODE. */
-#define GET_MODE_UNIT_SIZE(MODE) \
- (GET_MODE_INNER (MODE) == VOIDmode \
- ? GET_MODE_SIZE (MODE) \
- : GET_MODE_SIZE (GET_MODE_INNER (MODE)))
+#define GET_MODE_UNIT_SIZE(MODE) GET_MODE_SIZE (GET_MODE_INNER (MODE))
#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)))
+#define GET_MODE_UNIT_PRECISION(MODE) GET_MODE_PRECISION (GET_MODE_INNER (MODE))
/* Get the number of units in the object. */
@@ -320,10 +316,6 @@ extern unsigned get_mode_alignment (machine_mode);
#define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE)
-/* Get the precision of the mode or its inner mode if it has one. */
-
-extern unsigned int element_precision (machine_mode);
-
/* For each class, get the narrowest mode in that class. */
extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];