File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ let exec
54
54
| Some f , Some (`Reg `CPSR) -> stmts @ f
55
55
| _ -> stmts in
56
56
(* generates an expression for the given McCond *)
57
- let set_cond mccond =
57
+ let set_cond cond =
58
58
let z = Bil. var Env. zf in
59
59
let c = Bil. var Env. cf in
60
60
let v = Bil. var Env. vf in
@@ -81,8 +81,9 @@ let exec
81
81
match cond with
82
82
| `AL -> stmts
83
83
| _ when List. for_all stmts ~f: is_move ->
84
- let cond = set_cond cond in
85
- List. map stmts ~f: (function
84
+ let cval = set_cond cond and cvar = tmp bool_t in
85
+ let cond = Bil. var cvar in
86
+ Bil. (cvar := cval) :: List. map stmts ~f: (function
86
87
| Bil. Move (v ,_ ) as s when Var. is_virtual v -> s
87
88
| Bil. Move (v ,x ) ->
88
89
Bil. (v := ite ~if_: cond ~then_: x ~else_: (var v))
You can’t perform that action at this time.
0 commit comments