summaryrefslogtreecommitdiffstats
path: root/tcg/README
diff options
context:
space:
mode:
authorRichard Henderson2019-04-30 22:01:12 +0200
committerRichard Henderson2019-05-22 21:09:43 +0200
commitf75da2988eb2457fa23d006d573220c5c680ec4e (patch)
treeb6192d1d40e1627a67a6dfc6f205ea5dfb1edd81 /tcg/README
parenttcg: Add support for vector bitwise select (diff)
downloadqemu-f75da2988eb2457fa23d006d573220c5c680ec4e.tar.gz
qemu-f75da2988eb2457fa23d006d573220c5c680ec4e.tar.xz
qemu-f75da2988eb2457fa23d006d573220c5c680ec4e.zip
tcg: Add support for vector compare select
Perform a per-element conditional move. This combination operation is easier to implement on some host vector units than plain cmp+bitsel. Omit the usual gvec interface, as this is intended to be used by target-specific gvec expansion call-backs. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/README')
-rw-r--r--tcg/README7
1 files changed, 7 insertions, 0 deletions
diff --git a/tcg/README b/tcg/README
index 76057ab59f..21fcdf737f 100644
--- a/tcg/README
+++ b/tcg/README
@@ -631,6 +631,13 @@ E.g. VECL=1 -> 64 << 1 -> v128, and VECE=2 -> 1 << 2 -> i32.
Bitwise select, v0 = (v2 & v1) | (v3 & ~v1), across the entire vector.
+* cmpsel_vec v0, c1, c2, v3, v4, cond
+
+ Select elements based on comparison results:
+ for (i = 0; i < n; ++i) {
+ v0[i] = (c1[i] cond c2[i]) ? v3[i] : v4[i].
+ }
+
*********
Note 1: Some shortcuts are defined when the last operand is known to be