Mercurial > vec
view test/test_shift.h @ 24:e49e70f7012f
impl/x86: add static assertions for alignment and size
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 24 Nov 2024 03:32:53 -0500 |
parents | e26874655738 |
children |
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; }