summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/emit-rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/emit-rtl.c')
-rw-r--r--contrib/gcc/emit-rtl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/contrib/gcc/emit-rtl.c b/contrib/gcc/emit-rtl.c
index f6c6761..3510265 100644
--- a/contrib/gcc/emit-rtl.c
+++ b/contrib/gcc/emit-rtl.c
@@ -355,6 +355,14 @@ gen_rtx_CONST_INT (mode, arg)
return (rtx) *slot;
}
+rtx
+gen_int_mode (c, mode)
+ HOST_WIDE_INT c;
+ enum machine_mode mode;
+{
+ return GEN_INT (trunc_int_for_mode (c, mode));
+}
+
/* CONST_DOUBLEs needs special handling because their length is known
only at run-time. */
@@ -831,6 +839,11 @@ gen_lowpart_common (mode, x)
> ((xsize + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)))
return 0;
+ /* Don't allow generating paradoxical FLOAT_MODE subregs. */
+ if (GET_MODE_CLASS (mode) == MODE_FLOAT
+ && GET_MODE (x) != VOIDmode && msize > xsize)
+ return 0;
+
offset = subreg_lowpart_offset (mode, GET_MODE (x));
if ((GET_CODE (x) == ZERO_EXTEND || GET_CODE (x) == SIGN_EXTEND)
@@ -2161,6 +2174,7 @@ widen_memory_access (memref, mode, offset)
/* Similarly for the decl. */
else if (DECL_P (expr)
&& DECL_SIZE_UNIT (expr)
+ && TREE_CODE (DECL_SIZE_UNIT (expr)) == INTEGER_CST
&& compare_tree_int (DECL_SIZE_UNIT (expr), size) >= 0
&& (! memoffset || INTVAL (memoffset) >= 0))
break;
@@ -5023,7 +5037,7 @@ init_emit_once (line_numbers)
tries to use these variables. */
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
- gen_rtx_raw_CONST_INT (VOIDmode, i);
+ gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
OpenPOWER on IntegriCloud