shader_jit_x64: Zero-extend conditional-code bytes

`mov` was doing a partial update of bits within the register, allowing
garbage to be introduced in the upper bits of the register.
This commit is contained in:
Wunkolo 2024-08-17 12:56:45 -07:00
parent a510de0e4c
commit 3319719f0f
No known key found for this signature in database

View file

@ -1002,8 +1002,8 @@ void JitShader::Compile(const std::array<u32, MAX_PROGRAM_CODE_LENGTH>* program_
mov(LOOPCOUNT_REG, dword[STATE + offsetof(ShaderUnit, address_registers[2])]);
// Load conditional code
mov(COND0, byte[STATE + offsetof(ShaderUnit, conditional_code[0])]);
mov(COND1, byte[STATE + offsetof(ShaderUnit, conditional_code[1])]);
movzx(COND0, byte[STATE + offsetof(ShaderUnit, conditional_code[0])]);
movzx(COND1, byte[STATE + offsetof(ShaderUnit, conditional_code[1])]);
// Used to set a register to one
static const __m128 one = {1.f, 1.f, 1.f, 1.f};