From e6f25974e0357a56034671d65b3eb025f2a9ba64 Mon Sep 17 00:00:00 2001 From: lkcl Date: Fri, 14 Apr 2023 16:15:28 +0100 Subject: [PATCH] --- simple_v_extension/daxpy_example.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- 2.30.2