From 453d38c649ff1fe47a8946441e86c430a93d46fb Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Mon, 4 May 2020 16:04:34 -0500 Subject: [PATCH] Add examples for vec_sum2s, vec_sum4s, vec_sums Fixes #26. Signed-off-by: Paul A. Clarke --- Intrinsics_Reference/ch_vec_reference.xml | 420 ++++++++++++++++++++++ 1 file changed, 420 insertions(+) diff --git a/Intrinsics_Reference/ch_vec_reference.xml b/Intrinsics_Reference/ch_vec_reference.xml index 387a029..71ae3b8 100644 --- a/Intrinsics_Reference/ch_vec_reference.xml +++ b/Intrinsics_Reference/ch_vec_reference.xml @@ -35164,6 +35164,100 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> role="bold">r contains the saturated sum of elements 2 and 3 of a and element 3 of b. + An example follows: + + + + + + + + + + + a + + + -2 + (FFFFFFFE) + + + -3 + (FFFFFFFD) + + + 7 + (00000007) + + + 15 + (0000000F) + + + + + b + + + 31 + (0000001F) + + + -61 + (FFFFFFC3) + + + 121 + (000000F0) + + + 2147483647 + (7FFFFFFF) + (MAXINT) + + + + + calculation + + + 0 + + + -2 + -3 + -61 + + + 0 + + + 7 + 15 + 2147483647 + + + + + r + + + 00000000 + + + -66 + (FFFFFFBE) + + + 00000000 + + + 2147483647 + (7FFFFFFF) + (saturated) + + + + + + + Endian considerations: The element numbering within a register is left-to-right for big-endian targets, and right-to-left for little-endian targets. @@ -35286,6 +35380,246 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + An example for input a + of type vector unsigned char follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + a + + + 01 + + + 03 + + + 07 + + + 0F + + + FF + + + EE + + + BB + + + 66 + + + 11 + + + 22 + + + 44 + + + 88 + + + 00 + + + 00 + + + 00 + + + 01 + + + + + sum across + + + 0000001A + + + 0000030E + + + 000000FF + + + 00000001 + + + + + b + + + 0000FF00 + + + 10203040 + + + 0000FFFF + + + FFFFFFFF + + + + + r + + + 0000FF1A + + + 1020334E + + + 000100FE + + + FFFFFFFF + (saturated) + + + + + + + + An example for input a + of type vector signed short follows: + + + + + + + + + + + + + + + + + + + a + + + FFFF + + + FFFE + + + 7FFF + + + 7FFE + + + 0124 + + + 4210 + + + FFFE + + + 0001 + + + + + sum across + + + FFFFFFFD + + + 0000FFFD + + + 00004334 + + + FFFFFFFF + + + + + b + + + 00000003 + + + 12340000 + + + 7FFFFF00 + + + FFFFFFFF + + + + + r + + + 00000000 + + + 1234FFFD + + + 7FFFFFFF + (saturated) + + + FFFFFFFE + + + + + + + Endian considerations: None. @@ -35405,6 +35739,92 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> of r are 0. Element 3 is the saturated sum of all the elements of a and element 3 of b. + An example follows: + + + + + + + + + + + + a + + + 00000001 + + + 00000003 + + + 00000007 + + + 0000000F + + + + + sum across + + + 00000000 + + + 00000000 + + + 00000000 + + + 0000001A + + + + + b + + + ???????? + (ignored) + + + ???????? + (ignored) + + + ???????? + (ignored) + + + 87654321 + + + + + r + + + 00000000 + + + 00000000 + + + 00000000 + + + 8765433B + + + + + + + Endian considerations: The element numbering within a register is left-to-right for big-endian targets, and right-to-left for little-endian targets.