From: lkcl Date: Thu, 18 May 2023 14:01:19 +0000 (+0100) Subject: (no commit message) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9338323b55ecfb66557fe53d8aa6c32ce01215c0;p=libreriscv.git --- diff --git a/simple_v_extension/daxpy_example.mdwn b/simple_v_extension/daxpy_example.mdwn index 48a3c7aee..4e3163242 100644 --- a/simple_v_extension/daxpy_example.mdwn +++ b/simple_v_extension/daxpy_example.mdwn @@ -13,20 +13,20 @@ ``` - # r5: n - # r5: x - # r6: y - # fp1: a - mtctr 5 # move n to CTR - addi r10,r6,0 # copy y-ptr into r10 + # r5: n count + # r6: x ptr + # r7: y ptr + # fp1: a mul-scalar + mtctr 5 # move n to CTR + addi r10,r6,0 # copy y-ptr into r10 .L2 - setvl MAXVL=32,VL=CTR # could do more - sv.lfdup/els *32,8(6) # load from x - sv.lfdup/els *64,8(7) # load from y - sv.fmadd *64,*64,1,*32 # fmadd - stfdup/els *64,8(10) # store y-copy - sv.bc/ctr .L2 # decrement VL by CTR - blr # return + setvl MAXVL=32,VL=CTR # could do more + sv.lfdup/els *32,8(6) # load from x into fp32-63 + sv.lfdup/els *64,8(7) # load from y into fp64-95 + sv.fmadd *64,*64,1,*32 # (*y) = (*y) * (*x) + fp1 + stfdup/els *64,8(10) # store y-copy + sv.bc/ctr .L2 # decrement VL by CTR + blr # return ``` # RVV version