From faa092419bf07a5dcee136806351dc0e35ed253e Mon Sep 17 00:00:00 2001 From: lkcl Date: Fri, 12 Aug 2022 03:01:40 +0100 Subject: [PATCH] --- openpower/sv/ldst.mdwn | 201 +++++++++++++++++++++-------------------- 1 file changed, 105 insertions(+), 96 deletions(-) diff --git a/openpower/sv/ldst.mdwn b/openpower/sv/ldst.mdwn index 1cfb037c8..919bc5714 100644 --- a/openpower/sv/ldst.mdwn +++ b/openpower/sv/ldst.mdwn @@ -49,99 +49,6 @@ as well as Element-width overrides and Twin-Predication. *Despite being constructed from Scalar LD/ST none of these Modes exist or make sense in any Scalar ISA. They **only** exist in Vector ISAs* -# Vectorisation of Scalar Power ISA v3.0B - -OpenPOWER Load/Store operations may be seen from [[isa/fixedload]] and -[[isa/fixedstore]] pseudocode to be of the form: - - lbux RT, RA, RB - EA <- (RA) + (RB) - RT <- MEM(EA) - -and for immediate variants: - - lb RT,D(RA) - EA <- RA + EXTS(D) - RT <- MEM(EA) - -Thus in the first example, the source registers may each be independently -marked as scalar or vector, and likewise the destination; in the second -example only the one source and one dest may be marked as scalar or -vector. - -Thus we can see that Vector Indexed may be covered, and, as demonstrated -with the pseudocode below, the immediate can be used to give unit stride or element stride. With there being no way to tell which from the OpenPOWER v3.0B Scalar opcode alone, the choice is provided instead by the SV Context. - - # LD not VLD! format - ldop RT, immed(RA) - # op_width: lb=1, lh=2, lw=4, ld=8 - op_load(RT, RA, op_width, immed, svctx, RAupdate): -  ps = get_pred_val(FALSE, RA); # predication on src -  pd = get_pred_val(FALSE, RT); # ... AND on dest -  for (i=0, j=0, u=0; i < VL && j < VL;): - # skip nonpredicates elements - if (RA.isvec) while (!(ps & 1< -- 2.30.2