Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/thumb/thumb_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ module Make(CT : Theory.Core) = struct
data@@[dst := CT.ite ~?cnd exp (var dst)]


let branch cnd t f =
data@@[CT.branch (holds cnd) (seq t) (seq f)]
let branch cnd t f = match cnd with
| `AL -> data [seq t]
| _ -> data@@[CT.branch (holds cnd) (seq t) (seq f)]

end
7 changes: 2 additions & 5 deletions plugins/thumb/thumb_mov.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Make(CT : Theory.Core) = struct
let borrow_from_sub ~rn ~rm = bit (rn < rm)

let movi8 rd x = it_set rd (const x) @@ fun v -> [
v := const x;
nf := if Int.(x lsr 7 = 1) then bit1 else bit0;
zf := if Int.(x = 0) then bit1 else bit0;
]
Expand Down Expand Up @@ -58,11 +57,9 @@ module Make(CT : Theory.Core) = struct
vf := overflow_from_add (var r) (var rn) (var rm);
]

let addspi off =
it_set sp (var sp + const off) @@ fun _ -> []
let addspi off = sp <-? var sp + const off

let addrspi rd off =
it_set rd (var sp + const off) @@ fun _ -> []
let addrspi rd off = rd <-? var sp + const off

let cmp x y r = [
nf := msb (var r);
Expand Down