mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 04:17:25 +00:00
init delay slot to 0 where not done or delay not implemented
This commit is contained in:
parent
fe7150665c
commit
2ce69adad8
@ -13,6 +13,7 @@
|
||||
static int i8051_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
char *tmp = NULL;
|
||||
char buf_asm[64];
|
||||
op->delay = 0;
|
||||
r_8051_op o = r_8051_decode (buf, len);
|
||||
memset(buf_asm, 0, sizeof (buf_asm));
|
||||
if (!o.name) return 0; // invalid instruction
|
||||
|
@ -16,6 +16,7 @@ static int arcompact_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, in
|
||||
lowbyte = anal->big_endian? 0: 1;
|
||||
highbyte = anal->big_endian? 1: 0;
|
||||
|
||||
op->delay = 0;
|
||||
if (((b[lowbyte]&0xf8) >0x38) && ((b[lowbyte]&0xf8) != 0x48)) {
|
||||
op->size = 2;
|
||||
} else {
|
||||
|
@ -41,6 +41,7 @@ static int op_thumb(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
arm_set_thumb(arminsn, R_TRUE);
|
||||
arm_set_input_buffer(arminsn, data);
|
||||
arm_set_pc(arminsn, addr);
|
||||
op->delay = 0;
|
||||
op->size = arm_disasm_one_insn(arminsn);
|
||||
op->jump = arminsn->jmp;
|
||||
op->fail = arminsn->fail;
|
||||
|
@ -15,6 +15,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
cs_option (handle, CS_OPT_DETAIL, CS_OPT_ON);
|
||||
op->type = R_ANAL_OP_TYPE_NULL;
|
||||
op->size = 0;
|
||||
op->delay = 0;
|
||||
if (ret == CS_ERR_OK) {
|
||||
n = cs_disasm_ex (handle, (ut8*)buf, len, addr, 1, &insn);
|
||||
if (n<1) {
|
||||
|
@ -15,6 +15,7 @@ static int avr_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len)
|
||||
if (op == NULL)
|
||||
return 2;
|
||||
op->size = 2;
|
||||
op->delay = 0;
|
||||
if (*ins == 0) {
|
||||
op->type = R_ANAL_OP_TYPE_NOP;
|
||||
} else
|
||||
|
@ -14,6 +14,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
mode |= (a->bits==64)? CS_MODE_64: CS_MODE_32;
|
||||
// XXX no arch->cpu ?!?! CS_MODE_MICRO, N64
|
||||
ret = cs_open (CS_ARCH_MIPS, mode, &handle);
|
||||
op->delay = 0;
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
op->size = 4;
|
||||
if (ret != CS_ERR_OK) goto fin;
|
||||
|
@ -11,6 +11,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
int mode = (a->bits==64)? CS_MODE_64:
|
||||
(a->bits==32)? CS_MODE_32: 0;
|
||||
int n, ret = cs_open (CS_ARCH_PPC, mode, &handle);
|
||||
op->delay = 0;
|
||||
op->type = R_ANAL_OP_TYPE_NULL;
|
||||
op->size = 0;
|
||||
if (ret == CS_ERR_OK) {
|
||||
|
@ -33,6 +33,7 @@ int tms320_c55x_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len)
|
||||
{
|
||||
const char * str = engine.syntax;
|
||||
|
||||
op->delay = 0;
|
||||
op->size = tms320_dasm(&engine, buf, len);
|
||||
op->type = R_ANAL_OP_TYPE_NULL;
|
||||
|
||||
|
@ -24,6 +24,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
int n, ret = cs_open (CS_ARCH_X86, mode, &handle);
|
||||
op->type = R_ANAL_OP_TYPE_NULL;
|
||||
op->size = 0;
|
||||
op->delay = 0;
|
||||
r_strbuf_init (&op->esil);
|
||||
if (ret == CS_ERR_OK) {
|
||||
cs_option (handle, CS_OPT_DETAIL, CS_OPT_ON);
|
||||
|
Loading…
x
Reference in New Issue
Block a user