From: lkcl Date: Fri, 14 Apr 2023 15:15:28 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls008_v1~19 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6f25974e0357a56034671d65b3eb025f2a9ba64;p=libreriscv.git --- diff --git a/simple_v_extension/daxpy_example.mdwn b/simple_v_extension/daxpy_example.mdwn index 64f3dc9d9..183a3b1a7 100644 --- a/simple_v_extension/daxpy_example.mdwn +++ b/simple_v_extension/daxpy_example.mdwn @@ -6,8 +6,11 @@ y[i] = a*x[i] + y[i]; } } +``` + +----- - +``` # SVP64 Power ISA version # r5: n # r5: x @@ -23,7 +26,11 @@ stfdup/els *64,8(10) # store y-copy sv.bc/ctr .L2 # decrement VL by CTR blr # return +``` + +----- +``` # SV Version # a0 is n, a1 is ptr to x[0], a2 is ptr to y[0], fa0 is a (scalar) VBLK.REG[0] = {type: F, isvec: 1, regkey: a3, regidx: a3, elwidth: dflt} @@ -40,7 +47,11 @@ c.add a2, a2, t1 # increment pointer to y by vl*8 c.bnez a0, loop # repeat if n != 0 c.ret # return +``` + +----- +``` # RVV version # a0 is n, a1 is pointer to x[0], a2 is pointer to y[0], fa0 is a li t0, 2<<25