Improve CPU_ProbePower8() test
parent
c4ef77bcdb
commit
c4eb38b856
12
ppc-simd.cpp
12
ppc-simd.cpp
|
|
@ -161,11 +161,15 @@ bool CPU_ProbePower8()
|
||||||
result = false;
|
result = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
byte b1[19] = {255, 255, 255, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, b2[17];
|
// POWER8 added 64-bit SIMD operations
|
||||||
const uint8x16_p v1 = (uint8x16_p)VectorLoad(0, b1+3);
|
const word64 m = W64LIT(0xffffffffffffffff);
|
||||||
VectorStore(v1, b2+1);
|
word64 w1[2] = {m, m}, w2[2] = {3, 4}, w3[2];
|
||||||
|
const uint64x2_p v1 = (uint64x2_p)VectorLoad(0, w1);
|
||||||
|
const uint64x2_p v2 = (uint64x2_p)VectorLoad(0, w2);
|
||||||
|
VectorStore(VectorAdd(v1, v2), w3);
|
||||||
|
|
||||||
result = (0 == std::memcmp(b1+3, b2+1, 16));
|
// The 64-bit add will overflow.
|
||||||
|
result = (w3[0] == 2 && w3[1] == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
|
sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue