y[i] = a*x[i] + y[i];
}
}
+```
+
+-----
-
+```
# SVP64 Power ISA version
# r5: n
# r5: x
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}
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