TMS320: move c55x+ to C55X_PLUS namespace

This commit is contained in:
Ilya V. Matveychikov 2014-02-06 12:50:25 +04:00
parent cef957b20d
commit 41eb3808c1
21 changed files with 25 additions and 25 deletions

View File

@ -14,7 +14,7 @@ typedef int (* anal_op_t)(RAnal *, RAnalOp *, ut64, ut8 *, int);
int tms320_c54x_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c55x_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c55plus_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c55x_plus_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c54x_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len)
{
@ -37,7 +37,7 @@ int tms320_op(RAnal * anal, RAnalOp * op, ut64 addr, const ut8 * buf, int len)
if (anal->cpu && strcasecmp(anal->cpu, "c55x") == 0)
aop = tms320_c55x_op;
if (anal->cpu && strcasecmp(anal->cpu, "c55x+") == 0)
aop = tms320_c55plus_op;
aop = tms320_c55x_plus_op;
return aop(anal, op, addr, buf, len);
}

View File

@ -8,7 +8,7 @@
ut32 get_ins_len(ut8 opcode);
int tms320_c55plus_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
int tms320_c55x_plus_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
ut16 *ins = (ut16*)buf;
ut32 ins_len;

View File

@ -1,17 +1,17 @@
OBJ_TMS320=anal_tms320.o
OBJ_TMS320+=anal_tms320_c55plus.o
OBJ_TMS320+=anal_tms320_c55x_plus.o
STATIC_OBJ+=${OBJ_TMS320}
#OBJ_TMS320+=../../../../../../../../../../../${LTOP}/asm/arch/tms320/tms320_dasm.o
ROOT=../../../../../../../../../../../../../../../../../../../../../
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/tms320_dasm.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/ins.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/c55plus.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/decode.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/decode_funcs.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/utils.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/hashtable.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55plus/hashvector.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/ins.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/c55plus.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/decode.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/decode_funcs.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/utils.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/hashtable.o
OBJ_TMS320+=$(ROOT)/${LTOP}/asm/arch/tms320/c55x_plus/hashvector.o
TARGET_TMS320=anal_tms320.${EXT_SO}
ALL_TARGETS+=${TARGET_TMS320}

View File

@ -17,7 +17,7 @@
extern ut8 *ins_buff;
extern ut32 ins_buff_len;
int c55plus_disassemble(tms320_dasm_t *dasm, const ut8 *buf, int len) {
int c55x_plus_disassemble(tms320_dasm_t *dasm, const ut8 *buf, int len) {
unsigned int next_ins_pos;
char *ins_decoded;
size_t i, ins_decoded_len;

View File

@ -10,6 +10,6 @@
#include "../tms320_p.h"
#include "../tms320_dasm.h"
extern int c55plus_disassemble(tms320_dasm_t *dasm, const ut8 *buf, int len);
extern int c55x_plus_disassemble(tms320_dasm_t *dasm, const ut8 *buf, int len);
#endif

View File

@ -20,7 +20,7 @@
#include "tms320_p.h"
#include "tms320_dasm.h"
#include "c55plus/c55plus.h"
#include "c55x_plus/c55plus.h"
/*
* TMS320 disassembly engine implementation
@ -1003,13 +1003,13 @@ int tms320_dasm(tms320_dasm_t * dasm, const ut8 * stream, int len)
{
init_dasm(dasm, stream, len);
if (tms320_f_get_cpu(dasm) != TMS320_F_CPU_C55PLUS) {
if (tms320_f_get_cpu(dasm) != TMS320_F_CPU_C55X_PLUS) {
if (lookup_insn_head(dasm) && decode_insn_head(dasm)) {
if (dasm->length > len)
dasm->status |= TMS320_S_INVAL;
}
} else {
c55plus_disassemble(dasm, stream, len);
c55x_plus_disassemble(dasm, stream, len);
}
return dasm->status & TMS320_S_INVAL ? 0 : dasm->length;

View File

@ -204,7 +204,7 @@ typedef struct {
#define TMS320_F_CPU_C54X 0x0000001
#define TMS320_F_CPU_C55X 0x0000002
#define TMS320_F_CPU_C55PLUS 0x0000003
#define TMS320_F_CPU_C55X_PLUS 0x0000003
#define TMS320_F_CPU_MASK 0x00000FF
ut32 features;
#define tms320_f_get_cpu(d) ((d)->features & TMS320_F_CPU_MASK)

View File

@ -23,7 +23,7 @@ static int tms320_disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len)
if (a->cpu && strcasecmp(a->cpu, "c55x") == 0)
tms320_f_set_cpu(&engine, TMS320_F_CPU_C55X);
if (a->cpu && strcasecmp(a->cpu, "c55x+") == 0)
tms320_f_set_cpu(&engine, TMS320_F_CPU_C55PLUS);
tms320_f_set_cpu(&engine, TMS320_F_CPU_C55X_PLUS);
op->size = tms320_dasm(&engine, buf, len);
snprintf(op->buf_asm, R_ASM_BUFSIZE, "%s", op->size ? engine.syntax : "invalid");

View File

@ -3,13 +3,13 @@ OBJ_TMS320+=../arch/tms320/tms320_dasm.o
# looks ugly as radare2 build system is terrible
OBJ_TMS320+=../arch/tms320/c55plus/c55plus.o \
../arch/tms320/c55plus/decode.o \
../arch/tms320/c55plus/decode_funcs.o \
../arch/tms320/c55plus/hashtable.o \
../arch/tms320/c55plus/hashvector.o \
../arch/tms320/c55plus/ins.o \
../arch/tms320/c55plus/utils.o
OBJ_TMS320+=../arch/tms320/c55x_plus/c55plus.o \
../arch/tms320/c55x_plus/decode.o \
../arch/tms320/c55x_plus/decode_funcs.o \
../arch/tms320/c55x_plus/hashtable.o \
../arch/tms320/c55x_plus/hashvector.o \
../arch/tms320/c55x_plus/ins.o \
../arch/tms320/c55x_plus/utils.o
STATIC_OBJ+=${OBJ_TMS320}
TARGET_TMS320=asm_tms320.${EXT_SO}