diff options
| -rw-r--r-- | simplify.c | 8 | ||||
| -rw-r--r-- | validation/shift-undef.c | 8 |
2 files changed, 12 insertions, 4 deletions
@@ -540,7 +540,7 @@ undef: } -static int simplify_asr(struct instruction *insn, pseudo_t pseudo, long long value) +static int simplify_shift(struct instruction *insn, pseudo_t pseudo, long long value) { unsigned int size; @@ -660,14 +660,14 @@ static int simplify_constant_rightside(struct instruction *insn) } /* Fall through */ case OP_ADD: - case OP_SHL: - case OP_LSR: case_neutral_zero: if (!value) return replace_with_pseudo(insn, insn->src1); return 0; case OP_ASR: - return simplify_asr(insn, insn->src1, value); + case OP_SHL: + case OP_LSR: + return simplify_shift(insn, insn->src1, value); case OP_MODU: case OP_MODS: if (value == 1) diff --git a/validation/shift-undef.c b/validation/shift-undef.c index df1ac89e..4cd56b81 100644 --- a/validation/shift-undef.c +++ b/validation/shift-undef.c @@ -98,7 +98,11 @@ shift-undef.c:18:30: warning: shift too big (4294967289) for type int shift-undef.c:19:30: warning: shift too big (4294967288) for type unsigned int shift-undef.c:20:30: warning: shift too big (4294967287) for type unsigned int shift-undef.c:21:29: warning: right shift by bigger than source value +shift-undef.c:22:29: warning: right shift by bigger than source value +shift-undef.c:23:29: warning: right shift by bigger than source value shift-undef.c:24:29: warning: right shift by bigger than source value +shift-undef.c:25:29: warning: right shift by bigger than source value +shift-undef.c:26:29: warning: right shift by bigger than source value shift-undef.c:32:11: warning: shift too big (100) for type int shift-undef.c:33:11: warning: shift too big (101) for type unsigned int shift-undef.c:34:11: warning: shift too big (102) for type unsigned int @@ -118,6 +122,10 @@ shift-undef.c:47:30: warning: shift too big (4294967289) for type int shift-undef.c:48:30: warning: shift too big (4294967288) for type unsigned int shift-undef.c:49:30: warning: shift too big (4294967287) for type unsigned int shift-undef.c:50:26: warning: right shift by bigger than source value +shift-undef.c:51:26: warning: right shift by bigger than source value +shift-undef.c:52:26: warning: right shift by bigger than source value shift-undef.c:53:26: warning: right shift by bigger than source value +shift-undef.c:54:26: warning: right shift by bigger than source value +shift-undef.c:55:26: warning: right shift by bigger than source value * check-error-end */ |
