We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a210546 commit 3b3371fCopy full SHA for 3b3371f
src/expr.ml
@@ -288,6 +288,8 @@ let rec binop ty (op : binop) (hte1 : t) (hte2 : t) : t =
288
binop ty Rem addr hte2
289
| Add, _, Ptr { base; offset } ->
290
ptr base (binop (Ty_bitv 32) Add offset hte1)
291
+ | Sub, _, Ptr { base; offset } ->
292
+ binop ty Sub hte1 (binop (Ty_bitv 32) Add (value (Num (I32 base))) offset)
293
| (Add | Or), Val (Num (I32 0l)), _ -> hte2
294
| (And | Div | DivU | Mul | Rem | RemU), Val (Num (I32 0l)), _ -> hte1
295
| (Add | Or), _, Val (Num (I32 0l)) -> hte1
0 commit comments