Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed minor bugs #733

Merged
merged 2 commits into from
Mar 19, 2018
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
8 changes: 4 additions & 4 deletions plugins/x86/x86_lifter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -886,9 +886,9 @@ module ToIR = struct
(* undefined for SHL and SHR instructions where the count is greater than
or equal to the size (in bits) of the destination operand *)
match st with
| LSHIFT -> Bil.(Cast (LOW, !!bool_t, var old lsr size - count))
| LSHIFT -> Bil.(Cast (LOW, !!bool_t, var old lsr (size - count)))
| RSHIFT | ARSHIFT ->
Bil.(Cast (HIGH, !!bool_t, var old lsl size - count))
Bil.(Cast (HIGH, !!bool_t, var old lsl (size - count)))
| _ -> failwith "impossible"
in
Bil.[
Expand Down Expand Up @@ -917,8 +917,8 @@ module ToIR = struct
let count_mask = Bil.(size - int_exp 1 s') in
let e_count = Bil.(op2e s count land count_mask) in
let new_cf = match st with
| LSHIFT -> Bil.(Cast (LOW, !!bool_t, var was lsr size - e_count))
| RSHIFT -> Bil.(Cast (HIGH, !!bool_t, var was lsl size - e_count))
| LSHIFT -> Bil.(Cast (LOW, !!bool_t, var was lsr (size - e_count)))
| RSHIFT -> Bil.(Cast (HIGH, !!bool_t, var was lsl (size - e_count)))
| _ -> disfailwith "impossible" in
let new_of = Bil.(Cast (HIGH, !!bool_t, (var was lxor e_dst))) in
let unk_of =
Expand Down
2 changes: 1 addition & 1 deletion testsuite
Submodule testsuite updated 1 files
+1 −1 veri.tests/x86.exp