Commit 4d01c30f by Richard Stallman

(GO_IF_LEGITIMATE_INDEX): Check explicitly for

upper and lower bounds of valid INDEX.

From-SVN: r4584
parent 6e498949
...@@ -693,15 +693,18 @@ do \ ...@@ -693,15 +693,18 @@ do \
{ \ { \
rtx xiop0 = XEXP (INDEX, 0); \ rtx xiop0 = XEXP (INDEX, 0); \
rtx xiop1 = XEXP (INDEX, 1); \ rtx xiop1 = XEXP (INDEX, 1); \
if (INDEX_REGISTER_RTX_P (xiop0) && power_of_two_operand (xiop1, SImode)) \ if (INDEX_REGISTER_RTX_P (xiop0) \
&& power_of_two_operand (xiop1, SImode)) \
goto LABEL; \ goto LABEL; \
if (INDEX_REGISTER_RTX_P (xiop1) && power_of_two_operand (xiop0, SImode)) \ if (INDEX_REGISTER_RTX_P (xiop1) \
&& power_of_two_operand (xiop0, SImode)) \
goto LABEL; \ goto LABEL; \
} \ } \
range = 4096; \ range = 4096; \
} \ } \
\ \
if (GET_CODE (INDEX) == CONST_INT && abs (INTVAL (INDEX)) < range) \ if (GET_CODE (INDEX) == CONST_INT && INTVAL (INDEX) < range \
&& INTVAL (INDEX) > -range) \
goto LABEL; \ goto LABEL; \
} while (0) } while (0)
......
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