diff options
author | bd <bdunahu@operationnull.com> | 2025-05-10 22:45:24 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-10 22:45:24 -0400 |
commit | d1ef2e2171d660bac392c19bc0094c5e76c986f6 (patch) | |
tree | d5a3229f701873ce59f1c1e7ce6896a3f31568ca /input/adjacent-adder-vector.asm | |
parent | 2d1701842bff269de7c07010eb490eeb7ac6f06e (diff) |
Add initial vector tests
Diffstat (limited to 'input/adjacent-adder-vector.asm')
-rw-r--r-- | input/adjacent-adder-vector.asm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/input/adjacent-adder-vector.asm b/input/adjacent-adder-vector.asm new file mode 100644 index 0000000..80bc8a3 --- /dev/null +++ b/input/adjacent-adder-vector.asm @@ -0,0 +1,18 @@ +;;;;;;;; +;;; adds adjacent elements of a 4-element vector together, +;;; storing the result in place. Uses the vector type. + +.data + arr 1 2 3 4 + s 3 +.text + load $4 s($0) ; set the vector-length register + addi $5 $0 arr + loadv $16 0($5) + addi $5 $5 0x1 + loadv $17 0($6) + addv $16 $16 $17 + storev $16 arr($0) + nop + nop + nop |