mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
JIT: fix carry optimization on blocks that end early
I don't know if this shows up currently, but e.g. if you force blocks to be under a certain length, this problem (a crash) shows up.
This commit is contained in:
parent
339383b8dd
commit
354e255827
@ -57,7 +57,7 @@ void Jit64::FinalizeCarry(CCFlags cond)
|
|||||||
if (js.op->wantsCA)
|
if (js.op->wantsCA)
|
||||||
{
|
{
|
||||||
// Be careful: a breakpoint kills flags in between instructions
|
// Be careful: a breakpoint kills flags in between instructions
|
||||||
if (js.next_op->wantsCAInFlags && !js.next_inst_bp)
|
if (!js.isLastInstruction && js.next_op->wantsCAInFlags && !js.next_inst_bp)
|
||||||
{
|
{
|
||||||
if (cond == CC_C || cond == CC_NC)
|
if (cond == CC_C || cond == CC_NC)
|
||||||
{
|
{
|
||||||
@ -86,7 +86,7 @@ void Jit64::FinalizeCarry(bool ca)
|
|||||||
js.carryFlagInverted = false;
|
js.carryFlagInverted = false;
|
||||||
if (js.op->wantsCA)
|
if (js.op->wantsCA)
|
||||||
{
|
{
|
||||||
if (js.next_op->wantsCAInFlags)
|
if (!js.isLastInstruction && js.next_op->wantsCAInFlags && !js.next_inst_bp)
|
||||||
{
|
{
|
||||||
if (ca)
|
if (ca)
|
||||||
STC();
|
STC();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user