From 6c16b245dd5458ffadc0180f18b9b1b8c0f842cf Mon Sep 17 00:00:00 2001 From: "cand@51b69dee28eeccfe0f04790433b843689895c6e3" Date: Thu, 10 Dec 2020 17:59:18 +0000 Subject: [PATCH] VSX overview, part 1 --- openpower/sv/av_opcodes.mdwn | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/openpower/sv/av_opcodes.mdwn b/openpower/sv/av_opcodes.mdwn index e21a388c1..478f087c0 100644 --- a/openpower/sv/av_opcodes.mdwn +++ b/openpower/sv/av_opcodes.mdwn @@ -40,34 +40,21 @@ TODO # VSX SIMD -## vpkpx +Useful parts of VSX, and how they might map. -vpkpx is a 32-bit to 16-bit 8888 into 1555 conversion +## vpks[\*][\*]s (vec_pack*) -SV notes: +signed and unsigned, these are N-to-M (N=64/32/16, M=32/16/8) chop/clamp/sign/zero-extend operations. May be implemented by a clamped move to a smaller elwidth. -a single 32-bit to 16-bit operation should suffice, fitting cleanly into one single scalar op: - - dest[0] = src[7] - dest[1 : 5] = src[8 :12] - dest[6 :10] = src[16:20] - dest[11:15] = src[24:28] - -## vpks[\*][\*]s - -signed and unsigned, these are N-to-M (N=64/32/16, M=32/16/8) chop/clamp/sign/zero-extend operations +The other direction, vec_unpack widening ops, may need some way to tell whether to sign-extend or zero-extend. -## vupkhpx / vupklpx - -these are 16-bit to 32-bit 1555 to 8888 conversion - -## vavgs\* +## vavgs\* (vec_avg) signed and unsigned, 8/16/32: these are all of the form: result = truncate((a + b + 1) >> 1)) -## vabsdu\* +## vabsdu\* (vec_abs) unsigned 8/16/32: these are all of the form: -- 2.30.2