mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
A couple nits
This commit is contained in:
parent
a37535fa09
commit
5d2a4ed7ce
1 changed files with 4 additions and 8 deletions
|
@ -842,7 +842,7 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene
|
|||
MAYBE_AVX(movq, scratch1, xmm_src);
|
||||
c.and_(scratch1, mask);
|
||||
|
||||
// dst &= ~(mask << index)
|
||||
// mask = ~(mask << index)
|
||||
c.mov(cl, index.cvt8());
|
||||
c.shl(mask, cl);
|
||||
c.not_(mask);
|
||||
|
@ -850,17 +850,13 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene
|
|||
// src <<= index
|
||||
c.shl(scratch1, cl);
|
||||
|
||||
// dst = (dst & mask) | src
|
||||
MAYBE_AVX(movq, scratch2, xmm_dst);
|
||||
c.and_(scratch2, mask);
|
||||
c.or_(scratch2, scratch1);
|
||||
|
||||
// Insert scratch2 into low 64 bits of dst, upper 64 bits are unaffected
|
||||
Cpu cpu;
|
||||
if (cpu.has(Cpu::tAVX)) {
|
||||
c.vpinsrq(xmm_dst, xmm_dst, scratch2, 0);
|
||||
} else {
|
||||
c.pinsrq(xmm_dst, scratch2, 0);
|
||||
}
|
||||
// Upper 64 bits are undefined in insertq
|
||||
MAYBE_AVX(movq, xmm_dst, scratch2);
|
||||
|
||||
c.pop(mask);
|
||||
c.pop(index);
|
||||
|
|
Loading…
Add table
Reference in a new issue