mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Some more arm work
This commit is contained in:
parent
265e70a498
commit
863bc863c9
@ -362,13 +362,13 @@ void ARMXEmitter::REV (ARMReg dest, ARMReg src )
|
||||
Write32(condition | (107 << 20) | (15 << 16) | (dest << 12) | (243 << 4) | src);
|
||||
}
|
||||
|
||||
void ARMXEmitter::_MSR (bool nzcvq, bool g, Operand2 op2)
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, Operand2 op2)
|
||||
{
|
||||
Write32(condition | (0x320F << 12) | (nzcvq << 19) | (g << 18) | op2.Imm12Mod());
|
||||
Write32(condition | (0x320F << 12) | (write_nzcvq << 19) | (write_g << 18) | op2.Imm12Mod());
|
||||
}
|
||||
void ARMXEmitter::_MSR (bool nzcvq, bool g, ARMReg src)
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, ARMReg src)
|
||||
{
|
||||
Write32(condition | (0x120F << 12) | (nzcvq << 19) | (g << 18) | src);
|
||||
Write32(condition | (0x120F << 12) | (write_nzcvq << 19) | (write_g << 18) | src);
|
||||
}
|
||||
void ARMXEmitter::MRS (ARMReg dest)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ void Jit::BranchRSRTComp(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
CompileAt(js.compilerPC + 4);
|
||||
FlushAll();
|
||||
POP(1, R0);
|
||||
_MSR(false, false, R0); // Restore flags register
|
||||
_MSR(true, false, R0); // Restore flags register
|
||||
ptr = B_CC(cc);
|
||||
}
|
||||
else
|
||||
@ -133,7 +133,7 @@ void Jit::BranchRSZeroComp(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
FlushAll();
|
||||
|
||||
POP(1, R0);
|
||||
_MSR(false, false, R0); // Restore flags register
|
||||
_MSR(true, false, R0); // Restore flags register
|
||||
ptr = B_CC(cc);
|
||||
}
|
||||
else
|
||||
@ -224,7 +224,7 @@ void Jit::BranchFPFlag(u32 op, ArmGen::CCFlags cc, bool likely)
|
||||
|
||||
// POPF(); // restore flag!
|
||||
POP(1, R0);
|
||||
_MSR(false, false, R0); // Restore flags register
|
||||
_MSR(true, false, R0); // Restore flags register
|
||||
ptr = B_CC(cc);
|
||||
}
|
||||
else
|
||||
|
@ -40,8 +40,15 @@ void TestCode::Generate()
|
||||
// Sonic1 commented that R11 is the frame pointer in debug mode, whatever "debug mode" means.
|
||||
PUSH(2, R11, _LR);
|
||||
ARMABI_MOVI2R(R0, 0x13371338);
|
||||
ARMABI_MOVI2R(R1, 0x1337);
|
||||
ARMABI_CallFunction((void*)&TestLeaf2);
|
||||
AND(R1, R0, Operand2(0xFC, 4));
|
||||
BIC(R0, R0, Operand2(0xFC, 4));
|
||||
CMP(R1, Operand2(0x10, 4));
|
||||
SetCC(CC_EQ);
|
||||
MOV(R2, Operand2(0x99, 0));
|
||||
SetCC(CC_NEQ);
|
||||
MOV(R2, Operand2(0xFF, 0));
|
||||
SetCC();
|
||||
ARMABI_CallFunction((void*)&TestLeaf);
|
||||
|
||||
//ARMABI_CallFunctionCCC((void*)&TestLeaf, 0x1, 0x100, 0x1337);
|
||||
//ARMABI_CallFunctionCCC((void*)&TestLeaf, 0x2, 0x100, 0x31337);
|
||||
|
@ -245,8 +245,13 @@ void SettingsScreen::render() {
|
||||
|
||||
bool useFastInt = g_Config.iCpuCore == CPU_FASTINTERPRETER;
|
||||
UICheckBox(GEN_ID, x, y += 50, "Slightly faster interpreter (may crash)", ALIGN_TOPLEFT, &useFastInt);
|
||||
ui_draw2d.DrawText(UBUNTU48, "much faster JIT coming later", x += 50, 0xcFFFFFFF, ALIGN_LEFT);
|
||||
g_Config.iCpuCore = useFastInt ? CPU_FASTINTERPRETER : CPU_INTERPRETER;
|
||||
|
||||
bool useJit = g_Config.iCpuCore == CPU_JIT;
|
||||
UICheckBox(GEN_ID, x, y += 50, "Use JIT (very crashy)", ALIGN_TOPLEFT, &useJit);
|
||||
if (useJit) {
|
||||
g_Config.iCpuCore = CPU_JIT;
|
||||
}
|
||||
// UICheckBox(GEN_ID, x, y += 50, "Draw raw framebuffer (for some homebrew)", ALIGN_TOPLEFT, &g_Config.bDisplayFramebuffer);
|
||||
|
||||
if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres-10), LARGE_BUTTON_WIDTH, "Back", ALIGN_RIGHT | ALIGN_BOTTOM)) {
|
||||
|
@ -15,4 +15,4 @@ public class PpssppActivity extends NativeActivity {
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user