aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/alu_com.tst
blob: 581c9405051ec578b01987779207e26769b98427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "alu.inc"

.code
	prolog

#define COM(N, I0, V)		UN(N, com, I0, V)

#if __WORDSIZE == 32
	COM(0,	0,			0xffffffff)
	COM(1,	1,			0xfffffffe)
	COM(2,	0xffffffff,		0)
	COM(3,	0x80000000,		0x7fffffff)
	COM(4,	0x7fffffff,		0x80000000)
	COM(5,	0x80000001,		0x7ffffffe)
#else
	COM(0,	0,			0xffffffffffffffff)
	COM(1,	1,			0xfffffffffffffffe)
	COM(2,	0xffffffff,		0xffffffff00000000)
	COM(3,	0x80000000,		0xffffffff7fffffff)
	COM(4,	0x7fffffff,		0xffffffff80000000)
	COM(5,	0x80000001,		0xffffffff7ffffffe)
	COM(6,	0xffffffffffffffff,	0)
	COM(7,	0x8000000000000000,	0x7fffffffffffffff)
	COM(8,	0x7fffffffffffffff,	0x8000000000000000)
	COM(9,	0x8000000000000001,	0x7ffffffffffffffe)
#endif

	prepare
		pushargi ok
		ellipsis
	finishi @printf
	ret
	epilog