Skip to content

Commit 761fc31

Browse files
committed
Check disp range for memory in x86-64 pattern_match_p.
1 parent 4be9443 commit 761fc31

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mir-gen-x86_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,6 +1861,7 @@ static int pattern_match_p (gen_ctx_t gen_ctx, const struct pattern *pat, MIR_in
18611861
&& op.u.hard_reg_mem.scale != 2 && op.u.hard_reg_mem.scale != 4
18621862
&& op.u.hard_reg_mem.scale != 8)
18631863
return FALSE;
1864+
if (!int32_p (op.u.hard_reg_mem.disp)) return FALSE;
18641865
break;
18651866
}
18661867
case 'l':

0 commit comments

Comments
 (0)