arm64: Cleanup branch code a tiny bit.

Want to make it clear that we can't kill W0 at this point (delay slots.)
This commit is contained in:
Unknown W. Brackets 2015-06-28 09:19:06 -07:00
parent 0978aa4d5e
commit 213ad4bcc9
3 changed files with 5 additions and 7 deletions

View file

@ -604,7 +604,6 @@ void ArmJit::Comp_Syscall(MIPSOpcode op)
RestoreRoundingMode();
js.downcountAmount = -offset;
// TODO: Maybe discard v0, v1, and some temps? Definitely at?
FlushAll();
SaveDowncount();

View file

@ -227,6 +227,7 @@ void Arm64Jit::BranchRSZeroComp(MIPSOpcode op, CCFlags cc, bool andLink, bool li
if (!likely && delaySlotIsNice)
CompileDelaySlot(DELAYSLOT_NICE);
// TODO: Maybe we could use BZ here?
gpr.MapReg(rs);
CMP(gpr.R(rs), 0);
@ -319,8 +320,9 @@ void Arm64Jit::BranchFPFlag(MIPSOpcode op, CCFlags cc, bool likely) {
if (!likely && delaySlotIsNice)
CompileDelaySlot(DELAYSLOT_NICE);
// TODO: Maybe we could use TBZ here?
gpr.MapReg(MIPS_REG_FPCOND);
TSTI2R(gpr.R(MIPS_REG_FPCOND), 1, W0);
TSTI2R(gpr.R(MIPS_REG_FPCOND), 1, SCRATCH1);
Arm64Gen::FixupBranch ptr;
if (!likely) {
if (!delaySlotIsNice)
@ -379,8 +381,9 @@ void Arm64Jit::BranchVFPUFlag(MIPSOpcode op, CCFlags cc, bool likely) {
int imm3 = (op >> 18) & 7;
// TODO: Maybe could use TBZ?
gpr.MapReg(MIPS_REG_VFPUCC);
TSTI2R(gpr.R(MIPS_REG_VFPUCC), 1 << imm3, W0);
TSTI2R(gpr.R(MIPS_REG_VFPUCC), 1 << imm3, SCRATCH1);
Arm64Gen::FixupBranch ptr;
js.inDelaySlot = true;
@ -584,7 +587,6 @@ void Arm64Jit::Comp_Syscall(MIPSOpcode op)
RestoreRoundingMode();
js.downcountAmount = -offset;
// TODO: Maybe discard v0, v1, and some temps? Definitely at?
FlushAll();
SaveDowncount();

View file

@ -362,7 +362,6 @@ bool Arm64Jit::ReplaceJalTo(u32 dest) {
if (!CanReplaceJalTo(dest, &entry, &funcSize)) {
return false;
}
INFO_LOG(HLE, "ReplaceJalTo to %s", entry->name);
// Warning - this might be bad if the code at the destination changes...
if (entry->flags & REPFLAG_ALLOWINLINE) {
@ -410,7 +409,6 @@ void Arm64Jit::Comp_ReplacementFunc(MIPSOpcode op)
if (entry->flags & REPFLAG_DISABLED) {
MIPSCompileOp(Memory::Read_Instruction(GetCompilerPC(), true));
} else if (entry->jitReplaceFunc) {
INFO_LOG(HLE, "JitReplaceFunc to %s", entry->name);
MIPSReplaceFunc repl = entry->jitReplaceFunc;
int cycles = (this->*repl)();
@ -426,7 +424,6 @@ void Arm64Jit::Comp_ReplacementFunc(MIPSOpcode op)
js.compiling = false;
}
} else if (entry->replaceFunc) {
INFO_LOG(HLE, "ReplaceFunc to %s", entry->name);
FlushAll();
RestoreRoundingMode();
gpr.SetRegImm(SCRATCH1, GetCompilerPC());