https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93819

--- Comment #2 from Carl Love <cel at us dot ibm.com> ---
With the attached patch, the test program now runs as follows:

ABI says:
VEC_RLNM (ARG1, ARG2, ARG3)
ARG2 contains the shift count for each element in the low-order
byte, with other bytes zero.
ARG3 contains the mask begin and mask end for each element, with
the mask end in the low-order byte, the mask begin in the next
higher byte, and other bytes zero.

Vector int test case: mask begin = 0, mask end = 4, shift = 16

vec_arg1_int[0] = 0x12345678
vec_arg2_int[0] = 16 (0x10)
vec_arg3_int[0] = 4 (0x4)
vec_result_int[0] = 0x50000000
Int result matches expected result 0x50000000
vec_arg1_int[1] = 0x23456789
vec_arg2_int[1] = 16 (0x10)
vec_arg3_int[1] = 4 (0x4)
vec_result_int[1] = 0x60000000
Int result matches expected result 0x60000000
vec_arg1_int[2] = 0x3456789a
vec_arg2_int[2] = 16 (0x10)
vec_arg3_int[2] = 4 (0x4)
vec_result_int[2] = 0x78000000
Int result matches expected result 0x78000000
vec_arg1_int[3] = 0x456789ab
vec_arg2_int[3] = 16 (0x10)
vec_arg3_int[3] = 4 (0x4)
vec_result_int[3] = 0x88000000
Int result matches expected result 0x88000000
Vector long long int test case: mask begin = 0, mask end = 4, shift = 20

vec_arg1_di[0] = 0x123456789abcde00
vec_arg2_di[0] = 20 (0x14)
vec_arg3_di[0] = 4 (0x4)
vec_result_di[0] = 0x6000000000000000
Long long int result matches expected result 0x6000000000000000
vec_arg1_di[1] = 0x23456789abcdef11
vec_arg2_di[1] = 20 (0x14)
vec_arg3_di[1] = 4 (0x4)
vec_result_di[1] = 0x7800000000000000
Long long int result matches expected result 0x7800000000000000

Reply via email to