[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / AsmParser / assembler-expressions.s
blobeb967adcabfcde6fa449e86bdfc4c378b17add77
1 # RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2>&1 | FileCheck %s --check-prefix=ASM-ERR --implicit-check-not=error:
2 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s | llvm-objdump -j .data -s - | FileCheck %s --check-prefix=OBJDATA
3 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s | llvm-objdump -j .text -s - | FileCheck %s --check-prefix=OBJTEXT
4 .data
6 # OBJDATA: Contents of section .data
7 # OBJDATA-NEXT: 0000 aa01aa05 06000000 08ff
9 foo1:
10 # ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression
11 .if . - foo1 == 0
12 .byte 0xaa
13 .else
14 .byte 0x00
15 .endif
17 foo2:
18 .byte 1
19 # ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression
20 .if foo2 - . == -1
21 .byte 0xaa
22 .else
23 .byte 0x00
24 .endif
26 foo3:
27 .byte 5
28 # ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression
29 .if . - foo3 == 1
30 .byte 6
31 .else
32 .byte 7
33 .endif
35 foo4:
36 .byte 0
37 .space 2
38 # ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression
39 .if . - foo4 == 3
40 .byte 8
41 .else
42 .byte 9
43 .endif
45 .byte 0xff
47 # nop is a fixed size instruction so this should pass.
49 # OBJTEXT: Contents of section .text
50 # OBJTEXT-NEXT: 0000 909090ff 34250000 00009090 90785634
51 # OBJTEXT-NEXT: 0010 12785634 1290
53 .text
54 text1:
55 # ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression
56 .if . - text1 == 0
57 nop
58 .endif
60 text2:
61 nop
62 # ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression
63 .if . - text2 == 1
64 nop
65 .else
66 ret
67 .endif
68 push gs
69 nop
70 nop
71 nop
72 # No additional errors.
74 # ASM-ERR-NOT: {{[0-9]+}}:{{[0-9]+}}: error:
77 text3:
78 .long 0x12345678
79 text4:
80 .fill (text4-text3)/4, 4, 0x12345678
81 nop