mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-24 10:32:32 +00:00
Do FOLLOW_CONST_JUMPS for bcl 20,BI,TARGET branches too, since that's an
unconditional jump and we don't need the LR in that case. Also fix this: SheepShaver: ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp:1499: powerpc_block_info* powerpc_cpu::compile_block(unsigned int): Assertion `dg.jmp_addr[i] != __null' failed. Aborted aka. StuffIt Expander + pressing the 'Cancel' button.
This commit is contained in:
parent
05bd5f40b4
commit
b0aae35951
@ -449,15 +449,17 @@ powerpc_cpu::compile_block(uint32 entry_point)
|
|||||||
}
|
}
|
||||||
case PPC_I(BC): // Branch Conditional
|
case PPC_I(BC): // Branch Conditional
|
||||||
{
|
{
|
||||||
|
const int bo = BO_field::extract(opcode);
|
||||||
#if FOLLOW_CONST_JUMPS
|
#if FOLLOW_CONST_JUMPS
|
||||||
if (!LK_field::test(opcode)) {
|
if (!BO_CONDITIONAL_BRANCH(bo) && !BO_DECREMENT_CTR(bo)) {
|
||||||
const int bo = BO_field::extract(opcode);
|
if (LK_field::test(opcode)) {
|
||||||
if (!BO_CONDITIONAL_BRANCH(bo) && !BO_DECREMENT_CTR(bo)) {
|
const uint32 npc = dpc + 4;
|
||||||
if (AA_field::test(opcode))
|
dg.gen_store_im_LR(npc);
|
||||||
dpc = 0;
|
|
||||||
op.jmp.target = ((dpc + operand_BD::get(this, opcode)) & -4);
|
|
||||||
goto do_const_jump;
|
|
||||||
}
|
}
|
||||||
|
if (AA_field::test(opcode))
|
||||||
|
dpc = 0;
|
||||||
|
op.jmp.target = ((dpc + operand_BD::get(this, opcode)) & -4);
|
||||||
|
goto do_const_jump;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const uint32 tpc = ((AA_field::test(opcode) ? 0 : dpc) + operand_BD::get(this, opcode)) & -4;
|
const uint32 tpc = ((AA_field::test(opcode) ? 0 : dpc) + operand_BD::get(this, opcode)) & -4;
|
||||||
@ -467,7 +469,9 @@ powerpc_cpu::compile_block(uint32 entry_point)
|
|||||||
if (direct_chaining_possible(bi->pc, tpc)) {
|
if (direct_chaining_possible(bi->pc, tpc)) {
|
||||||
use_direct_block_chaining = true;
|
use_direct_block_chaining = true;
|
||||||
bi->jmp_pc[0] = tpc;
|
bi->jmp_pc[0] = tpc;
|
||||||
bi->jmp_pc[1] = npc;
|
// Make sure it's a conditional branch
|
||||||
|
if (BO_CONDITIONAL_BRANCH(bo) || BO_DECREMENT_CTR(bo))
|
||||||
|
bi->jmp_pc[1] = npc;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
dg.gen_mov_32_A0_im(tpc);
|
dg.gen_mov_32_A0_im(tpc);
|
||||||
|
Loading…
Reference in New Issue
Block a user