mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
ARM64: The Return of the Pointer Truncator - The Movie
This commit is contained in:
1 parent
db0fd1042f
commit
ff758f58ad
2 files changed
+4
-3
No files matched your search
@@ -673,6 +673,7 @@ public:
|
||||
void MOVI2R(ARM64Reg Rd, u64 imm, bool optimize = true);
|
||||
template <class P>
|
||||
void MOVP2R(ARM64Reg Rd, P *ptr) {
|
||||
_assert_msg_(JIT, Is64Bit(Rd), "Can't store pointers in 32-bit registers");
|
||||
MOVI2R(Rd, (uintptr_t)ptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ static const ARM64Reg dstReg = X1;
|
||||
|
||||
static const ARM64Reg counterReg = W2;
|
||||
static const ARM64Reg tempReg1 = W3;
|
||||
static const ARM64Reg tempRegPtr = X3;
|
||||
static const ARM64Reg tempReg2 = W4;
|
||||
static const ARM64Reg tempReg3 = W5;
|
||||
static const ARM64Reg scratchReg = W6;
|
||||
@@ -193,10 +194,10 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec) {
|
||||
B(CC_NEQ, loopStart);
|
||||
|
||||
if (dec.col) {
|
||||
MOVP2R(tempReg1, &gstate_c.vertexFullAlpha);
|
||||
MOVP2R(tempRegPtr, &gstate_c.vertexFullAlpha);
|
||||
CMP(fullAlphaReg, 0);
|
||||
FixupBranch skip = B(CC_NEQ);
|
||||
STRB(INDEX_UNSIGNED, fullAlphaReg, tempReg1, 0);
|
||||
STRB(INDEX_UNSIGNED, fullAlphaReg, tempRegPtr, 0);
|
||||
SetJumpTarget(skip);
|
||||
}
|
||||
|
||||
@@ -219,7 +220,6 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec) {
|
||||
}
|
||||
|
||||
bool VertexDecoderJitCache::CompileStep(const VertexDecoder &dec, int step) {
|
||||
return false;
|
||||
// See if we find a matching JIT function
|
||||
for (size_t i = 0; i < ARRAY_SIZE(jitLookup); i++) {
|
||||
if (dec.steps_[step] == jitLookup[i].func) {
|
||||
|
||||
Reference in new issue
Block a user