summaryrefslogtreecommitdiff
path: root/test/masm/div.asm
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-09-30 18:50:22 -0400
committerFreya Murphy <freya@freyacat.org>2024-09-30 18:50:22 -0400
commitc250afa7a0a9fe003196aded1a0749ed440481a3 (patch)
tree25fde1682fbc50055d70869802a2822c404749a7 /test/masm/div.asm
parentupdate tests (diff)
downloadmips-c250afa7a0a9fe003196aded1a0749ed440481a3.tar.gz
mips-c250afa7a0a9fe003196aded1a0749ed440481a3.tar.bz2
mips-c250afa7a0a9fe003196aded1a0749ed440481a3.zip
update testing
Diffstat (limited to 'test/masm/div.asm')
-rw-r--r--test/masm/div.asm17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/masm/div.asm b/test/masm/div.asm
new file mode 100644
index 0000000..b9b4f3f
--- /dev/null
+++ b/test/masm/div.asm
@@ -0,0 +1,17 @@
+# Copyright (c) 2024 Freya Murphy
+
+# file: div.asm
+# test: should cause floting point exception
+
+.text
+.align 2
+.globl main
+
+main:
+ # divide by zero
+ li $t0, 0
+ div $t0, $t0, $t0
+
+ # return
+ li $v0, 0
+ jr $ra