mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-08 07:28:09 +01:00
emit_x64_vector: Use VPOPCNTB in EmitVectorPopulationCount() if AVX-512 BITALG is available
This commit is contained in:
parent
0c63e8f396
commit
27a6d5f6ce
1 changed files with 10 additions and 0 deletions
|
|
@ -1613,6 +1613,16 @@ void EmitX64::EmitVectorPairedAdd64(EmitContext& ctx, IR::Inst* inst) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitX64::EmitVectorPopulationCount(EmitContext& ctx, IR::Inst* inst) {
|
void EmitX64::EmitVectorPopulationCount(EmitContext& ctx, IR::Inst* inst) {
|
||||||
|
if (code.DoesCpuSupport(Xbyak::util::Cpu::tAVX512_BITALG)) {
|
||||||
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
const Xbyak::Xmm data = ctx.reg_alloc.UseScratchXmm(args[0]);
|
||||||
|
|
||||||
|
code.vpopcntb(data, data);
|
||||||
|
|
||||||
|
ctx.reg_alloc.DefineValue(inst, data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (code.DoesCpuSupport(Xbyak::util::Cpu::tSSSE3)) {
|
if (code.DoesCpuSupport(Xbyak::util::Cpu::tSSSE3)) {
|
||||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue