aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/alu_or.tst
blob: 1e55a86ad7ac767b1bc5bba8e78a28b0da64d9e1 (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
34
35
36
#include "alu.inc"

.code
	prolog

#define OR(N, I0, I1, V)	ALU(N, , or, I0, I1, V)

	OR(0,	0x7fffffff, 1,		0x7fffffff)
	OR(1,	1,	    0x7fffffff, 0x7fffffff)
	OR(2,	0x80000000, 1,		0x80000001)
	OR(3,	1,	    0x80000000, 0x80000001)
	OR(4,	0x7fffffff, 0x80000000, 0xffffffff)
	OR(5,	0x80000000, 0x7fffffff, 0xffffffff)
	OR(6,	0x7fffffff, 0xffffffff, 0xffffffff)
	OR(7,	0xffffffff, 0x7fffffff, 0xffffffff)
	OR(8,	0xffffffff, 0xffffffff, 0xffffffff)
	OR(9,	0x7fffffff, 0,		0x7fffffff)
	OR(10,	0,	    0x7fffffff,	0x7fffffff)
#if __WORDSIZE == 64
	OR(11,	0x7fffffffffffffff, 1,			0x7fffffffffffffff)
	OR(12,	1,		    0x7fffffffffffffff,	0x7fffffffffffffff)
	OR(13,	0x8000000000000000, 1,			0x8000000000000001)
	OR(14,	1,		    0x8000000000000000,	0x8000000000000001)
	OR(15,	0x7fffffffffffffff, 0x8000000000000000,	0xffffffffffffffff)
	OR(16,	0x8000000000000000, 0x7fffffffffffffff,	0xffffffffffffffff)
	OR(17,	0x7fffffffffffffff, 0xffffffffffffffff,	0xffffffffffffffff)
	OR(18,	0xffffffffffffffff, 0x7fffffffffffffff,	0xffffffffffffffff)
	OR(19,	0xffffffffffffffff, 0xffffffffffffffff,	0xffffffffffffffff)
#endif

	prepare
		pushargi ok
		ellipsis
	finishi @printf
	ret
	epilog