From bf4a415cacc72765ec046d4e022a7166cd00a5a5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 5 Jun 2018 01:04:51 +0100 Subject: [PATCH] clarify --- simple_v_extension/simple_v_chennai_2018.tex | 26 +++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/simple_v_extension/simple_v_chennai_2018.tex b/simple_v_extension/simple_v_chennai_2018.tex index a2c45ce6f..efa36cabd 100644 --- a/simple_v_extension/simple_v_chennai_2018.tex +++ b/simple_v_extension/simple_v_chennai_2018.tex @@ -473,7 +473,7 @@ for (i = 0; i < 16; i++) // 16 CSRs? \frametitle{ADD pseudocode with redirection, this time} \begin{semiverbatim} -function op\_add(rd, rs1, rs2, predr) # add not VADD! +function op\_add(rd, rs1, rs2) # add not VADD!  int i, id=0, irs1=0, irs2=0;  rd = int\_vec[rd ].isvector ? int\_vec[rd ].regidx : rd;  rs1 = int\_vec[rs1].isvector ? int\_vec[rs1].regidx : rs1; @@ -514,6 +514,30 @@ function op\_add(rd, rs1, rs2, predr) # add not VADD! } +\begin{frame}[fragile] +\frametitle{MV pseudocode with predication} + +\begin{semiverbatim} +function op\_mv(rd, rs) # MV not VMV! +  rd = int\_vec[rd].isvector ? int\_vec[rd].regidx : rd; +  rs = int\_vec[rs].isvector ? int\_vec[rs].regidx : rs; +  ps = get\_pred\_val(FALSE, rs); # predication on src +  pd = get\_pred\_val(FALSE, rd); # ... AND on dest +  for (int i = 0, int j = 0; i < VL && j < VL;): + if (int\_vec[rs].isvec) while (!(ps \& 1<