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

hushes bil lifters #1450

Merged
merged 1 commit into from
Mar 24, 2022
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
2 changes: 1 addition & 1 deletion plugins/mips/mips.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module Std = struct
insn_name n in
Error (Error.of_string str) in
match String.Table.find lifters (Insn.name insn) with
| None -> Or_error.errorf "unknown instruction %s" insn_name
| None -> Ok []
| Some lifter -> lift lifter

module M32BE = struct
Expand Down
3 changes: 1 addition & 2 deletions plugins/powerpc/powerpc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ module Std = struct

let lift addr_size endian mem insn =
let insn = Insn.of_basic insn in
let insn_name = Insn.name insn in
let cpu = make_cpu addr_size endian mem in
let lift lifter =
try
Expand All @@ -63,7 +62,7 @@ module Std = struct
with
| Failure str -> Error (Error.of_string str) in
match Hashtbl.find lifters (Insn.name insn) with
| None -> Or_error.errorf "unknown instruction %s" insn_name
| None -> Ok []
| Some lifter -> lift lifter

module T32 = struct
Expand Down
5 changes: 1 addition & 4 deletions plugins/x86/x86_backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ module Make (PR : PR) = struct
let lift mem insn =
let lift = search lifts insn in
try match lift mem insn with
| Error err ->
warning "failed to lift %a - %a"
X86_utils.pp_insn (mem,insn) Error.pp err;
Error err
| Error err -> Error err
| Ok bil as ok -> match Type.check bil with
| Ok () -> ok
| Error te ->
Expand Down
6 changes: 2 additions & 4 deletions plugins/x86/x86_targets.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ module AMD64L = X86_lifter.AMD64

module IA32D = struct
module CPU = IA32L.CPU
let lift _mem insn =
Or_error.error "unimplemented" insn Insn.sexp_of_t
let lift _mem _insn = Ok []
end

module AMD64D = struct
module CPU = AMD64L.CPU
let lift _mem insn =
Or_error.error "unimplemented" insn Insn.sexp_of_t
let lift _mem _insn = Ok []
end

module IA32 = X86_backend.IA32.Make(IA32D)
Expand Down