]>
Commit | Line | Data |
---|---|---|
bba4624d GM |
1 | # Tests for the ALU eBPF pseudo-C instructions |
2 | .text | |
d218e7fe JM |
3 | w2 += 666 |
4 | w3 += -666 | |
5 | w4 += 2125315823 | |
6 | w5 += w6 | |
7 | w2 -= 666 | |
8 | w3 -= -666 | |
9 | w4 -= 2125315823 | |
10 | w5 -= w6 | |
11 | w2 *= 666 | |
12 | w3 *= -666 | |
13 | w4 *= 2125315823 | |
bba4624d GM |
14 | w5 *= w6 |
15 | w2 /= 666 | |
16 | w3 /= -666 | |
17 | w4 /= 2125315823 | |
18 | w5 /= w6 | |
19 | w2 |= 666 | |
20 | w3 |= -666 | |
21 | w4 |= 2125315823 | |
22 | w5 |= w6 | |
23 | w2 &= 666 | |
24 | w3 &= -666 | |
25 | w4 &= 2125315823 | |
26 | w5 &= w6 | |
27 | w2 <<= 666 | |
28 | w3 <<= -666 | |
29 | w4 <<= 2125315823 | |
30 | w5 <<= w6 | |
31 | w2 >>= 666 | |
32 | w3 >>= -666 | |
33 | w4 >>= 2125315823 | |
34 | w5 >>= w6 | |
35 | w2 %= 666 | |
36 | w3 %= -666 | |
37 | w4 %= 0x7eadbeef | |
38 | w5 %= w6 | |
39 | w2 ^= 666 | |
40 | w3 ^= -666 | |
41 | w4 ^= 2125315823 | |
42 | w5 ^= w6 | |
43 | w2 = 666 | |
44 | w3 = -666 | |
45 | w4 = 2125315823 | |
46 | w5 = w6 | |
47 | w2 s>>= 666 | |
48 | w3 s>>= -666 | |
49 | w4 s>>= 2125315823 | |
50 | w5 s>>= w6 | |
d218e7fe | 51 | w2 = - w3 |
3ccfc0b4 JM |
52 | w1 = (s8) w2 |
53 | w1 = (s16) w2 | |
54 | w1 = (s32) w2 |