mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-12 23:46:36 +00:00
Switch to Capstone for MIPS (instead of GNU)
This commit is contained in:
parent
068dcfd7a7
commit
293ba25765
@ -134,6 +134,9 @@ static int analop_esil(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len
|
||||
break;
|
||||
case MIPS_INS_FSUB:
|
||||
case MIPS_INS_SUB:
|
||||
case MIPS_INS_SUBU:
|
||||
case MIPS_INS_DSUB:
|
||||
case MIPS_INS_DSUBU:
|
||||
{
|
||||
const char *arg0 = ARG(0);
|
||||
const char *arg1 = ARG(1);
|
||||
@ -294,8 +297,16 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
break;
|
||||
case MIPS_INS_SUB:
|
||||
case MIPS_INS_SUBV:
|
||||
case MIPS_INS_SUBVI:
|
||||
case MIPS_INS_DSUBU:
|
||||
case MIPS_INS_FSUB:
|
||||
case MIPS_INS_FMSUB:
|
||||
case MIPS_INS_SUBU:
|
||||
case MIPS_INS_DSUB:
|
||||
case MIPS_INS_SUBS_S:
|
||||
case MIPS_INS_SUBS_U:
|
||||
case MIPS_INS_SUBUH:
|
||||
case MIPS_INS_SUBUH_R:
|
||||
op->type = R_ANAL_OP_TYPE_SUB;
|
||||
break;
|
||||
case MIPS_INS_MULV:
|
||||
@ -421,7 +432,7 @@ static int set_reg_profile(RAnal *anal) {
|
||||
}
|
||||
|
||||
RAnalPlugin r_anal_plugin_mips_cs = {
|
||||
.name = "mips.cs",
|
||||
.name = "mips",
|
||||
.desc = "Capstone MIPS analyzer",
|
||||
.license = "BSD",
|
||||
.esil = R_TRUE,
|
||||
|
@ -520,7 +520,7 @@ static int mips_set_reg_profile(RAnal* anal){
|
||||
}
|
||||
|
||||
struct r_anal_plugin_t r_anal_plugin_mips_gnu = {
|
||||
.name = "mips",
|
||||
.name = "mips.gnu",
|
||||
.desc = "MIPS code analysis plugin",
|
||||
.license = "LGPL3",
|
||||
.arch = R_SYS_ARCH_MIPS,
|
||||
|
@ -20,8 +20,6 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
mode |= CS_MODE_MIPS32R6;
|
||||
} else if (!strcmp (a->cpu, "v3")) {
|
||||
mode |= CS_MODE_MIPS3;
|
||||
} else {
|
||||
eprintf ("Invalid CPU selected: gp64, micro, r6, v3\n");
|
||||
}
|
||||
}
|
||||
mode |= (a->bits==64)? CS_MODE_64: CS_MODE_32;
|
||||
@ -62,7 +60,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *str) {
|
||||
}
|
||||
|
||||
RAsmPlugin r_asm_plugin_mips_cs = {
|
||||
.name = "mips.cs",
|
||||
.name = "mips",
|
||||
.desc = "Capstone MIPS disassembler",
|
||||
.license = "BSD",
|
||||
.arch = "mips",
|
||||
|
@ -95,7 +95,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *str) {
|
||||
}
|
||||
|
||||
RAsmPlugin r_asm_plugin_mips_gnu = {
|
||||
.name = "mips",
|
||||
.name = "mips.gnu",
|
||||
.arch = "mips",
|
||||
.license = "GPL3",
|
||||
.bits = 32|64,
|
||||
|
Loading…
Reference in New Issue
Block a user