Fix dynarmic submodule (#446)

* Remove dynarmic submodule

* Add dynarmic mirror

* Update oaknut

* Update shader JIT to work with latest oaknut

* Maybe fix oaknut finally

* hlep

* More arm64 shader derps

* Fixing more shader JIT brokenness

* aaaaaaaaaaaa

* Update shader_rec_emitter_arm64.hpp

* Update shader_rec_emitter_arm64.cpp
This commit is contained in:
wheremyfoodat 2024-03-07 17:47:21 +00:00 committed by GitHub
parent 24705fe67e
commit 25d8e5807f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 12 deletions

View file

@ -42,6 +42,12 @@ class ShaderEmitter : private oaknut::CodeBlock, public oaknut::CodeGenerator {
oaknut::Label emitLog2Func();
oaknut::Label emitExp2Func();
template <typename T>
T getLabelPointer(const oaknut::Label& label) {
auto pointer = reinterpret_cast<u8*>(oaknut::CodeBlock::ptr()) + label.offset();
return reinterpret_cast<T>(pointer);
}
// Compile all instructions from [current recompiler PC, end)
void compileUntil(const PICAShader& shaderUnit, u32 endPC);
// Compile instruction "instr"
@ -118,13 +124,11 @@ class ShaderEmitter : private oaknut::CodeBlock, public oaknut::CodeGenerator {
// PC must be a valid entrypoint here. It doesn't have that much overhead in this case, so we use std::array<>::at() to assert it does
InstructionCallback getInstructionCallback(u32 pc) {
// Cast away the constness because casting to a function pointer is hard otherwise. Legal as long as we don't write to *ptr
uint8_t* ptr = instructionLabels.at(pc).ptr<u8*>();
return reinterpret_cast<InstructionCallback>(ptr);
return getLabelPointer<InstructionCallback>(instructionLabels.at(pc));
}
PrologueCallback getPrologueCallback() { return prologueCb; }
void compile(const PICAShader& shaderUnit);
};
#endif // arm64 recompiler check
#endif // arm64 recompiler check