1# RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2>&1 | FileCheck %s --check-prefix=ASM-ERR 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 5 6# OBJDATA: Contents of section .data 7# OBJDATA-NEXT: 0000 aa0506ff 8 9foo2: 10# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression 11.if . - foo2 == 0 12 .byte 0xaa 13.else 14 .byte 0x00 15.endif 16 17foo3: 18 .byte 5 19# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression 20.if . - foo3 == 1 21 .byte 6 22.else 23 .byte 7 24.endif 25 26.byte 0xff 27 28# nop is a fixed size instruction so this should pass. 29 30# OBJTEXT: Contents of section .text 31# OBJTEXT-NEXT: 0000 9090ff34 25000000 00909090 78563412 32# OBJTEXT-NEXT: 0010 78563412 90 33 34.text 35 36text1: 37 nop 38# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression 39.if . - text1 == 1 40 nop 41.else 42 ret 43.endif 44 push gs 45 nop 46 nop 47 nop 48# No additional errors. 49# 50# ASM-ERR-NOT: {{[0-9]+}}:{{[0-9]+}}: error: 51 52 53 54text2: 55 .long 0x12345678 56text3: 57 .fill (text3-text2)/4, 4, 0x12345678 58 nop 59 60 61 62 63 64 65