Mercurial > vec
view test/test_shift.h @ 21:697b9ba1c1de
impl/ppc/altivec: implement comparison functions
had to prune some up eh, vec_cmple/vec_cmpge is only available in
VSX
author | Paper <paper@tflc.us> |
---|---|
date | Thu, 21 Nov 2024 21:55:20 +0000 |
parents | cf04071d2148 |
children | e26874655738 |
line wrap: on
line source
static int test_shift(void) { int ret = 0; ret |= (vec_ulrshift(0xFFFFFFFF, 16) != 0xFFFF); ret |= (vec_ullshift(0xFFFF, 16) != 0xFFFF0000); ret |= (vec_lrshift(0xFFFFFFFF, 16) != 0xFFFF); ret |= (vec_llshift(0xFFFF, 16) != 0xFFFF0000); ret |= (vec_urshift(0xFFFFFFFF, 16) != 0xFFFF); ret |= (vec_ulshift(0xFFFF, 16) != 0xFFFF0000); ret |= (vec_rshift(-0xFFFF, 8) != -0x100); ret |= (vec_lshift(-0xFFFF, 8) != -0xFFFF00); return ret; }