Mercurial > vec
view test/test_shift.h @ 28:c6c99ab1088a
*: add min/max functions and a big big refactor (again)
agh, this time I added a few more implementations (and generally
made the code just a little faster...)
author | Paper <paper@tflc.us> |
---|---|
date | Thu, 24 Apr 2025 00:54:02 -0400 |
parents | e26874655738 |
children | 677c03c382b8 |
line wrap: on
line source
static int test_shift(void) { int ret = 0; 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; }