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/alux_add.tst | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 deps/lightning/check/alux_add.tst (limited to 'deps/lightning/check/alux_add.tst') diff --git a/deps/lightning/check/alux_add.tst b/deps/lightning/check/alux_add.tst new file mode 100644 index 0000000..ddc4e57 --- /dev/null +++ b/deps/lightning/check/alux_add.tst @@ -0,0 +1,49 @@ +#include "alu.inc" + +.code + prolog + +#define ADDX(N, I0, I1, V) ALUX(N, add, I0, I1, V) + + /* nothing */ + ADDX(0, 0, 0, 0) +#if __WORDSIZE == 32 + /* carry */ + ADDX(1, 0xffffffff, 0xffffffff, 1) + /* overflow */ + ADDX(2, 0x7fffffff, 1, 0) + /* overflow */ + ADDX(3, 0x7fffffff, 0x7fffffff, 0) + /* carry */ + ADDX(4, 0x7fffffff, 0x80000000, 0) + /* carry+overflow */ + ADDX(5, 0x80000000, 0x80000000, 1) +#else + /* nothing */ + ADDX(1, 0xffffffff, 0xffffffff, 0) + /* nothing */ + ADDX(2, 0x7fffffff, 1, 0) + /* nothing */ + ADDX(3, 0x7fffffff, 0x7fffffff, 0) + /* nothing */ + ADDX(4, 0x7fffffff, 0x80000000, 0) + /* nothing */ + ADDX(5, 0x80000000, 0x80000000, 0) + /* carry */ + ADDX(6, 0xffffffffffffffff, 0xffffffffffffffff, 1) + /* overflow */ + ADDX(7, 0x7fffffffffffffff, 1, 0) + /* overflow */ + ADDX(8, 0x7fffffffffffffff, 0x7fffffffffffffff, 0) + /* overflow */ + ADDX(9, 0x7fffffffffffffff, 0x8000000000000000, 0) + /* carry+overflow */ + ADDX(10,0x8000000000000000, 0x8000000000000000, 1) +#endif + + prepare + pushargi ok + ellipsis + finishi @printf + ret + epilog -- cgit v1.2.3