88 lines · plain
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=OBJDATA3# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s | llvm-objdump -j .text -s - | FileCheck %s --check-prefix=OBJTEXT4.data5 6# OBJDATA: Contents of section .data7# OBJDATA-NEXT: 0000 aa01aa05 06000000 08ff8 9foo1:10# ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression11.if . - foo1 == 012 .byte 0xaa13.else14 .byte 0x0015.endif16 17foo2:18 .byte 119# ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression20.if foo2 - . == -121 .byte 0xaa22.else23 .byte 0x0024.endif25 26foo3:27 .byte 528# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression29.if . - foo3 == 130 .byte 631.else32 .byte 733.endif34 35foo4:36.byte 037.space 238# ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression39.if . - foo4 == 340 .byte 841.else42 .byte 943.endif44 45.byte 0xff46 47# nop is a fixed size instruction so this should pass.48 49# OBJTEXT: Contents of section .text50# OBJTEXT-NEXT: 0000 909090ff 34250000 00009090 9078563451# OBJTEXT-NEXT: 0010 12785634 129052 53.text54text1:55# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression56.if . - text1 == 057 nop58.endif59 60text2:61 nop62# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression63.if . - text2 == 164 nop65.else66 ret67.endif68 push gs69 nop70 nop71 nop72# No additional errors.73#74# ASM-ERR-NOT: {{[0-9]+}}:{{[0-9]+}}: error:75 76 77text3:78 .long 0x1234567879text4:80 .fill (text4-text3)/4, 4, 0x1234567881 nop82 83 84 85 86 87 88