Skip to content

Commit

Permalink
Added disassembler stubs for ARM, MIPS, PPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandro Sanchez Bach authored and AlexAltea committed May 14, 2017
1 parent a891db8 commit a776029
Show file tree
Hide file tree
Showing 8 changed files with 379 additions and 19 deletions.
115 changes: 115 additions & 0 deletions disasm-arm.cc
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;
}
8 changes: 8 additions & 0 deletions disasm-arm.h
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 */
115 changes: 115 additions & 0 deletions disasm-mips.cc
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;
}
8 changes: 8 additions & 0 deletions disasm-mips.h
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 */
115 changes: 115 additions & 0 deletions disasm-ppc.cc
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;
}
8 changes: 8 additions & 0 deletions disasm-ppc.h
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 */
Loading

0 comments on commit a776029

Please sign in to comment.