aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/3to2.tst
diff options
context:
space:
mode:
authorTwinaphex2020-02-08 16:24:22 +0100
committerGitHub2020-02-08 16:24:22 +0100
commit0adc619b5a5705d16cc6caea64951776ababbb96 (patch)
treefbae9b1d18d04d8e7908aa1c3446782ebf6e8785 /deps/lightning/check/3to2.tst
parent0204c39a68a1fd4bf667aa8ece5a769f2983b7d0 (diff)
parent6f1edc3c7fd1f7f58155107d0c99d0ac7d22443b (diff)
downloadpcsx_rearmed-0adc619b5a5705d16cc6caea64951776ababbb96.tar.gz
pcsx_rearmed-0adc619b5a5705d16cc6caea64951776ababbb96.tar.bz2
pcsx_rearmed-0adc619b5a5705d16cc6caea64951776ababbb96.zip
Merge pull request #377 from pcercuei/libretro
Lightrec dynarec
Diffstat (limited to 'deps/lightning/check/3to2.tst')
-rw-r--r--deps/lightning/check/3to2.tst118
1 files changed, 118 insertions, 0 deletions
diff --git a/deps/lightning/check/3to2.tst b/deps/lightning/check/3to2.tst
new file mode 100644
index 0000000..563cf85
--- /dev/null
+++ b/deps/lightning/check/3to2.tst
@@ -0,0 +1,118 @@
+.data 32
+dfmt:
+.c "%1.0f\n"
+ifmt:
+.c "%d\n"
+
+.code
+ jmpi main
+
+#define def_test_double(a, b, c) \
+ name test_double_##a##_##b##_##c \
+test_double_##a##_##b##_##c: \
+ prolog \
+ arg_d $d0 \
+ arg_d $d1 \
+ getarg_d %b $d0 \
+ getarg_d %c $d1 \
+ subr_d %a %b %c \
+ retr_d %a \
+ epilog
+#define test_double(a, b, c, x, y) \
+ prepare \
+ pushargi_d x \
+ pushargi_d y \
+ finishi test_double_##a##_##b##_##c \
+ retval_d %f0 \
+ prepare \
+ pushargi dfmt \
+ ellipsis \
+ pushargr_d %f0 \
+ finishi @printf
+
+#define def_test_int(a, b, c) \
+ name test_int_##a##_##b##_##c \
+test_int_##a##_##b##_##c: \
+ prolog \
+ arg $i0 \
+ arg $i1 \
+ getarg %b $i0 \
+ getarg %c $i1 \
+ subr %a %b %c \
+ retr %a \
+ epilog
+#define test_int(a, b, c, x, y) \
+ prepare \
+ pushargi x \
+ pushargi y \
+ finishi test_int_##a##_##b##_##c \
+ retval %r0 \
+ prepare \
+ pushargi ifmt \
+ ellipsis \
+ pushargr %r0 \
+ finishi @printf
+
+def_test_double(f0, f0, f0)
+def_test_double(f0, f0, f1)
+def_test_double(f0, f1, f0)
+def_test_double(f0, f1, f2)
+
+def_test_double(f3, f3, f3)
+def_test_double(f3, f3, f1)
+def_test_double(f3, f1, f3)
+def_test_double(f3, f1, f2)
+
+def_test_double(f3, f0, f0)
+def_test_double(f3, f0, f3)
+def_test_double(f3, f3, f0)
+
+def_test_int(r0, r0, r0)
+def_test_int(r0, r0, r1)
+def_test_int(r0, r1, r0)
+def_test_int(r0, r1, r2)
+
+def_test_int(v0, v0, v0)
+def_test_int(v0, v0, r1)
+def_test_int(v0, r1, v0)
+def_test_int(v0, r1, r2)
+
+def_test_int(v0, r0, r0)
+def_test_int(v0, r0, v0)
+def_test_int(v0, v0, r0)
+
+
+ name main
+main:
+ prolog
+
+ test_double(f0, f0, f0, 3.0, 2.0)
+ test_double(f0, f0, f1, 3.0, 2.0)
+ test_double(f0, f1, f0, 3.0, 2.0)
+ test_double(f0, f1, f2, 3.0, 2.0)
+
+ test_double(f3, f3, f3, 3.0, 2.0)
+ test_double(f3, f3, f1, 3.0, 2.0)
+ test_double(f3, f1, f3, 3.0, 2.0)
+ test_double(f3, f1, f2, 3.0, 2.0)
+
+ test_double(f3, f0, f0, 3.0, 2.0)
+ test_double(f3, f0, f3, 3.0, 2.0)
+ test_double(f3, f3, f0, 3.0, 2.0)
+
+ test_int(r0, r0, r0, 3, 2)
+ test_int(r0, r0, r1, 3, 2)
+ test_int(r0, r1, r0, 3, 2)
+ test_int(r0, r1, r2, 3, 2)
+
+ test_int(v0, v0, v0, 3, 2)
+ test_int(v0, v0, r1, 3, 2)
+ test_int(v0, r1, v0, 3, 2)
+ test_int(v0, r1, r2, 3, 2)
+
+ test_int(v0, r0, r0, 3, 2)
+ test_int(v0, r0, v0, 3, 2)
+ test_int(v0, v0, r0, 3, 2)
+
+ ret
+ epilog