aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/mips64r5900-elf/f-abs.s
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/mips64r5900-elf/f-abs.s')
-rw-r--r--sim/testsuite/mips64r5900-elf/f-abs.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/sim/testsuite/mips64r5900-elf/f-abs.s b/sim/testsuite/mips64r5900-elf/f-abs.s
new file mode 100644
index 0000000..289849f
--- /dev/null
+++ b/sim/testsuite/mips64r5900-elf/f-abs.s
@@ -0,0 +1,18 @@
+.include "t-macros.i"
+
+ start
+
+test_abs1:
+ clearfcsr
+ loadfp $f1 4.0
+ abs.s $f2, $f1
+ checkfp 0 $f2 4.0
+
+test_abs2:
+ clearfcsr
+ loadfp $f1 4.0
+ neg.s $f1, $f1
+ abs.s $f2, $f1
+ checkfp 0 $f2 4.0
+
+ exit0