]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/bpf/alu32-pseudoc.s
98d586a48e6512bdf8bb802330b4be2a129a3a6e
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / bpf / alu32-pseudoc.s
1 # Tests for the ALU eBPF pseudo-C instructions
2 .text
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
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
51 w2 = - w2
52 w1 = (s8) w2
53 w1 = (s16) w2
54 w1 = (s32) w2
55 ;; Note that the next instruction gets processed by the GAS
56 ;; preprocessor into w1 =-0xf00, which parses into a %dw = %i32
57 ;; instruction instead of a neg :/
58 w1 = - 0xf00