mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Rename ARMABI_MOVI2R to MOVI2R
This commit is contained in:
parent
3e31a3a5d3
commit
d8f4e27926
10 changed files with 35 additions and 35 deletions
|
@ -78,7 +78,7 @@ bool TryMakeOperand2_AllowNegation(s32 imm, Operand2 &op2, bool *negated)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMXEmitter::ARMABI_MOVI2R(ARMReg reg, u32 val)
|
void ARMXEmitter::MOVI2R(ARMReg reg, u32 val)
|
||||||
{
|
{
|
||||||
Operand2 op2;
|
Operand2 op2;
|
||||||
bool inverse;
|
bool inverse;
|
||||||
|
@ -117,7 +117,7 @@ void ARMXEmitter::ARMABI_MOVI2R(ARMReg reg, u32 val)
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMXEmitter::QuickCallFunction(ARMReg reg, void *func) {
|
void ARMXEmitter::QuickCallFunction(ARMReg reg, void *func) {
|
||||||
ARMABI_MOVI2R(reg, (u32)(func));
|
MOVI2R(reg, (u32)(func));
|
||||||
BL(reg);
|
BL(reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -484,7 +484,7 @@ public:
|
||||||
|
|
||||||
void QuickCallFunction(ARMReg scratchreg, void *func);
|
void QuickCallFunction(ARMReg scratchreg, void *func);
|
||||||
// Utility functions
|
// Utility functions
|
||||||
void ARMABI_MOVI2R(ARMReg reg, u32 val);
|
void MOVI2R(ARMReg reg, u32 val);
|
||||||
void ARMABI_ShowConditions();
|
void ARMABI_ShowConditions();
|
||||||
void ARMABI_Return();
|
void ARMABI_Return();
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ void Jit::GenerateFixedCode()
|
||||||
// * downcount
|
// * downcount
|
||||||
// * R2-R4
|
// * R2-R4
|
||||||
// Really starting to run low on registers already though...
|
// Really starting to run low on registers already though...
|
||||||
ARMABI_MOVI2R(R11, (u32)Memory::base);
|
MOVI2R(R11, (u32)Memory::base);
|
||||||
ARMABI_MOVI2R(R10, (u32)mips_);
|
MOVI2R(R10, (u32)mips_);
|
||||||
ARMABI_MOVI2R(R9, (u32)GetBlockCache()->GetCodePointers());
|
MOVI2R(R9, (u32)GetBlockCache()->GetCodePointers());
|
||||||
|
|
||||||
outerLoop = GetCodePtr();
|
outerLoop = GetCodePtr();
|
||||||
QuickCallFunction(R0, (void *)&CoreTiming::Advance);
|
QuickCallFunction(R0, (void *)&CoreTiming::Advance);
|
||||||
|
@ -127,7 +127,7 @@ void Jit::GenerateFixedCode()
|
||||||
// IMPORTANT - We jump on negative, not carry!!!
|
// IMPORTANT - We jump on negative, not carry!!!
|
||||||
FixupBranch bailCoreState = B_CC(CC_MI);
|
FixupBranch bailCoreState = B_CC(CC_MI);
|
||||||
|
|
||||||
ARMABI_MOVI2R(R0, (u32)&coreState);
|
MOVI2R(R0, (u32)&coreState);
|
||||||
LDR(R0, R0);
|
LDR(R0, R0);
|
||||||
CMP(R0, 0);
|
CMP(R0, 0);
|
||||||
FixupBranch badCoreState = B_CC(CC_NEQ);
|
FixupBranch badCoreState = B_CC(CC_NEQ);
|
||||||
|
@ -172,7 +172,7 @@ void Jit::GenerateFixedCode()
|
||||||
SetJumpTarget(bail);
|
SetJumpTarget(bail);
|
||||||
SetJumpTarget(bailCoreState);
|
SetJumpTarget(bailCoreState);
|
||||||
|
|
||||||
ARMABI_MOVI2R(R0, (u32)&coreState);
|
MOVI2R(R0, (u32)&coreState);
|
||||||
LDR(R0, R0);
|
LDR(R0, R0);
|
||||||
CMP(R0, 0);
|
CMP(R0, 0);
|
||||||
B_CC(CC_EQ, outerLoop);
|
B_CC(CC_EQ, outerLoop);
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace MIPSComp
|
||||||
if (TryMakeOperand2(uimm, op2)) {
|
if (TryMakeOperand2(uimm, op2)) {
|
||||||
(this->*arith)(gpr.R(rt), gpr.R(rs), op2);
|
(this->*arith)(gpr.R(rt), gpr.R(rs), op2);
|
||||||
} else {
|
} else {
|
||||||
ARMABI_MOVI2R(R0, (u32)uimm);
|
MOVI2R(R0, (u32)uimm);
|
||||||
(this->*arith)(gpr.R(rt), gpr.R(rs), R0);
|
(this->*arith)(gpr.R(rt), gpr.R(rs), R0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ namespace MIPSComp
|
||||||
else
|
else
|
||||||
SUB(gpr.R(rt), gpr.R(rs), op2);
|
SUB(gpr.R(rt), gpr.R(rs), op2);
|
||||||
} else {
|
} else {
|
||||||
ARMABI_MOVI2R(R0, (u32)simm);
|
MOVI2R(R0, (u32)simm);
|
||||||
ADD(gpr.R(rt), gpr.R(rs), R0);
|
ADD(gpr.R(rt), gpr.R(rs), R0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,13 +102,13 @@ namespace MIPSComp
|
||||||
else
|
else
|
||||||
CMN(gpr.R(rs), op2);
|
CMN(gpr.R(rs), op2);
|
||||||
} else {
|
} else {
|
||||||
ARMABI_MOVI2R(R0, simm);
|
MOVI2R(R0, simm);
|
||||||
CMP(gpr.R(rs), R0);
|
CMP(gpr.R(rs), R0);
|
||||||
}
|
}
|
||||||
SetCC(CC_LT);
|
SetCC(CC_LT);
|
||||||
ARMABI_MOVI2R(gpr.R(rt), 1);
|
MOVI2R(gpr.R(rt), 1);
|
||||||
SetCC(CC_GE);
|
SetCC(CC_GE);
|
||||||
ARMABI_MOVI2R(gpr.R(rt), 0);
|
MOVI2R(gpr.R(rt), 0);
|
||||||
SetCC(CC_AL);
|
SetCC(CC_AL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -200,9 +200,9 @@ namespace MIPSComp
|
||||||
gpr.MapDirtyInIn(rd, rs, rt);
|
gpr.MapDirtyInIn(rd, rs, rt);
|
||||||
CMP(gpr.R(rs), gpr.R(rt));
|
CMP(gpr.R(rs), gpr.R(rt));
|
||||||
SetCC(CC_LT);
|
SetCC(CC_LT);
|
||||||
ARMABI_MOVI2R(gpr.R(rd), 1);
|
MOVI2R(gpr.R(rd), 1);
|
||||||
SetCC(CC_GE);
|
SetCC(CC_GE);
|
||||||
ARMABI_MOVI2R(gpr.R(rd), 0);
|
MOVI2R(gpr.R(rd), 0);
|
||||||
SetCC(CC_AL);
|
SetCC(CC_AL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -210,9 +210,9 @@ namespace MIPSComp
|
||||||
gpr.MapDirtyInIn(rd, rs, rt);
|
gpr.MapDirtyInIn(rd, rs, rt);
|
||||||
CMP(gpr.R(rs), gpr.R(rt));
|
CMP(gpr.R(rs), gpr.R(rt));
|
||||||
SetCC(CC_LO);
|
SetCC(CC_LO);
|
||||||
ARMABI_MOVI2R(gpr.R(rd), 1);
|
MOVI2R(gpr.R(rd), 1);
|
||||||
SetCC(CC_HS);
|
SetCC(CC_HS);
|
||||||
ARMABI_MOVI2R(gpr.R(rd), 0);
|
MOVI2R(gpr.R(rd), 0);
|
||||||
SetCC(CC_AL);
|
SetCC(CC_AL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ void Jit::BranchRSZeroComp(u32 op, ArmGen::CCFlags cc, bool andLink, bool likely
|
||||||
if (andLink)
|
if (andLink)
|
||||||
{
|
{
|
||||||
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
||||||
ARMABI_MOVI2R(R0, js.compilerPC + 8);
|
MOVI2R(R0, js.compilerPC + 8);
|
||||||
STR(R1, R0);
|
STR(R1, R0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ void Jit::BranchVFPUFlag(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||||
|
|
||||||
int imm3 = (op >> 18) & 7;
|
int imm3 = (op >> 18) & 7;
|
||||||
|
|
||||||
ARMABI_MOVI2R(R0, (u32)&(mips_->vfpuCtrl[VFPU_CTRL_CC]));
|
MOVI2R(R0, (u32)&(mips_->vfpuCtrl[VFPU_CTRL_CC]));
|
||||||
LDR(R0, R0, Operand2(0, TYPE_IMM));
|
LDR(R0, R0, Operand2(0, TYPE_IMM));
|
||||||
TST(R0, Operand2(1 << imm3, TYPE_IMM));
|
TST(R0, Operand2(1 << imm3, TYPE_IMM));
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ void Jit::Comp_Jump(u32 op)
|
||||||
|
|
||||||
case 3: //jal
|
case 3: //jal
|
||||||
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
||||||
ARMABI_MOVI2R(R0, js.compilerPC + 8);
|
MOVI2R(R0, js.compilerPC + 8);
|
||||||
STR(R1, R0);
|
STR(R1, R0);
|
||||||
WriteExit(targetAddr, 0);
|
WriteExit(targetAddr, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -393,7 +393,7 @@ void Jit::Comp_JumpReg(u32 op)
|
||||||
break;
|
break;
|
||||||
case 9: //jalr
|
case 9: //jalr
|
||||||
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram
|
||||||
ARMABI_MOVI2R(R0, js.compilerPC + 8);
|
MOVI2R(R0, js.compilerPC + 8);
|
||||||
STR(R1, R0);
|
STR(R1, R0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -415,7 +415,7 @@ void Jit::Comp_Syscall(u32 op)
|
||||||
WriteDownCount(offset);
|
WriteDownCount(offset);
|
||||||
js.downcountAmount = -offset;
|
js.downcountAmount = -offset;
|
||||||
|
|
||||||
ARMABI_MOVI2R(R0, op);
|
MOVI2R(R0, op);
|
||||||
QuickCallFunction(R1, (void *)&CallSyscall);
|
QuickCallFunction(R1, (void *)&CallSyscall);
|
||||||
|
|
||||||
WriteSyscallExit();
|
WriteSyscallExit();
|
||||||
|
|
|
@ -69,10 +69,10 @@ namespace MIPSComp
|
||||||
} else {
|
} else {
|
||||||
// Try to avoid using MOVT
|
// Try to avoid using MOVT
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
ARMABI_MOVI2R(R0, (u32)(-offset));
|
MOVI2R(R0, (u32)(-offset));
|
||||||
SUB(R0, gpr.R(rs), R0);
|
SUB(R0, gpr.R(rs), R0);
|
||||||
} else {
|
} else {
|
||||||
ARMABI_MOVI2R(R0, (u32)offset);
|
MOVI2R(R0, (u32)offset);
|
||||||
ADD(R0, gpr.R(rs), R0);
|
ADD(R0, gpr.R(rs), R0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ namespace MIPSComp
|
||||||
// We can compute the full address at compile time. Kickass.
|
// We can compute the full address at compile time. Kickass.
|
||||||
u32 addr = (offset + gpr.GetImm(rs)) & 0x3FFFFFFF;
|
u32 addr = (offset + gpr.GetImm(rs)) & 0x3FFFFFFF;
|
||||||
gpr.MapReg(rt, MAP_NOINIT | MAP_DIRTY); // must be OK even if rs == rt since we have the value from imm already.
|
gpr.MapReg(rt, MAP_NOINIT | MAP_DIRTY); // must be OK even if rs == rt since we have the value from imm already.
|
||||||
ARMABI_MOVI2R(R0, addr);
|
MOVI2R(R0, addr);
|
||||||
} else {
|
} else {
|
||||||
gpr.MapDirtyIn(rt, rs);
|
gpr.MapDirtyIn(rt, rs);
|
||||||
SetR0ToEffectiveAddress(rs, offset);
|
SetR0ToEffectiveAddress(rs, offset);
|
||||||
|
@ -133,7 +133,7 @@ namespace MIPSComp
|
||||||
// We can compute the full address at compile time. Kickass.
|
// We can compute the full address at compile time. Kickass.
|
||||||
u32 addr = (offset + gpr.GetImm(rs)) & 0x3FFFFFFF;
|
u32 addr = (offset + gpr.GetImm(rs)) & 0x3FFFFFFF;
|
||||||
gpr.MapReg(rt);
|
gpr.MapReg(rt);
|
||||||
ARMABI_MOVI2R(R0, addr);
|
MOVI2R(R0, addr);
|
||||||
} else {
|
} else {
|
||||||
gpr.MapInIn(rt, rs);
|
gpr.MapInIn(rt, rs);
|
||||||
SetR0ToEffectiveAddress(rs, offset);
|
SetR0ToEffectiveAddress(rs, offset);
|
||||||
|
|
|
@ -138,7 +138,7 @@ const u8 *Jit::DoJit(u32 em_address, ArmJitBlock *b)
|
||||||
b->checkedEntry = GetCodePtr();
|
b->checkedEntry = GetCodePtr();
|
||||||
// Downcount flag check. The last block decremented downcounter, and the flag should still be available.
|
// Downcount flag check. The last block decremented downcounter, and the flag should still be available.
|
||||||
SetCC(CC_LT);
|
SetCC(CC_LT);
|
||||||
ARMABI_MOVI2R(R0, js.blockStart);
|
MOVI2R(R0, js.blockStart);
|
||||||
MovToPC(R0);
|
MovToPC(R0);
|
||||||
B((const void *)outerLoop);
|
B((const void *)outerLoop);
|
||||||
SetCC(CC_AL);
|
SetCC(CC_AL);
|
||||||
|
@ -213,9 +213,9 @@ void Jit::Comp_Generic(u32 op)
|
||||||
MIPSInterpretFunc func = MIPSGetInterpretFunc(op);
|
MIPSInterpretFunc func = MIPSGetInterpretFunc(op);
|
||||||
if (func)
|
if (func)
|
||||||
{
|
{
|
||||||
ARMABI_MOVI2R(R0, js.compilerPC);
|
MOVI2R(R0, js.compilerPC);
|
||||||
MovToPC(R0);
|
MovToPC(R0);
|
||||||
ARMABI_MOVI2R(R0, op);
|
MOVI2R(R0, op);
|
||||||
QuickCallFunction(R1, (void *)func);
|
QuickCallFunction(R1, (void *)func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ void Jit::WriteDownCount(int offset)
|
||||||
} else {
|
} else {
|
||||||
// Should be fine to use R2 here, flushed the regcache anyway.
|
// Should be fine to use R2 here, flushed the regcache anyway.
|
||||||
// If js.downcountAmount can be expressed as an Imm8, we don't need this anyway.
|
// If js.downcountAmount can be expressed as an Imm8, we don't need this anyway.
|
||||||
ARMABI_MOVI2R(R2, theDowncount);
|
MOVI2R(R2, theDowncount);
|
||||||
SUBS(R1, R1, R2);
|
SUBS(R1, R1, R2);
|
||||||
STR(R10, R1, offsetof(MIPSState, downcount));
|
STR(R10, R1, offsetof(MIPSState, downcount));
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ void Jit::WriteExit(u32 destination, int exit_num)
|
||||||
B(blocks.GetBlock(block)->checkedEntry);
|
B(blocks.GetBlock(block)->checkedEntry);
|
||||||
b->linkStatus[exit_num] = true;
|
b->linkStatus[exit_num] = true;
|
||||||
} else {
|
} else {
|
||||||
ARMABI_MOVI2R(R0, destination);
|
MOVI2R(R0, destination);
|
||||||
MovToPC(R0);
|
MovToPC(R0);
|
||||||
B((const void *)dispatcher);
|
B((const void *)dispatcher);
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ void ArmJitBlockCache::DestroyBlock(int block_num, bool invalidate)
|
||||||
// I hope there's enough space...
|
// I hope there's enough space...
|
||||||
// checkedEntry is the only "linked" entrance so it's enough to overwrite that.
|
// checkedEntry is the only "linked" entrance so it's enough to overwrite that.
|
||||||
ARMXEmitter emit((u8 *)b.checkedEntry);
|
ARMXEmitter emit((u8 *)b.checkedEntry);
|
||||||
emit.ARMABI_MOVI2R(R0, b.originalAddress);
|
emit.MOVI2R(R0, b.originalAddress);
|
||||||
emit.STR(R10, R0, offsetof(MIPSState, pc));
|
emit.STR(R10, R0, offsetof(MIPSState, pc));
|
||||||
emit.B(MIPSComp::jit->dispatcher);
|
emit.B(MIPSComp::jit->dispatcher);
|
||||||
emit.FlushIcache();
|
emit.FlushIcache();
|
||||||
|
|
|
@ -92,7 +92,7 @@ allocate:
|
||||||
emit->MOV((ARMReg)reg, 0);
|
emit->MOV((ARMReg)reg, 0);
|
||||||
}
|
}
|
||||||
} else if (mr[mipsReg].loc == ML_IMM) {
|
} else if (mr[mipsReg].loc == ML_IMM) {
|
||||||
emit->ARMABI_MOVI2R((ARMReg)reg, mr[mipsReg].imm);
|
emit->MOVI2R((ARMReg)reg, mr[mipsReg].imm);
|
||||||
ar[reg].isDirty = true; // IMM is always dirty.
|
ar[reg].isDirty = true; // IMM is always dirty.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ void ArmRegCache::FlushMipsReg(MIPSReg r) {
|
||||||
switch (mr[r].loc) {
|
switch (mr[r].loc) {
|
||||||
case ML_IMM:
|
case ML_IMM:
|
||||||
// IMM is always "dirty".
|
// IMM is always "dirty".
|
||||||
emit->ARMABI_MOVI2R(R0, mr[r].imm);
|
emit->MOVI2R(R0, mr[r].imm);
|
||||||
emit->STR(CTXREG, R0, GetMipsRegOffset(r));
|
emit->STR(CTXREG, R0, GetMipsRegOffset(r));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ void TestCode::Generate()
|
||||||
testCodePtr = this->GetCodePtr();
|
testCodePtr = this->GetCodePtr();
|
||||||
// Sonic1 commented that R11 is the frame pointer in debug mode, whatever "debug mode" means.
|
// Sonic1 commented that R11 is the frame pointer in debug mode, whatever "debug mode" means.
|
||||||
PUSH(2, R11, _LR);
|
PUSH(2, R11, _LR);
|
||||||
ARMABI_MOVI2R(R0, 0x13371338);
|
MOVI2R(R0, 0x13371338);
|
||||||
AND(R1, R0, Operand2(0xFC, 4));
|
AND(R1, R0, Operand2(0xFC, 4));
|
||||||
BIC(R0, R0, Operand2(0xFC, 4));
|
BIC(R0, R0, Operand2(0xFC, 4));
|
||||||
CMP(R1, Operand2(0x10, 4));
|
CMP(R1, Operand2(0x10, 4));
|
||||||
|
|
Loading…
Add table
Reference in a new issue