Browse Source

Add some fpu tests

Fabian 3 years ago
parent
commit
3e3ca2b556
4 changed files with 41 additions and 0 deletions
  1. 8 0
      tests/nasm/fchs.asm
  2. 9 0
      tests/nasm/fdiv.asm
  3. 9 0
      tests/nasm/fdivr.asm
  4. 15 0
      tests/nasm/fstm80.asm

+ 8 - 0
tests/nasm/fchs.asm

@@ -0,0 +1,8 @@
+global _start
+
+%include "header.inc"
+
+    fldz
+    fchs
+
+%include "footer.inc"

+ 9 - 0
tests/nasm/fdiv.asm

@@ -0,0 +1,9 @@
+global _start
+
+%include "header.inc"
+
+    fldz
+    fldz
+    fdiv
+
+%include "footer.inc"

+ 9 - 0
tests/nasm/fdivr.asm

@@ -0,0 +1,9 @@
+global _start
+
+%include "header.inc"
+
+    fldz
+    fldz
+    fdivr
+
+%include "footer.inc"

+ 15 - 0
tests/nasm/fstm80.asm

@@ -0,0 +1,15 @@
+global _start
+
+%include "header.inc"
+
+    fstcw [esp]
+    and word [esp], ~0x300
+    or word [esp], 0x200
+    fldcw [esp]
+
+    fldpi
+    fld1
+    fmul
+    fstp tword [esp]
+
+%include "footer.inc"