2019-10-24 09:33:15 +00:00
|
|
|
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
|
|
|
|
#if (GNUC_VERSION >= 4060) || defined(__clang__)
|
2019-10-24 09:18:12 +00:00
|
|
|
# pragma GCC diagnostic ignored "-Wdeprecated"
|
|
|
|
#endif
|
|
|
|
|
2018-11-13 18:48:38 +00:00
|
|
|
#include <altivec.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
2019-10-23 17:10:04 +00:00
|
|
|
#if defined(_ARCH_PWR7)
|
2019-10-24 09:18:12 +00:00
|
|
|
__vector unsigned int a = {1,2,3,4};
|
|
|
|
__vector unsigned int b = vec_ld(0, (__vector unsigned int*)argv[0]);
|
|
|
|
__vector unsigned int c = vec_xor(a, b);
|
|
|
|
|
|
|
|
__vector unsigned int x = {5,6,7,8};
|
|
|
|
__vector unsigned int y = vec_xl(0, (__vector unsigned int*)argv[0]);
|
2019-10-23 22:15:47 +00:00
|
|
|
__vector unsigned int z = vec_xor(x, y);
|
|
|
|
# if defined(__VSX__)
|
2019-10-24 09:18:12 +00:00
|
|
|
__vector unsigned long long xx = {1,2};
|
|
|
|
__vector unsigned long long yy = vec_xl(0, (__vector unsigned long long*)argv[0]);
|
2019-10-23 22:15:47 +00:00
|
|
|
__vector unsigned long long zz = vec_xor(xx, yy);
|
|
|
|
# endif
|
2018-11-19 23:29:46 +00:00
|
|
|
#else
|
2019-10-23 17:10:04 +00:00
|
|
|
int x[-1];
|
2018-11-13 18:48:38 +00:00
|
|
|
#endif
|
2019-10-23 17:10:04 +00:00
|
|
|
return 0;
|
2018-11-13 18:48:38 +00:00
|
|
|
}
|