]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/bpf/atomic-pseudoc.s
6994fd103679f5970e0dd7485c32fed3ad750a54
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / bpf / atomic-pseudoc.s
1 # Test for eBPF atomic pseudo-C instructions.
2 .text
3 lock *(u64 *)(r1 + 0x1eef) += r2
4 lock *(u32 *)(r1 + 0x1eef) += r2
5 lock *(u64*)(r1+0x1eef)+=r2
6 lock *(u32*)(r1+0x1eef)+=r2
7 lock *(u64*)(r1+0x1eef)&=r2
8 lock *(u32*)(r1+0x1eef)&=r2
9 lock *(u64*)(r1+0x1eef)|=r2
10 lock *(u32*)(r1+0x1eef)|=r2
11 lock *(u64*)(r1+0x1eef)^=r2
12 lock *(u32*)(r1+0x1eef)^=r2
13 r2 = atomic_fetch_add((u64*)(r1+0x1eef),r2)
14 w2 = atomic_fetch_add((u32*)(r1+0x1eef),w2)
15 r2 = atomic_fetch_and((u64*)(r1+0x1eef),r2)
16 w2 = atomic_fetch_and((u32*)(r1+0x1eef),w2)
17 r2 = atomic_fetch_or((u64*)(r1+0x1eef),r2)
18 w2 = atomic_fetch_or((u32*)(r1+0x1eef),w2)
19 r2 = atomic_fetch_xor((u64*)(r1+0x1eef),r2)
20 w2 = atomic_fetch_xor((u32*)(r1+0x1eef),w2)
21 r0 = cmpxchg_64(r1+0x4,r0,r2)
22 w0 = cmpxchg32_32(r2+0x4,w0,w3)
23 r2 = xchg_64(r1+0x8,r2)
24 w3 = xchg32_32(r1+0x8,w3)