Revision 5fafdf24 target-sparc/translate.c
b/target-sparc/translate.c | ||
---|---|---|
580 | 580 |
#endif |
581 | 581 |
} |
582 | 582 |
|
583 |
static inline void gen_goto_tb(DisasContext *s, int tb_num,
|
|
583 |
static inline void gen_goto_tb(DisasContext *s, int tb_num, |
|
584 | 584 |
target_ulong pc, target_ulong npc) |
585 | 585 |
{ |
586 | 586 |
TranslationBlock *tb; |
... | ... | |
849 | 849 |
{ |
850 | 850 |
unsigned int cond = GET_FIELD(insn, 3, 6), a = (insn & (1 << 29)); |
851 | 851 |
target_ulong target = dc->pc + offset; |
852 |
|
|
852 |
|
|
853 | 853 |
if (cond == 0x0) { |
854 | 854 |
/* unconditional not taken */ |
855 | 855 |
if (a) { |
856 |
dc->pc = dc->npc + 4;
|
|
856 |
dc->pc = dc->npc + 4; |
|
857 | 857 |
dc->npc = dc->pc + 4; |
858 | 858 |
} else { |
859 | 859 |
dc->pc = dc->npc; |
... | ... | |
1019 | 1019 |
} |
1020 | 1020 |
case 0x3: /* V9 BPr */ |
1021 | 1021 |
{ |
1022 |
target = GET_FIELD_SP(insn, 0, 13) |
|
|
1022 |
target = GET_FIELD_SP(insn, 0, 13) | |
|
1023 | 1023 |
(GET_FIELD_SP(insn, 20, 21) << 14); |
1024 | 1024 |
target = sign_extend(target, 16); |
1025 | 1025 |
target <<= 2; |
... | ... | |
3347 | 3347 |
|
3348 | 3348 |
exit_gen_loop: |
3349 | 3349 |
if (!dc->is_br) { |
3350 |
if (dc->pc != DYNAMIC_PC &&
|
|
3350 |
if (dc->pc != DYNAMIC_PC && |
|
3351 | 3351 |
(dc->npc != DYNAMIC_PC && dc->npc != JUMP_PC)) { |
3352 | 3352 |
/* static PC and NPC: we can use direct chaining */ |
3353 | 3353 |
gen_branch(dc, dc->pc, dc->npc); |
... | ... | |
3530 | 3530 |
|
3531 | 3531 |
#define GET_FLAG(a,b) ((env->psr & a)?b:'-') |
3532 | 3532 |
|
3533 |
void cpu_dump_state(CPUState *env, FILE *f,
|
|
3533 |
void cpu_dump_state(CPUState *env, FILE *f, |
|
3534 | 3534 |
int (*cpu_fprintf)(FILE *f, const char *fmt, ...), |
3535 | 3535 |
int flags) |
3536 | 3536 |
{ |
... | ... | |
3574 | 3574 |
cpu_fprintf(f, "psr: 0x%08x -> %c%c%c%c %c%c%c wim: 0x%08x\n", GET_PSR(env), |
3575 | 3575 |
GET_FLAG(PSR_ZERO, 'Z'), GET_FLAG(PSR_OVF, 'V'), |
3576 | 3576 |
GET_FLAG(PSR_NEG, 'N'), GET_FLAG(PSR_CARRY, 'C'), |
3577 |
env->psrs?'S':'-', env->psrps?'P':'-',
|
|
3577 |
env->psrs?'S':'-', env->psrps?'P':'-', |
|
3578 | 3578 |
env->psret?'E':'-', env->wim); |
3579 | 3579 |
#endif |
3580 | 3580 |
cpu_fprintf(f, "fsr: 0x%08x\n", GET_FSR32(env)); |
Also available in: Unified diff