From 79b5466581abeb795a2dc8766c27510ab9efa846 Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Fri, 8 May 2020 05:30:48 -0500 Subject: [PATCH 1/2] Add headers for new examples In the absence of sufficient context, the new examples added to: - vec_double{e,h,l,o} - vec_permxor - vec_pmsum_be - vec_slv - vec_srv - vec_sum2s - vec_sum4s - vec_sums - vec_unsigned{e,o} may appear to be strictly big-endian. Add headers to these examples showing the element indicies, which hopefully provides sufficient context. Fixes #44. Signed-off-by: Paul A. Clarke --- Intrinsics_Reference/ch_vec_reference.xml | 533 ++++++++++++++++++++++ 1 file changed, 533 insertions(+) diff --git a/Intrinsics_Reference/ch_vec_reference.xml b/Intrinsics_Reference/ch_vec_reference.xml index 2e5fa1c..f07047b 100644 --- a/Intrinsics_Reference/ch_vec_reference.xml +++ b/Intrinsics_Reference/ch_vec_reference.xml @@ -11638,6 +11638,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -11835,6 +11865,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -12038,6 +12098,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -12241,6 +12331,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -25074,6 +25194,61 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + @@ -25670,6 +25845,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -30541,6 +30746,61 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + @@ -32959,6 +33219,61 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + @@ -35600,6 +35915,25 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -35833,6 +36167,78 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + @@ -35961,6 +36367,54 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + + + halfword index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + @@ -36176,6 +36630,25 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -37359,6 +37832,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + @@ -37496,6 +37999,36 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + + + + doubleword index + + + 0 + + + 1 + + + + + word index + + + 0 + + + 1 + + + 2 + + + 3 + + + -- 2.34.1 From 5a8fd0ce7f05ce57f1ac8446cf0053b70b22056d Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Thu, 7 May 2020 20:31:16 -0500 Subject: [PATCH 2/2] Add example for vec_bperm vec_bperm is a challenge for showing an example using just tables, but I've made an attempt. Three tables are used: - The values of the input vectors *a* and *b*. - A zoomed in view of the last two bytes of *a* and the bit manipulations therein that leads to the intermediate result. - The result vector *r*. Only one example has been provided, but it's getting big. Fixes #14. Signed-off-by: Paul A. Clarke --- Intrinsics_Reference/ch_vec_reference.xml | 547 ++++++++++++++++++++++ 1 file changed, 547 insertions(+) diff --git a/Intrinsics_Reference/ch_vec_reference.xml b/Intrinsics_Reference/ch_vec_reference.xml index 2e5fa1c..f8e6822 100644 --- a/Intrinsics_Reference/ch_vec_reference.xml +++ b/Intrinsics_Reference/ch_vec_reference.xml @@ -7941,6 +7941,553 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> + An example for input a + of type vector unsigned char follows: + + + + + + + + + + + + + + + + + + + + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + + + + + a + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + FF + + + A9 + + + + + b + + + 7F + + + 7E + + + 7D + + + 7C + + + 7B + + + 7A + + + 79 + + + 78 + + + 77 + + + 76 + + + 75 + + + 74 + + + 73 + + + 72 + + + 71 + + + 70 + + + + + + Zoom in to view just the two bytes in a + ([14..15]) containing the bits referenced by the bit indices + b[i] + + + (0 ≤ i < 16), + + + ([7F..70]): + + + + + + + + + + + + + + + + + + + + + + + + + byte index + + + 14 + + + 15 + + + + + bit index + + + 70 + + + 71 + + + 72 + + + 73 + + + 74 + + + 75 + + + 76 + + + 77 + + + 78 + + + 79 + + + 7A + + + 7B + + + 7C + + + 7D + + + 7E + + + 7F + + + + + + + a + + + FF + + + A9 + + + + + bit abit index + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + 1 + + + 0 + + + 1 + + + 0 + + + 0 + + + 1 + + + + + bit ab[i] + + + 1 + + + 0 + + + 0 + + + 1 + + + 0 + + + 1 + + + 0 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + intermediate result + + + 95 + + + FF + + + + + + + + + + + + + + + + + + + + + + + + + + + + byte index + + + 0 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + + + + + r + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + 95 + + + FF + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + 00 + + + + + + + Endian considerations: All bit and byte numberings within each element in the above description denote big-endian (i.e., left-to-right) order, -- 2.34.1