summaryrefslogtreecommitdiff
path: root/test/masm/fpe.asm
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-01 18:22:10 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-01 18:22:10 -0400
commit091c684bf1d2cca09da001b9170b205dbe5c333f (patch)
treee7dd5091ddb989b1eae35f8a5130a66b2d7b4d9b /test/masm/fpe.asm
parentdont hardcode RA in JALR (diff)
downloadmips-091c684bf1d2cca09da001b9170b205dbe5c333f.tar.gz
mips-091c684bf1d2cca09da001b9170b205dbe5c333f.tar.bz2
mips-091c684bf1d2cca09da001b9170b205dbe5c333f.zip
add recursion test, add noops for branch delay slots
Diffstat (limited to 'test/masm/fpe.asm')
-rw-r--r--test/masm/fpe.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/masm/fpe.asm b/test/masm/fpe.asm
new file mode 100644
index 0000000..a3725d5
--- /dev/null
+++ b/test/masm/fpe.asm
@@ -0,0 +1,18 @@
+# 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
+ nop