view test/test_shift.h @ 45:7955bed1d169 default tip

*: add preliminary floating point support no x86 intrinsics just yet, but I did add altivec since it's (arguably) the simplest :)
author Paper <paper@tflc.us>
date Wed, 30 Apr 2025 18:36:38 -0400
parents 4b5a557aa64f
children
line wrap: on
line source

static int test_shift(void)
{
	int ret = 0;

	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;
}