From 2ad33eb27a0717e99c3502794e16f947a758532c Mon Sep 17 00:00:00 2001 From: lkcl Date: Thu, 18 May 2023 15:49:50 +0100 Subject: [PATCH] --- simple_v_extension/daxpy_example.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/simple_v_extension/daxpy_example.mdwn b/simple_v_extension/daxpy_example.mdwn index e9cacf006..2958be486 100644 --- a/simple_v_extension/daxpy_example.mdwn +++ b/simple_v_extension/daxpy_example.mdwn @@ -11,6 +11,9 @@ # SVP64 Power ISA version +Summary: 9 instructions (see below, 8 instructions) 5 of which are 64-bit +for a total of 14 "words". + ``` # r5: n count # r6: x ptr @@ -25,7 +28,7 @@ 7 sv.fmadd *64,*64,1,*32 # (*y) = (*y) * (*x) + fp1 8 sv.stfdup *64,8(10) # store at y-copy, inc y' 9 sv.bc/ctr .L2 # decrement CTR by VL - blr # return + 10 blr # return ``` A refinement, reducing 1 instruction and register port usage. @@ -50,6 +53,8 @@ in memory, and critically relies on y overwrite. # RVV version +Summary: 12 instructions, 7 32-bit and 5 16-bit for a total of 9.5 "words" + ``` # 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