291 |
|
|
292 |
#if defined(CONFIG_USER_ONLY) |
#if defined(CONFIG_USER_ONLY) |
293 |
#define gen_op_ldst(name) gen_op_##name##_raw() |
#define gen_op_ldst(name) gen_op_##name##_raw() |
294 |
#define OP_LD_TABLE(width) \ |
#define OP_LD_TABLE(width) |
|
static void gen_op_##width##a(int insn, int is_ld, int size, int sign) \ |
|
|
{ \ |
|
|
} |
|
295 |
#define supervisor(dc) 0 |
#define supervisor(dc) 0 |
296 |
#else |
#else |
297 |
#define gen_op_ldst(name) (*gen_op_##name[dc->mem_idx])() |
#define gen_op_ldst(name) (*gen_op_##name[dc->mem_idx])() |
611 |
} |
} |
612 |
} |
} |
613 |
|
|
614 |
|
#if 0 |
615 |
static void gen_debug(DisasContext *s, uint32_t pc) |
static void gen_debug(DisasContext *s, uint32_t pc) |
616 |
{ |
{ |
617 |
gen_op_jmp_im(pc); |
gen_op_jmp_im(pc); |
618 |
gen_op_debug(); |
gen_op_debug(); |
619 |
s->is_br = 1; |
s->is_br = 1; |
620 |
} |
} |
621 |
|
#endif |
622 |
|
|
623 |
#define GET_FIELDs(x,a,b) sign_extend (GET_FIELD(x,a,b), (b) - (a) + 1) |
#define GET_FIELDs(x,a,b) sign_extend (GET_FIELD(x,a,b), (b) - (a) + 1) |
624 |
|
|
632 |
{ |
{ |
633 |
unsigned int insn, opc, rs1, rs2, rd; |
unsigned int insn, opc, rs1, rs2, rd; |
634 |
|
|
635 |
insn = ldl_code((uint8_t *)dc->pc); |
insn = ldl_code(dc->pc); |
636 |
opc = GET_FIELD(insn, 0, 1); |
opc = GET_FIELD(insn, 0, 1); |
637 |
|
|
638 |
rd = GET_FIELD(insn, 2, 6); |
rd = GET_FIELD(insn, 2, 6); |
1289 |
gen_movl_reg_T1(rd); |
gen_movl_reg_T1(rd); |
1290 |
gen_op_swapa(insn, 1, 4, 0); |
gen_op_swapa(insn, 1, 4, 0); |
1291 |
break; |
break; |
1292 |
|
|
1293 |
|
/* avoid warnings */ |
1294 |
|
(void) &gen_op_stfa; |
1295 |
|
(void) &gen_op_stdfa; |
1296 |
|
(void) &gen_op_ldfa; |
1297 |
|
(void) &gen_op_lddfa; |
1298 |
#endif |
#endif |
1299 |
default: |
default: |
1300 |
goto illegal_insn; |
goto illegal_insn; |
1525 |
#ifdef DEBUG_DISAS |
#ifdef DEBUG_DISAS |
1526 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
1527 |
fprintf(logfile, "--------------\n"); |
fprintf(logfile, "--------------\n"); |
1528 |
fprintf(logfile, "IN: %s\n", lookup_symbol((uint8_t *)pc_start)); |
fprintf(logfile, "IN: %s\n", lookup_symbol(pc_start)); |
1529 |
disas(logfile, (uint8_t *)pc_start, last_pc + 4 - pc_start, 0, 0); |
target_disas(logfile, pc_start, last_pc + 4 - pc_start, 0); |
1530 |
fprintf(logfile, "\n"); |
fprintf(logfile, "\n"); |
1531 |
if (loglevel & CPU_LOG_TB_OP) { |
if (loglevel & CPU_LOG_TB_OP) { |
1532 |
fprintf(logfile, "OP:\n"); |
fprintf(logfile, "OP:\n"); |
1631 |
} |
} |
1632 |
|
|
1633 |
#else |
#else |
1634 |
|
extern int get_physical_address (CPUState *env, uint32_t *physical, int *prot, |
1635 |
|
int *access_index, uint32_t address, int rw, |
1636 |
|
int is_user); |
1637 |
|
|
1638 |
target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr) |
target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr) |
1639 |
{ |
{ |
1640 |
uint32_t phys_addr; |
uint32_t phys_addr; |