From 4a71579b757d3a2eb6902c84391f429838ad4912 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 30 Jan 2020 12:33:44 -0300 Subject: 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" --- deps/lightning/check/qalu_mul.tst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 deps/lightning/check/qalu_mul.tst (limited to 'deps/lightning/check/qalu_mul.tst') 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 -- cgit v1.2.3