diff --git a/Intrinsics_Reference/ch_vec_reference.xml b/Intrinsics_Reference/ch_vec_reference.xml index df3e9c4..c049ac8 100644 --- a/Intrinsics_Reference/ch_vec_reference.xml +++ b/Intrinsics_Reference/ch_vec_reference.xml @@ -39299,11 +39299,159 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> of r is the value of the corresponding element of the most-significant half of a. + An example for input a + of type vector signed int follows: + + + + + + + + + + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + r + + + 10111213 + + + 24252627 + + + ???????? + + + ???????? + + + + + a + + + 0000000010111213 + + + 0000000024252627 + + + + + + If a is a floating-point vector, the value of each element of r is the value of the corresponding element of the most-significant half of a, widened to the result precision. + An example for input a + of type vector float follows: + + + + + + + + + + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + r + + + -2.71828182 + + + 3.14159265 + + + ???????? + + + ???????? + + + + + a + + + -2.71828182 + + + 3.14159265 + + + + + + If a is a pixel vector, the value of each element of r is taken from the corresponding element of the most-significant half of role="bold">a. - Endian considerations: - The "high" half of a vector with n elements is the - first n/2 elements of the vector. For little - endian, these elements are in the rightmost half of the vector. For - big endian, these elements are in the leftmost half of the vector. - - - - vupklsh - vec_unpackh - - - vupkhsh - vec_unpackh - - - vupklpx - vec_unpackh - - - vupkhpx - vec_unpackh - - - vupklsw - vec_unpackh - - - vupkhsw - vec_unpackh - - - vupklsb - vec_unpackh - - - vupkhsb - vec_unpackh - - - xxsldwi - vec_unpackh - - - xvcvspdp - vec_unpackh - - - - Supported type signatures for vec_unpackh - - - - - + An example follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + halfword index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + + + + + a + + + 1234 + + + 2567 + + + 489A + + + 8BCD + + + ???? + + + ???? + + + ???? + + + ???? + + + + + unpack halfwords to words + + + 1234 + + + 2567 + + + 489A + + + 8BCD + + + + + as bits + + + 0001001000110100 + + + 0010010101100111 + + + 0100100010011010 + + + 1000101111001101 + + + + + as 1-5-5-5 + + + 0 + + + 00100 + + + 10001 + + + 10100 + + + 0 + + + 01001 + + + 01011 + + + 00111 + + + 0 + + + 10010 + + + 00100 + + + 11010 + + + 1 + + + 00010 + + + 11110 + + + 01101 + + + + + r + + + 00041114 + + + 00090B07 + + + 0012041A + + + FF021E0D + + + + + + + + Endian considerations: + The "high" half of a vector with n elements is the + first n/2 elements of the vector. For little + endian, these elements are in the rightmost half of the vector. For + big endian, these elements are in the leftmost half of the vector. + + + + vupklsh + vec_unpackh + + + vupkhsh + vec_unpackh + + + vupklpx + vec_unpackh + + + vupkhpx + vec_unpackh + + + vupklsw + vec_unpackh + + + vupkhsw + vec_unpackh + + + vupklsb + vec_unpackh + + + vupkhsb + vec_unpackh + + + xxsldwi + vec_unpackh + + + xvcvspdp + vec_unpackh + + +
+ Supported type signatures for vec_unpackh + + + + + + + + + + r + + + + + a + + + + Example LE + Implementation + + + Example BE + Implementation + + + + + + + vector bool short + + + vector bool char + + + + vupklsb r,a + + + + + vupkhsb r,a + + + + + + vector signed short + + + vector signed char + + + + vupklsb r,a + + + + + vupkhsb r,a + + + + + + vector bool int + + + vector bool short + + + + vupklsh r,a + + + + + vupkhsh r,a + + + + + + vector signed int + + + vector signed short + + + + vupklsh r,a + + + + + vupkhsh r,a + + + + + + vector unsigned int + + + vector pixel + + + + vupklpx r,a + + + + + vupkhpx r,a + + + + + + vector bool long long + + + vector bool int + + + + vupklsw r,a + + + + + vupkhsw r,a + + + + + + vector signed long long + + + vector signed int + + + + vupklsw r,a + + + + + vupkhsw r,a + + + + + + vector double + + + vector float + + + + xxsldwi t,a,a,3 + xxsldwi u,a,t,2 + xvcvspdp r,u + + + + + xxsldwi t,a,a,1 + xxsldwi u,t,a,3 + xvcvspdp r,u + + + + + +
+ + + + + + vec_unpackl + Vector Unpack Low + + r = vec_unpackl (a) + + + Purpose: + Unpacks the least-significant (“low”) half of a vector into a vector + with larger elements. + + Result value: If a is an integer vector, the value of each element + of r is the value of the corresponding + element of the least-significant half of a. + An example for input a + of type vector signed int follows: + + + + + + + + + + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + r + + + ???????? + + + ???????? + + + 38393A3B + + + 4C4D4E4F + + + + + a + + + 0000000038393A3B + + + 000000004C4D4E4F + + + + + + + If a is a floating-point vector, + the value of each element of r is the + value of the corresponding element of the least-significant half of + a, widened to the result + precision. + An example for input a + of type vector float follows: + + + + + + + + + + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + r + + + ???????? + + + ???????? + + + 6.0221409e+23 + + + 1.61803398875 + + + + + a + + + 6.0221409e+23 + + + 1.61803398875 + + + + + + + If a is a pixel vector, the value + of each element of r is taken from the + corresponding element of the least-significant half of a as follows: + + + All bits in the first byte of the element of r are set to the value of the first bit of + the element of a. + + + The least-significant 5 bits of the second byte of the + element of r are set to the value + of the next 5 bits in the element of a. + + + The least-significant 5 bits of the third byte of the + element of r are set to the value + of the next 5 bits in the element of a. + + + The least-significant 5 bits of the fourth byte of the + element of r are set to the value + of the next 5 bits in the element of a. + + + An example follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - r - + word index + + 0 + + + 1 + + + 2 + + + 3 + + + - - a - + halfword index - - Example LE - Implementation + + 0 - - Example BE - Implementation + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 - vector bool short + a - - vector bool char + + ???? - - - vupklsb r,a - + + ???? - - - vupkhsb r,a - + + ???? + + + ???? + + + DCB8 + + + A984 + + + 7652 + + + 4321 - vector signed short + unpack halfwords to words - - vector signed char + + DCB8 - - - vupklsb r,a - + + A984 - - - vupkhsb r,a - + + 7652 + + + 4321 - vector bool int + as bits - - vector bool short + + 1101110010111000 - - - vupklsh r,a - + + 1010100110000100 - - - vupkhsh r,a - + + 0111011001010010 + + + 0100001100100001 - vector signed int + as 1-5-5-5 - vector signed short + 1 - - - vupklsh r,a - + + 10111 - - - vupkhsh r,a - + + 00101 - - - vector unsigned int + 11000 - vector pixel + 1 - - - vupklpx r,a - + + 01010 - - - vupkhpx r,a - + + 01100 - - - vector bool long long + 00100 - vector bool int + 0 - - - vupklsw r,a - + + 11101 - - - vupkhsw r,a - + + 10010 - - - vector signed long long + 10010 - vector signed int + 0 - - - vupklsw r,a - + + 10000 - - - vupkhsw r,a - + + 11001 + + + 00001 - vector double + r - - vector float + + FF170518 - - - xxsldwi t,a,a,3 - xxsldwi u,a,t,2 - xvcvspdp r,u - + + FF0A0C04 - - - xxsldwi t,a,a,1 - xxsldwi u,t,a,3 - xvcvspdp r,u - + + 001D1212 + + + 00101901 - - - - - - - vec_unpackl - Vector Unpack Low - - r = vec_unpackl (a) - - - Purpose: - Unpacks the least-significant (“low”) half of a vector into a vector - with larger elements. + - Result value: If a is an integer vector, the value of each element - of r is the value of the corresponding - element of the least-significant half of a. - If a is a floating-point vector, - the value of each element of r is the - value of the corresponding element of the least-significant half of - a, widened to the result - precision. - If a is a pixel vector, the value - of each element of r is taken from the - corresponding element of the least-significant half of a as follows: - - - All bits in the first byte of the element of r are set to the value of the first bit of - the element of a. - - - The least-significant 5 bits of the second byte of the - element of r are set to the value - of the next 5 bits in the element of a. - - - The least-significant 5 bits of the third byte of the - element of r are set to the value - of the next 5 bits in the element of a. - - - The least-significant 5 bits of the fourth byte of the - element of r are set to the value - of the next 5 bits in the element of a. - - + Endian considerations: The "high" half of a vector with n elements is the first n/2 elements of the vector. For little