mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-08 15:20:45 +01:00
JitArm64_Integer: addzex - Optimize InHostCarry case for 0
Before: 0x5280000d mov w13, #0x0 ; =0 0x1a1f01ae adc w14, w13, wzr After: 0x1a9f37ee cset w14, hs
This commit is contained in:
parent
c817b4779d
commit
d81bfe94eb
@ -10,7 +10,6 @@
|
|||||||
#include "Common/BitUtils.h"
|
#include "Common/BitUtils.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/MathUtil.h"
|
#include "Common/MathUtil.h"
|
||||||
#include "Common/Unreachable.h"
|
|
||||||
|
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
@ -1129,8 +1128,7 @@ void JitArm64::addzex(UGeckoInstruction inst)
|
|||||||
|
|
||||||
int a = inst.RA, d = inst.RD;
|
int a = inst.RA, d = inst.RD;
|
||||||
|
|
||||||
if (gpr.IsImm(a) &&
|
if (gpr.IsImm(a) && (gpr.GetImm(a) == 0 || HasConstantCarry()))
|
||||||
(HasConstantCarry() || (js.carryFlag == CarryFlag::InPPCState && gpr.GetImm(a) == 0)))
|
|
||||||
{
|
{
|
||||||
const u32 imm = gpr.GetImm(a);
|
const u32 imm = gpr.GetImm(a);
|
||||||
const bool is_all_ones = imm == 0xFFFFFFFF;
|
const bool is_all_ones = imm == 0xFFFFFFFF;
|
||||||
@ -1144,6 +1142,13 @@ void JitArm64::addzex(UGeckoInstruction inst)
|
|||||||
ComputeCarry(false);
|
ComputeCarry(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CarryFlag::InHostCarry:
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(d, false);
|
||||||
|
CSET(gpr.R(d), CCFlags::CC_CS);
|
||||||
|
ComputeCarry(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case CarryFlag::ConstantTrue:
|
case CarryFlag::ConstantTrue:
|
||||||
{
|
{
|
||||||
gpr.SetImmediate(d, imm + 1);
|
gpr.SetImmediate(d, imm + 1);
|
||||||
@ -1156,8 +1161,6 @@ void JitArm64::addzex(UGeckoInstruction inst)
|
|||||||
ComputeCarry(false);
|
ComputeCarry(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
Common::Unreachable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user