[Shader JIT] Add index = 3 to indexed register addressing
This commit is contained in:
@@ -95,7 +95,7 @@ void ShaderEmitter::compileInstruction(const PICAShader& shaderUnit) {
|
|||||||
// See if PC is a possible return PC and emit the proper code if so
|
// See if PC is a possible return PC and emit the proper code if so
|
||||||
if (std::binary_search(returnPCs.begin(), returnPCs.end(), recompilerPC)) {
|
if (std::binary_search(returnPCs.begin(), returnPCs.end(), recompilerPC)) {
|
||||||
const auto stackOffsetForPC = getStackOffsetOfReturnPC();
|
const auto stackOffsetForPC = getStackOffsetOfReturnPC();
|
||||||
|
|
||||||
Label end;
|
Label end;
|
||||||
// Check if return address == recompilerPC, ie if we should return
|
// Check if return address == recompilerPC, ie if we should return
|
||||||
cmp(dword[rsp + stackOffsetForPC], recompilerPC);
|
cmp(dword[rsp + stackOffsetForPC], recompilerPC);
|
||||||
@@ -221,6 +221,12 @@ void ShaderEmitter::loadRegister(Xmm dest, const PICAShader& shader, u32 src, u3
|
|||||||
movsxd(rax, dword[statePointer + addrYOffset]); // rax = address register y
|
movsxd(rax, dword[statePointer + addrYOffset]); // rax = address register y
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 3: {
|
||||||
|
const uintptr_t loopCounterOffset = uintptr_t(&shader.loopCounter) - uintptr_t(&shader);
|
||||||
|
mov(eax, dword[statePointer + loopCounterOffset]); // rax = loop counter
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Helpers::panic("[ShaderJIT]: Unimplemented source index type %d", index);
|
Helpers::panic("[ShaderJIT]: Unimplemented source index type %d", index);
|
||||||
|
|||||||
Reference in New Issue
Block a user