mirror of
https://github.com/azahar-emu/dynarmic.git
synced 2026-03-20 20:51:03 +01:00
emit_x64_vector: bug: VectorGetElement8 returning incorrect values for non-SSE4.1
This bug wasn't discovered earlier because we previously only used index == 0.
This commit is contained in:
@@ -41,7 +41,10 @@ void EmitX64::EmitVectorGetElement8(EmitContext& ctx, IR::Inst* inst) {
|
||||
ctx.reg_alloc.DefineValue(inst, dest);
|
||||
} else {
|
||||
Xbyak::Reg32 dest = ctx.reg_alloc.ScratchGpr().cvt32();
|
||||
code->pextrw(dest, source, index);
|
||||
code->pextrw(dest, source, index / 2);
|
||||
if (index % 2 == 1) {
|
||||
code->shr(dest, 8);
|
||||
}
|
||||
ctx.reg_alloc.DefineValue(inst, dest);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user