VertexLoaderX64: Don't use PDEP on AMD Zen

This commit is contained in:
Techjar 2020-01-26 21:42:56 -05:00
parent a106c99826
commit 3a3dc28d54
1 changed files with 3 additions and 3 deletions

View File

@ -284,7 +284,7 @@ void VertexLoaderX64::ReadColor(OpArg data, u64 attribute, int format)
// RRRRRGGG GGGBBBBB // RRRRRGGG GGGBBBBB
// AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR // AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR
LoadAndSwap(16, scratch1, data); LoadAndSwap(16, scratch1, data);
if (cpu_info.bBMI1 && cpu_info.bBMI2) if (cpu_info.bBMI1 && cpu_info.bFastBMI2)
{ {
MOV(32, R(scratch2), Imm32(0x07C3F7C0)); MOV(32, R(scratch2), Imm32(0x07C3F7C0));
PDEP(32, scratch3, scratch1, R(scratch2)); PDEP(32, scratch3, scratch1, R(scratch2));
@ -324,7 +324,7 @@ void VertexLoaderX64::ReadColor(OpArg data, u64 attribute, int format)
// RRRRGGGG BBBBAAAA // RRRRGGGG BBBBAAAA
// AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR // AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR
LoadAndSwap(16, scratch1, data); LoadAndSwap(16, scratch1, data);
if (cpu_info.bBMI2) if (cpu_info.bFastBMI2)
{ {
MOV(32, R(scratch2), Imm32(0x0F0F0F0F)); MOV(32, R(scratch2), Imm32(0x0F0F0F0F));
PDEP(32, scratch1, scratch1, R(scratch2)); PDEP(32, scratch1, scratch1, R(scratch2));
@ -353,7 +353,7 @@ void VertexLoaderX64::ReadColor(OpArg data, u64 attribute, int format)
// AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR // AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR
data.AddMemOffset(-1); // subtract one from address so we can use a 32bit load and bswap data.AddMemOffset(-1); // subtract one from address so we can use a 32bit load and bswap
LoadAndSwap(32, scratch1, data); LoadAndSwap(32, scratch1, data);
if (cpu_info.bBMI2) if (cpu_info.bFastBMI2)
{ {
MOV(32, R(scratch2), Imm32(0xFCFCFCFC)); MOV(32, R(scratch2), Imm32(0xFCFCFCFC));
PDEP(32, scratch1, scratch1, R(scratch2)); PDEP(32, scratch1, scratch1, R(scratch2));