Commit 9bf22b75 by Richard Kenner

(force_to_mode, case ASHIFTRT): Verify mode bitsize is within

HOST_BITS_PER_WIDE_INT before shifting by it.

From-SVN: r10513
parent e82ee4cc
...@@ -6018,8 +6018,9 @@ force_to_mode (x, mode, mask, reg, just_select) ...@@ -6018,8 +6018,9 @@ force_to_mode (x, mode, mask, reg, just_select)
case ASHIFTRT: case ASHIFTRT:
/* If we are just looking for the sign bit, we don't need this shift at /* If we are just looking for the sign bit, we don't need this shift at
all, even if it has a variable count. */ all, even if it has a variable count. */
if (mask == ((HOST_WIDE_INT) 1 if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
<< (GET_MODE_BITSIZE (GET_MODE (x)) - 1))) && (mask == ((HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (x)) - 1))))
return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select);
/* If this is a shift by a constant, get a mask that contains those bits /* If this is a shift by a constant, get a mask that contains those bits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment