1# RUN: llvm-mc -filetype=obj -defsym=I=6 -triple i686-unknown-unknown %s | llvm-objdump -triple i686-unknown-unknown -s - | FileCheck --check-prefix="CHECK" %s
2# RUN: not llvm-mc -filetype=obj -defsym=I=4 -triple i686-unknown-unknown %s -o /dev/null 2>&1 | FileCheck --check-prefix="CHECK-ERR" %s
3
4
5
6# CHECK: Contents of section .text
7# CHECK-NEXT: 0000 e9810000 00cc9090 90909090 90909090
8
9# Make sure we emit in correct endianness.
10
11# CHECK: Contents of section .data
12# CHECK-NEXT: 0000 78563412 78563412 78563412
13
14.text
15foo:
16jmp bar2
17# CHECK-ERR: [[@LINE+1]]:7: error: invalid number of bytes
18.fill ((I+foo) - .), 1, 0xcc
19bar:
20 .space 128, 0x90
21bar2:
22.byte 0xff
23
24# This fill length is not known at assembler time.
25
26.if (I==6)
27
28.data
29.long 0x12345678
30.fill ((foo+8)-bar), 4, 0x12345678
31
32.endif
33