aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/gcc-interface/decl.c2
-rw-r--r--gcc/expr.c4
-rw-r--r--gcc/machmode.h6
-rw-r--r--gcc/stor-layout.c2
-rw-r--r--gcc/tree-vrp.c2
7 files changed, 30 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5beaf45..526c57b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -2,6 +2,18 @@
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
+ * machmode.h (NARROWEST_INT_MODE): New macro.
+ * expr.c (alignment_for_piecewise_move): Use it instead of
+ GET_CLASS_NARROWEST_MODE (MODE_INT).
+ (push_block): Likewise.
+ * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
+ Likewise.
+ * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
+
+2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
* expr.c (expand_expr_real_2): Use scalar_int_mode for the
double-word mode.
* lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index fa3525c..fe93c05 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -2,6 +2,13 @@
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
+ * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
+ instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
+
+2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
* gcc-interface/decl.c (check_ok_for_atomic_type): Use
is_a <scalar_int_mode>.
* gcc-interface/trans.c (Pragma_to_gnu): Likewise.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index c80960f..ae4c6ec 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -8574,7 +8574,7 @@ validate_size (Uint uint_size, tree gnu_type, Entity_Id gnat_object,
by the smallest integral mode that's valid for pointers. */
if (TREE_CODE (gnu_type) == POINTER_TYPE || TYPE_IS_FAT_POINTER_P (gnu_type))
{
- machine_mode p_mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
+ scalar_int_mode p_mode = NARROWEST_INT_MODE;
while (!targetm.valid_pointer_mode (p_mode))
p_mode = GET_MODE_WIDER_MODE (p_mode).require ();
type_size = bitsize_int (GET_MODE_BITSIZE (p_mode));
diff --git a/gcc/expr.c b/gcc/expr.c
index ea1a6d4..433e05b 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -707,7 +707,7 @@ alignment_for_piecewise_move (unsigned int max_pieces, unsigned int align)
{
machine_mode tmode, xmode;
- xmode = GET_CLASS_NARROWEST_MODE (MODE_INT);
+ xmode = NARROWEST_INT_MODE;
FOR_EACH_MODE_IN_CLASS (tmode, MODE_INT)
{
if (GET_MODE_SIZE (tmode) > max_pieces
@@ -3910,7 +3910,7 @@ push_block (rtx size, int extra, int below)
negate_rtx (Pmode, size));
}
- return memory_address (GET_CLASS_NARROWEST_MODE (MODE_INT), temp);
+ return memory_address (NARROWEST_INT_MODE, temp);
}
/* A utility routine that returns the base of an auto-inc memory, or NULL. */
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 497b0fb..a9fc93a 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -655,6 +655,12 @@ extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];
#define GET_CLASS_NARROWEST_MODE(CLASS) \
((machine_mode) class_narrowest_mode[CLASS])
+/* The narrowest full integer mode available on the target. */
+
+#define NARROWEST_INT_MODE \
+ (scalar_int_mode \
+ (scalar_int_mode::from_int (class_narrowest_mode[MODE_INT])))
+
/* Return the narrowest mode in T's class. */
template<typename T>
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index c859c8b..e447f4f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -2723,7 +2723,7 @@ bit_field_mode_iterator
HOST_WIDE_INT bitregion_start,
HOST_WIDE_INT bitregion_end,
unsigned int align, bool volatilep)
-: m_mode (GET_CLASS_NARROWEST_MODE (MODE_INT)), m_bitsize (bitsize),
+: m_mode (NARROWEST_INT_MODE), m_bitsize (bitsize),
m_bitpos (bitpos), m_bitregion_start (bitregion_start),
m_bitregion_end (bitregion_end), m_align (align),
m_volatilep (volatilep), m_count (0)
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 4da6a2b..dc5554d 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -10120,7 +10120,7 @@ simplify_float_conversion_using_ranges (gimple_stmt_iterator *gsi,
integer mode available. */
else
{
- mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
+ mode = NARROWEST_INT_MODE;
for (;;)
{
/* If we cannot do a signed conversion to float from mode