-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added disassembler stubs for ARM, MIPS, PPC
- Loading branch information
Showing
8 changed files
with
379 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#include <capstone/capstone.h> | ||
|
||
#include "disasm-arm.h" | ||
#include "log.h" | ||
|
||
|
||
static int | ||
is_cs_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_semantic_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_trap_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_group(uint8_t g) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_ins(cs_insn *ins) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_call_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_ret_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_unconditional_jmp_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_conditional_cflow_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_privileged_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static uint8_t | ||
cs_to_nucleus_op_type(x86_op_type op) | ||
{ | ||
switch(op) { | ||
default: | ||
return Operand::OP_TYPE_NONE; | ||
} | ||
} | ||
|
||
|
||
int | ||
nucleus_disasm_bb_arm(Binary *bin, DisasmSection *dis, BB *bb) | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef NUCLEUS_DISASM_ARM_H | ||
#define NUCLEUS_DISASM_ARM_H | ||
|
||
#include "disasm.h" | ||
|
||
int nucleus_disasm_bb_arm(Binary *bin, DisasmSection *dis, BB *bb); | ||
|
||
#endif /* NUCLEUS_DISASM_ARM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#include <capstone/capstone.h> | ||
|
||
#include "disasm-mips.h" | ||
#include "log.h" | ||
|
||
|
||
static int | ||
is_cs_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_semantic_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_trap_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_group(uint8_t g) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_ins(cs_insn *ins) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_call_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_ret_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_unconditional_jmp_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_conditional_cflow_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_privileged_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static uint8_t | ||
cs_to_nucleus_op_type(x86_op_type op) | ||
{ | ||
switch(op) { | ||
default: | ||
return Operand::OP_TYPE_NONE; | ||
} | ||
} | ||
|
||
|
||
int | ||
nucleus_disasm_bb_mips(Binary *bin, DisasmSection *dis, BB *bb) | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef NUCLEUS_DISASM_MIPS_H | ||
#define NUCLEUS_DISASM_MIPS_H | ||
|
||
#include "disasm.h" | ||
|
||
int nucleus_disasm_bb_mips(Binary *bin, DisasmSection *dis, BB *bb); | ||
|
||
#endif /* NUCLEUS_DISASM_MIPS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#include <capstone/capstone.h> | ||
|
||
#include "disasm-ppc.h" | ||
#include "log.h" | ||
|
||
|
||
static int | ||
is_cs_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_semantic_nop_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_trap_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_group(uint8_t g) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_cflow_ins(cs_insn *ins) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static int | ||
is_cs_call_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_ret_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_unconditional_jmp_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_conditional_cflow_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static int | ||
is_cs_privileged_ins(cs_insn *ins) | ||
{ | ||
switch(ins->id) { | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
|
||
static uint8_t | ||
cs_to_nucleus_op_type(x86_op_type op) | ||
{ | ||
switch(op) { | ||
default: | ||
return Operand::OP_TYPE_NONE; | ||
} | ||
} | ||
|
||
|
||
int | ||
nucleus_disasm_bb_ppc(Binary *bin, DisasmSection *dis, BB *bb) | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef NUCLEUS_DISASM_PPC_H | ||
#define NUCLEUS_DISASM_PPC_H | ||
|
||
#include "disasm.h" | ||
|
||
int nucleus_disasm_bb_ppc(Binary *bin, DisasmSection *dis, BB *bb); | ||
|
||
#endif /* NUCLEUS_DISASM_PPC_H */ |
Oops, something went wrong.