comparison test/test_shift.h @ 23:e26874655738

*: huge refactor, new major release (hahaha) I keep finding things that are broken... The problem NOW was that vec would unintentionally build some functions with extended instruction sets, which is Bad and would mean that for all intents and purposes the CPU detection was completely broken. Now vec is no longer header only either. Boohoo. However this gives a lot more flexibility to vec since we no longer want or need to care about C++ crap. The NEON and Altivec implementations have not been updated which means they won't compile hence why they're commented out in the cmake build file.
author Paper <paper@tflc.us>
date Sun, 24 Nov 2024 02:52:40 -0500
parents cf04071d2148
children
comparison
equal deleted inserted replaced
22:fbcd3fa6f8fc 23:e26874655738
1 static int test_shift(void) 1 static int test_shift(void)
2 { 2 {
3 int ret = 0; 3 int ret = 0;
4 4
5 ret |= (vec_ulrshift(0xFFFFFFFF, 16) != 0xFFFF);
6 ret |= (vec_ullshift(0xFFFF, 16) != 0xFFFF0000);
7 ret |= (vec_lrshift(0xFFFFFFFF, 16) != 0xFFFF); 5 ret |= (vec_lrshift(0xFFFFFFFF, 16) != 0xFFFF);
8 ret |= (vec_llshift(0xFFFF, 16) != 0xFFFF0000); 6 ret |= (vec_llshift(0xFFFF, 16) != 0xFFFF0000);
9 ret |= (vec_urshift(0xFFFFFFFF, 16) != 0xFFFF); 7 ret |= (vec_urshift(0xFFFFFFFF, 16) != 0xFFFF);
10 ret |= (vec_ulshift(0xFFFF, 16) != 0xFFFF0000); 8 ret |= (vec_ulshift(0xFFFF, 16) != 0xFFFF0000);
11 ret |= (vec_rshift(-0xFFFF, 8) != -0x100); 9 ret |= (vec_rshift(-0xFFFF, 8) != -0x100);