diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-12-16 14:26:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-12-16 14:26:43 +0000 |
commit | b4d43553e9353de4fefb3a1fde1277eeb1bad7be (patch) | |
tree | 9ffc3f135f0fea7660029282f6928e0c8b706973 /gcc/machmode.h | |
parent | b4ddce3663ce151423f81c9e2a206df3081d1071 (diff) | |
download | gcc-b4d43553e9353de4fefb3a1fde1277eeb1bad7be.zip gcc-b4d43553e9353de4fefb3a1fde1277eeb1bad7be.tar.gz gcc-b4d43553e9353de4fefb3a1fde1277eeb1bad7be.tar.bz2 |
poly_int: mode query functions
This patch changes the bit size and vector count arguments to the
machmode.h functions from unsigned int to poly_uint64.
2017-12-16 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
(smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
size as a poly_uint64.
(mode_for_vector, mode_for_int_vector): Take the number of vector
elements as a poly_uint64.
* stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
size as a poly_uint64.
(mode_for_vector, mode_for_int_vector): Take the number of vector
elements as a poly_uint64.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255747
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r-- | gcc/machmode.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h index 0c5c01c0a..02a41b2 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -696,14 +696,14 @@ fixed_size_mode::includes_p (machine_mode) #define MACRO_MODE(MODE) (MODE) #endif -extern opt_machine_mode mode_for_size (unsigned int, enum mode_class, int); +extern opt_machine_mode mode_for_size (poly_uint64, enum mode_class, int); /* Return the machine mode to use for a MODE_INT of SIZE bits, if one exists. If LIMIT is nonzero, modes wider than MAX_FIXED_MODE_SIZE will not be used. */ inline opt_scalar_int_mode -int_mode_for_size (unsigned int size, int limit) +int_mode_for_size (poly_uint64 size, int limit) { return dyn_cast <scalar_int_mode> (mode_for_size (size, MODE_INT, limit)); } @@ -712,7 +712,7 @@ int_mode_for_size (unsigned int size, int limit) exists. */ inline opt_scalar_float_mode -float_mode_for_size (unsigned int size) +float_mode_for_size (poly_uint64 size) { return dyn_cast <scalar_float_mode> (mode_for_size (size, MODE_FLOAT, 0)); } @@ -726,21 +726,21 @@ decimal_float_mode_for_size (unsigned int size) (mode_for_size (size, MODE_DECIMAL_FLOAT, 0)); } -extern machine_mode smallest_mode_for_size (unsigned int, enum mode_class); +extern machine_mode smallest_mode_for_size (poly_uint64, enum mode_class); /* Find the narrowest integer mode that contains at least SIZE bits. Such a mode must exist. */ inline scalar_int_mode -smallest_int_mode_for_size (unsigned int size) +smallest_int_mode_for_size (poly_uint64 size) { return as_a <scalar_int_mode> (smallest_mode_for_size (size, MODE_INT)); } extern opt_scalar_int_mode int_mode_for_mode (machine_mode); extern opt_machine_mode bitwise_mode_for_mode (machine_mode); -extern opt_machine_mode mode_for_vector (scalar_mode, unsigned); -extern opt_machine_mode mode_for_int_vector (unsigned int, unsigned int); +extern opt_machine_mode mode_for_vector (scalar_mode, poly_uint64); +extern opt_machine_mode mode_for_int_vector (unsigned int, poly_uint64); /* Return the integer vector equivalent of MODE, if one exists. In other words, return the mode for an integer vector that has the same number |