mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 17:00:57 +01:00
shader_jit_x64: Fix strict memory aliasing issues.
This commit is contained in:
parent
e5d417213c
commit
135aec7bea
1 changed files with 3 additions and 1 deletions
|
@ -741,7 +741,9 @@ void JitCompiler::Compile_Block(unsigned end) {
|
|||
void JitCompiler::Compile_NextInstr(unsigned* offset) {
|
||||
offset_ptr = offset;
|
||||
|
||||
Instruction instr = *(Instruction*)&g_state.vs.program_code[(*offset_ptr)++];
|
||||
Instruction instr;
|
||||
std::memcpy(&instr, &g_state.vs.program_code[(*offset_ptr)++], sizeof(Instruction));
|
||||
|
||||
OpCode::Id opcode = instr.opcode.Value();
|
||||
auto instr_func = instr_table[static_cast<unsigned>(opcode)];
|
||||
|
||||
|
|
Loading…
Reference in a new issue