STREAMS 2
TYPE DOUBLE
FLOPS 2
BYTES 24

.set vec0,0; .set vec1,1; .set vec2,2; .set vec3,3;
.set vec4,4; .set vec5,5; .set vec6,6; .set vec7,7;
.set vec8,8; .set vec9,9; .set vec10,10; .set vec11,11;

li r7, 0            # load immediate value of 0 into r7 (used as offset in addressing)
li r8, 16           # load immediate value of 16 into r8 (used as offset in addressing)
li r9, 32           # load immediate value of 32 into r9 (used as offset in addressing)
li r10, 48          # load immediate value of 48 into r10 (used as offset in addressing)

xvsubdp vec0, vec0, vec0    # set to zero
xvsubdp vec1, vec1, vec1    # set to zero
xvsubdp vec2, vec2, vec2    # set to zero
xvsubdp vec3, vec3, vec3    # set to zero

LOOP 8

lxvx vec4, STR0, r7
lxvx vec5, STR1, r7

lxvx vec6, STR0, r8
lxvx vec7, STR1, r8

lxvx vec8, STR0, r9
lxvx vec9, STR1, r9

lxvx vec10, STR0, r10
lxvx vec11, STR1, r10

# NB: Not a real DAXPY but same instruction mix (we're multiplying x and y)
xvmaddadp vec0, vec4, vec5
xvmaddadp vec1, vec6, vec7
xvmaddadp vec2, vec8, vec9
xvmaddadp vec3, vec10, vec11

stxvx vec0, STR0, r7
stxvx vec1, STR0, r8
stxvx vec2, STR0, r9
stxvx vec3, STR0, r10

addi STR0, STR0, 64
addi STR1, STR1, 64
