mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-06 15:10:00 +01:00
emit_x64_crc32: Correct use of x64 crc32 instruction
CRC32 r32, r/m64 variant does not exist, but CRC r64, r/m64 does what we want.
This commit is contained in:
parent
314ab7a462
commit
2ee3eacd01
@ -22,7 +22,13 @@ static void EmitCRC32Castagnoli(BlockOfCode& code, EmitContext& ctx, IR::Inst* i
|
||||
if (code.HasHostFeature(HostFeature::SSE42)) {
|
||||
const Xbyak::Reg32 crc = ctx.reg_alloc.UseScratchGpr(args[0]).cvt32();
|
||||
const Xbyak::Reg value = ctx.reg_alloc.UseGpr(args[1]).changeBit(data_size);
|
||||
code.crc32(crc, value);
|
||||
|
||||
if (data_size != 64) {
|
||||
code.crc32(crc, value);
|
||||
} else {
|
||||
code.crc32(crc.cvt64(), value);
|
||||
}
|
||||
|
||||
ctx.reg_alloc.DefineValue(inst, crc);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user