From 03a47df9f8d16910a3ab6375417d0a800f0d1915 Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 8 Dec 2020 19:06:00 +0000 Subject: [PATCH] --- openpower/sv/av_opcodes.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openpower/sv/av_opcodes.mdwn b/openpower/sv/av_opcodes.mdwn index 1e6539ed9..454daa27a 100644 --- a/openpower/sv/av_opcodes.mdwn +++ b/openpower/sv/av_opcodes.mdwn @@ -20,7 +20,14 @@ Thus for example, where OpenPOWER VSX has vpkswss, this would be achieved in SV * 2nd op, swizzle-select vec2 "select Y only" from source to dest dest.Y = extclamp(src.Y) -Macro-op fusion may be used to detect that these two interleave cleanly. +Macro-op fusion may be used to detect that these two interleave cleanly, overlapping the vec2.X with vec2.Y to produce a single vec2.XY operation. + +## Scalar element operations + +* clamping / saturation for signed and unsigned. best done similar to FP rounding modes, i.e. with an SPR. +* average-add. result = (src1 + src2 + 1) >> 1 +* abs-diff: result = (src1 > src2) ? (src1-src2) : (src2-src1) +* signed min/max # Video -- 2.30.2