aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/qalu_mul.tst
diff options
context:
space:
mode:
authorPaul Cercueil2020-01-30 12:33:44 -0300
committerPaul Cercueil2020-02-08 11:44:52 -0300
commit4a71579b757d3a2eb6902c84391f429838ad4912 (patch)
treec57430315f1b82497eebd3fef24c0f4c0336bf0d /deps/lightning/check/qalu_mul.tst
parentea884d3029c673e06a4084156ceb662598d8945a (diff)
downloadpcsx_rearmed-4a71579b757d3a2eb6902c84391f429838ad4912.tar.gz
pcsx_rearmed-4a71579b757d3a2eb6902c84391f429838ad4912.tar.bz2
pcsx_rearmed-4a71579b757d3a2eb6902c84391f429838ad4912.zip
git subrepo clone https://git.savannah.gnu.org/git/lightning.git deps/lightning
subrepo: subdir: "deps/lightning" merged: "b0b8eb5" upstream: origin: "https://git.savannah.gnu.org/git/lightning.git" branch: "master" commit: "b0b8eb5" git-subrepo: version: "0.4.1" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "a04d8c2"
Diffstat (limited to 'deps/lightning/check/qalu_mul.tst')
-rw-r--r--deps/lightning/check/qalu_mul.tst31
1 files changed, 31 insertions, 0 deletions
diff --git a/deps/lightning/check/qalu_mul.tst b/deps/lightning/check/qalu_mul.tst
new file mode 100644
index 0000000..64b95a9
--- /dev/null
+++ b/deps/lightning/check/qalu_mul.tst
@@ -0,0 +1,31 @@
+#include "qalu.inc"
+
+.code
+ prolog
+#define QMUL(N, I0, I1, LO, HI) QALU(N, , qmul, I0, I1, LO, HI)
+#define UQMUL(N, I0, I1, LO, HI) QALU(N, _u, qmul, I0, I1, LO, HI)
+ QMUL(0, -2, -1, 2, 0)
+ QMUL(1, 0, -1, 0, 0)
+ QMUL(2, -1, 0, 0, 0)
+ QMUL(3, 1, -1, -1, -1)
+#if __WORDSIZE == 32
+ QMUL(4, 0x7ffff, 0x7ffff, 0xfff00001, 0x3f)
+ UQMUL(5, 0xffffff, 0xffffff, 0xfe000001, 0xffff)
+ QMUL(6, 0x80000000, -2, 0, 1)
+ QMUL(7, 0x80000000, 2, 0, -1)
+ QMUL(8, 0x80000001, 3, 0x80000003, -2)
+ QMUL(9, 0x80000001, -3, 0x7ffffffd, 1)
+#else
+ QMUL(4, 0x7ffffffff, 0x7ffffffff, 0xfffffff000000001, 0x3f)
+ UQMUL(5, 0xffffffffff, 0xffffffffff, 0xfffffe0000000001, 0xffff)
+ QMUL(6, 0x8000000000000000, -2, 0, 1)
+ QMUL(7, 0x8000000000000000, 2, 0, -1)
+ QMUL(8, 0x8000000000000001, 3, 0x8000000000000003, -2)
+ QMUL(9, 0x8000000000000001, -3, 0x7ffffffffffffffd, 1)
+#endif
+ prepare
+ pushargi ok
+ ellipsis
+ finishi @printf
+ ret
+ epilog