11 #define N_AMD29K_INSTRUCTIONS 207
13 #define AMD29K_GET_TYPE(x, i) ((x)->type[(i)])
14 #define AMD29K_GET_VALUE(x, i) ((x)->operands[(i)])
15 #define AMD29K_SET_VALUE(x, i, v, t) \
16 ((x)->operands[(i)] = (v)); \
17 ((x)->type[(i)] = (t))
18 #define AMD29K_SET_INVALID(x, i) ((x)->type[(i)] = AMD29K_TYPE_UNK)
19 #define AMD29K_HAS_BIT(x) (((x)[0] & 1))
21 #define AMD29K_IS_REG_GR(x) ((x) >= 0 && (x) < 128)
23 #define AMD29K_IS_REG_LR(x) ((x) >= 128 && (x) < 256)
24 #define AMD29K_REGNAME(x) (AMD29K_IS_REG_GR(x) ? "gr" : "lr")
25 #define AMD29K_LR(x) (AMD29K_IS_REG_GR(x) ? (x) : (x)-127)
62 word = (
int)(0xfffc0000 | word);
79 word = (
int)(0xfffc0000 | word);
428 return cpu[0] ==
in->cpu[0] &&
429 cpu[1] ==
in->cpu[1] &&
430 cpu[2] ==
in->cpu[2] &&
431 cpu[3] ==
in->cpu[3] &&
432 cpu[4] ==
in->cpu[4];
451 if (
in->cpu[0] ==
'*' &&
in->mask ==
buffer[0]) {
466 #define AMD29K_IS_6(a, b, c, d, e, f) (t0 == (a) && t1 == (b) && t2 == (c) && t3 == (d) && t4 == (e) && t5 == (f))
467 #define AMD29K_IS_1(a) AMD29K_IS_6(a, (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK))
468 #define AMD29K_IS_2(a, b) AMD29K_IS_6(a, b, (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK))
469 #define AMD29K_IS_3(a, b, c) AMD29K_IS_6(a, b, c, (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK))
470 #define AMD29K_IS_4(a, b, c, d) AMD29K_IS_6(a, b, c, d, (AMD29K_TYPE_UNK), (AMD29K_TYPE_UNK))
471 #define AMD29K_IS_5(a, b, c, d, e) AMD29K_IS_6(a, b, c, d, e, (AMD29K_TYPE_UNK))
494 return address + ((
int)
v0);
496 return address + ((
int)
v1);
578 snprintf(
string, string_size,
"%s %s%d %s%d %d %d %d %d",
instruction->mnemonic, p0,
AMD29K_LR(
v0), p1,
AMD29K_LR(
v1), v2, v3, v4, v5);
#define AMD29K_SET_VALUE(x, i, v, t)
#define AMD29K_IS_2(a, b)
#define AMD29K_HAS_BIT(x)
#define AMD29K_IS_4(a, b, c, d)
static void decode_rc_ra(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_load_store(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_ra_i16_sh2(amd29k_instr_t *instruction, const ut8 *buffer)
#define AMD29K_GET_VALUE(x, i)
static void decode_none(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_mfsr(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_mtsr(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_ra_rb(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_imm16_sh2(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_calli(amd29k_instr_t *instruction, const ut8 *buffer)
#define AMD29K_SET_INVALID(x, i)
static void decode_clz(amd29k_instr_t *instruction, const ut8 *buffer)
const amd29k_instruction_t amd29k_instructions[N_AMD29K_INSTRUCTIONS]
#define AMD29K_IS_3(a, b, c)
static void decode_rc_ra_imm(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_rc_imm(amd29k_instr_t *instruction, const ut8 *buffer)
#define N_AMD29K_INSTRUCTIONS
static void decode_ra_rb_rc(amd29k_instr_t *instruction, const ut8 *buffer)
bool amd29k_instr_decode(const ut8 *buffer, const ut32 buffer_size, amd29k_instr_t *instruction, const char *cpu)
static void decode_ra_imm(amd29k_instr_t *instruction, const ut8 *buffer)
bool amd29k_instr_is_ret(amd29k_instr_t *instruction)
ut64 amd29k_instr_jump(ut64 address, amd29k_instr_t *instruction)
static bool is_cpu(const char *cpu, const amd29k_instruction_t *in)
#define AMD29K_GET_TYPE(x, i)
static void decode_ra_imm16(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_convert(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_rb(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_ra_rb_rci(amd29k_instr_t *instruction, const ut8 *buffer)
static void decode_dmac_fmac(amd29k_instr_t *instruction, const ut8 *buffer)
#define AMD29K_REGNAME(x)
void amd29k_instr_print(char *string, int string_size, ut64 address, amd29k_instr_t *instruction)
#define AMD29K_IS_6(a, b, c, d, e, f)
const lzma_allocator const uint8_t * in
@ RZ_ANALYSIS_OP_TYPE_CMP
@ RZ_ANALYSIS_OP_TYPE_SUB
@ RZ_ANALYSIS_OP_TYPE_ICALL
@ RZ_ANALYSIS_OP_TYPE_LOAD
@ RZ_ANALYSIS_OP_TYPE_MUL
@ RZ_ANALYSIS_OP_TYPE_JMP
@ RZ_ANALYSIS_OP_TYPE_AND
@ RZ_ANALYSIS_OP_TYPE_SAL
@ RZ_ANALYSIS_OP_TYPE_NOR
@ RZ_ANALYSIS_OP_TYPE_NULL
@ RZ_ANALYSIS_OP_TYPE_CALL
@ RZ_ANALYSIS_OP_TYPE_ADD
@ RZ_ANALYSIS_OP_TYPE_STORE
@ RZ_ANALYSIS_OP_TYPE_RCJMP
@ RZ_ANALYSIS_OP_TYPE_SHR
@ RZ_ANALYSIS_OP_TYPE_RJMP
@ RZ_ANALYSIS_OP_TYPE_CJMP
@ RZ_ANALYSIS_OP_TYPE_DIV
@ RZ_ANALYSIS_OP_TYPE_MOV
@ RZ_ANALYSIS_OP_TYPE_SHL
@ RZ_ANALYSIS_OP_TYPE_RET
@ RZ_ANALYSIS_OP_TYPE_NOP
@ RZ_ANALYSIS_OP_TYPE_XOR
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
#define buffer_size(buffer)