[hwasan] Omit tag check for null pointers (#122206)
[llvm-project.git] / llvm / test / MC / BPF / bad-offsets.s
blobcb5f87faa4cf9d4f1820e7120e8e4648f290ceff
1 # RUN: not llvm-mc -mcpu=v4 -triple bpfel < %s 2>&1 \
2 # RUN: | grep 'error: operand is not an identifier or 16-bit signed integer' \
3 # RUN: | count 2
4 # RUN: not llvm-mc -mcpu=v4 -triple bpfel < %s 2>&1 \
5 # RUN: | grep 'error: operand is not a 16-bit signed integer' \
6 # RUN: | count 25
7 if r1 > r2 goto +70000
8 if r1 > r2 goto -70000
9 *(u64 *)(r1 + 70000) = 10
10 *(u32 *)(r1 - 70000) = 10
11 *(u16 *)(r1 - 70000) = 10
12 *(u8 *)(r1 - 70000) = 10
13 *(u64 *)(r1 + 70000) = r1
14 *(u32 *)(r1 - 70000) = r1
15 *(u16 *)(r1 - 70000) = r1
16 *(u8 *)(r1 - 70000) = r1
17 r1 = *(u64 *)(r1 + 70000)
18 r1 = *(u32 *)(r1 - 70000)
19 r1 = *(u16 *)(r1 - 70000)
20 r1 = *(u8 *)(r1 - 70000)
21 r1 = *(s32 *)(r1 + 70000)
22 r1 = *(s16 *)(r1 - 70000)
23 r1 = *(s8 *)(r1 - 70000)
24 lock *(u32*)(r1 + 70000) += w2
25 lock *(u32*)(r1 - 70000) &= w2
26 lock *(u32*)(r1 - 70000) |= w2
27 lock *(u32*)(r1 - 70000) ^= w2
28 r0 = atomic_fetch_add((u64 *)(r1 + 70000), r0)
29 r0 = atomic_fetch_and((u64 *)(r1 + 70000), r0)
30 r0 = atomic_fetch_xor((u64 *)(r1 + 70000), r0)
31 r0 = atomic_fetch_or((u64 *)(r1 + 70000), r0)
32 w0 = cmpxchg32_32(r1 + 70000, w0, w1)
33 r0 = cmpxchg_64(r1 + 70000, r0, r1)