Mercurial > vec
annotate test/test_shift.h @ 36:677c03c382b8
Backed out changeset e26874655738
author | Paper <paper@tflc.us> |
---|---|
date | Fri, 25 Apr 2025 17:40:55 -0400 |
parents | e26874655738 |
children | 4b5a557aa64f |
rev | line source |
---|---|
18
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
1 static int test_shift(void) |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
2 { |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
3 int ret = 0; |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
4 |
36 | 5 ret |= (vec_ulrshift(0xFFFFFFFF, 16) != 0xFFFF); |
6 ret |= (vec_ullshift(0xFFFF, 16) != 0xFFFF0000); | |
18
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
7 ret |= (vec_lrshift(0xFFFFFFFF, 16) != 0xFFFF); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
8 ret |= (vec_llshift(0xFFFF, 16) != 0xFFFF0000); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
9 ret |= (vec_urshift(0xFFFFFFFF, 16) != 0xFFFF); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
10 ret |= (vec_ulshift(0xFFFF, 16) != 0xFFFF0000); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
11 ret |= (vec_rshift(-0xFFFF, 8) != -0x100); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
12 ret |= (vec_lshift(-0xFFFF, 8) != -0xFFFF00); |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
13 |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
14 return ret; |
cf04071d2148
impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents:
diff
changeset
|
15 } |