summaryrefslogtreecommitdiff
path: root/input/vector_fun.asm
diff options
context:
space:
mode:
Diffstat (limited to 'input/vector_fun.asm')
-rw-r--r--input/vector_fun.asm23
1 files changed, 23 insertions, 0 deletions
diff --git a/input/vector_fun.asm b/input/vector_fun.asm
new file mode 100644
index 0000000..eed38ce
--- /dev/null
+++ b/input/vector_fun.asm
@@ -0,0 +1,23 @@
+;;;;;;;;
+;;; tests the ALU vector extension
+
+.data
+ s 4
+.text
+ load $4 s($0) ; set the vector length register
+
+LOOP:
+ cev $17 $16
+ beq END
+
+ addv $17 $16 $17
+ addv $17 $16 $17
+ mulv $17 $17 $17
+ subv $17 $17 $16
+ subv $17 $17 $16
+ subv $17 $17 $16
+ jrl LOOP
+END:
+ nop
+ nop
+ nop