mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 17:29:19 +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,16 +449,18 @@ powerpc_cpu::compile_block(uint32 entry_point)
|
||||
}
|
||||
case PPC_I(BC): // Branch Conditional
|
||||
{
|
||||
#if FOLLOW_CONST_JUMPS
|
||||
if (!LK_field::test(opcode)) {
|
||||
const int bo = BO_field::extract(opcode);
|
||||
#if FOLLOW_CONST_JUMPS
|
||||
if (!BO_CONDITIONAL_BRANCH(bo) && !BO_DECREMENT_CTR(bo)) {
|
||||
if (LK_field::test(opcode)) {
|
||||
const uint32 npc = dpc + 4;
|
||||
dg.gen_store_im_LR(npc);
|
||||
}
|
||||
if (AA_field::test(opcode))
|
||||
dpc = 0;
|
||||
op.jmp.target = ((dpc + operand_BD::get(this, opcode)) & -4);
|
||||
goto do_const_jump;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
const uint32 tpc = ((AA_field::test(opcode) ? 0 : dpc) + operand_BD::get(this, opcode)) & -4;
|
||||
#if DYNGEN_DIRECT_BLOCK_CHAINING
|
||||
@ -467,6 +469,8 @@ powerpc_cpu::compile_block(uint32 entry_point)
|
||||
if (direct_chaining_possible(bi->pc, tpc)) {
|
||||
use_direct_block_chaining = true;
|
||||
bi->jmp_pc[0] = tpc;
|
||||
// Make sure it's a conditional branch
|
||||
if (BO_CONDITIONAL_BRANCH(bo) || BO_DECREMENT_CTR(bo))
|
||||
bi->jmp_pc[1] = npc;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user