From 650e9833c095af62055a74ca981f42204083c6f3 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 23 Dec 2020 21:16:49 +0000 Subject: [PATCH] --- openpower/sv/svp_rewrite/svp64.mdwn | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/openpower/sv/svp_rewrite/svp64.mdwn b/openpower/sv/svp_rewrite/svp64.mdwn index d86c4c8c7..44fc71675 100644 --- a/openpower/sv/svp_rewrite/svp64.mdwn +++ b/openpower/sv/svp_rewrite/svp64.mdwn @@ -919,6 +919,47 @@ Vectorised (mtspr, bc, dcbz, twi) TODO generate table which will be here [[svp64/reg_profiles]] +## SV pseudocode illilustration + +### Single-predicated Instruction + +illustration of normal mode add operation: zeroing nit included, elwidth overrides not included. + + function op_add(rd, rs1, rs2) # add not VADD! + int i, id=0, irs1=0, irs2=0; + predval = get_pred_val(FALSE, rd); + rd = int_vec[rd ].isvector ? int_vec[rd ].regidx : rd; + rs1 = int_vec[rs1].isvector ? int_vec[rs1].regidx : rs1; + rs2 = int_vec[rs2].isvector ? int_vec[rs2].regidx : rs2; + for (i = 0; i < VL; i++) + STATE.srcoffs = i # save context + if (predval & 1< + ## Assembly Annotation Assembly code annotation is required for SV to be able to successfully -- 2.30.2