mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-09-18 15:32:33 +00:00
SPU LLVM: Handle SHUFB special cases with a lookup table
- Needs 3 instructions to handle the special cases, since x86 lacks an 8 bit simd shift instruction
This commit is contained in:
parent
ba988f1d3f
commit
ee7475a9d4
1 changed files with 4 additions and 4 deletions
|
@ -8599,7 +8599,7 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto x = avg(noncast<u8[16]>(sext<s8[16]>((c & 0xc0) == 0xc0)), noncast<u8[16]>(sext<s8[16]>((c & 0xe0) == 0xc0)));
|
const auto x = pshufb(build<u8[16]>(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80), (c >> 4));
|
||||||
const auto ax = pshufb(as, c);
|
const auto ax = pshufb(as, c);
|
||||||
const auto bx = pshufb(bs, c);
|
const auto bx = pshufb(bs, c);
|
||||||
|
|
||||||
|
@ -8615,7 +8615,7 @@ public:
|
||||||
if (data == v128::from8p(data._u8[0]))
|
if (data == v128::from8p(data._u8[0]))
|
||||||
{
|
{
|
||||||
// See above
|
// See above
|
||||||
const auto x = avg(noncast<u8[16]>(sext<s8[16]>((c & 0xc0) == 0xc0)), noncast<u8[16]>(sext<s8[16]>((c & 0xe0) == 0xc0)));
|
const auto x = pshufb(build<u8[16]>(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80), (c >> 4));
|
||||||
const auto ax = pshufb(as, c);
|
const auto ax = pshufb(as, c);
|
||||||
|
|
||||||
if (perm_only)
|
if (perm_only)
|
||||||
|
@ -8634,7 +8634,7 @@ public:
|
||||||
if (data == v128::from8p(data._u8[0]))
|
if (data == v128::from8p(data._u8[0]))
|
||||||
{
|
{
|
||||||
// See above
|
// See above
|
||||||
const auto x = avg(noncast<u8[16]>(sext<s8[16]>((c & 0xc0) == 0xc0)), noncast<u8[16]>(sext<s8[16]>((c & 0xe0) == 0xc0)));
|
const auto x = pshufb(build<u8[16]>(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80), (c >> 4));
|
||||||
const auto bx = pshufb(bs, c);
|
const auto bx = pshufb(bs, c);
|
||||||
|
|
||||||
if (perm_only)
|
if (perm_only)
|
||||||
|
@ -8662,7 +8662,7 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto x = avg(noncast<u8[16]>(sext<s8[16]>((c & 0xc0) == 0xc0)), noncast<u8[16]>(sext<s8[16]>((c & 0xe0) == 0xc0)));
|
const auto x = pshufb(build<u8[16]>(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80), (c >> 4));
|
||||||
const auto cr = eval(c ^ 0xf);
|
const auto cr = eval(c ^ 0xf);
|
||||||
const auto ax = pshufb(a, cr);
|
const auto ax = pshufb(a, cr);
|
||||||
const auto bx = pshufb(b, cr);
|
const auto bx = pshufb(b, cr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue