comparison test/test_shift.h @ 18:cf04071d2148

impl: initial NEON support; test: verify bit shifting functions
author Paper <paper@tflc.us>
date Wed, 20 Nov 2024 14:33:19 -0500
parents
children e26874655738
comparison
equal deleted inserted replaced
17:41dd962abdd1 18:cf04071d2148
1 static int test_shift(void)
2 {
3 int ret = 0;
4
5 ret |= (vec_ulrshift(0xFFFFFFFF, 16) != 0xFFFF);
6 ret |= (vec_ullshift(0xFFFF, 16) != 0xFFFF0000);
7 ret |= (vec_lrshift(0xFFFFFFFF, 16) != 0xFFFF);
8 ret |= (vec_llshift(0xFFFF, 16) != 0xFFFF0000);
9 ret |= (vec_urshift(0xFFFFFFFF, 16) != 0xFFFF);
10 ret |= (vec_ulshift(0xFFFF, 16) != 0xFFFF0000);
11 ret |= (vec_rshift(-0xFFFF, 8) != -0x100);
12 ret |= (vec_lshift(-0xFFFF, 8) != -0xFFFF00);
13
14 return ret;
15 }