1@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s
2@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
3@ RUN:    llvm-readobj -s -sd -sr | FileCheck -check-prefix=OBJ %s
4	.syntax unified
5	.text
6	.globl	barf
7	.align	2
8	.type	barf,%function
9barf:                                   @ @barf
10@ BB#0:                                 @ %entry
11	movw	r0, :lower16:GOT-(.LPC0_2+8)
12	movt	r0, :upper16:GOT-(.LPC0_2+8)
13.LPC0_2:
14@ ASM:          movw    r0, :lower16:(GOT-(.LPC0_2+8))
15@ ASM-NEXT:     movt    r0, :upper16:(GOT-(.LPC0_2+8))
16
17@@ make sure that the text section fixups are sane too
18@ OBJ:        Section {
19@ OBJ:          Name: .text
20@ OBJ-NEXT:     Type: SHT_PROGBITS
21@ OBJ-NEXT:     Flags [ (0x6)
22@ OBJ-NEXT:       SHF_ALLOC
23@ OBJ-NEXT:       SHF_EXECINSTR
24@ OBJ-NEXT:     ]
25@ OBJ-NEXT:     Address: 0x0
26@ OBJ-NEXT:     Offset: 0x34
27@ OBJ-NEXT:     Size: 8
28@ OBJ-NEXT:     Link: 0
29@ OBJ-NEXT:     Info: 0
30@ OBJ-NEXT:     AddressAlignment: 4
31@ OBJ-NEXT:     EntrySize: 0
32@ OBJ-NEXT:     Relocations [
33@ OBJ-NEXT:     ]
34@ OBJ-NEXT:     SectionData (
35@ OBJ-NEXT:       0000: F00F0FE3 F40F4FE3
36@ OBJ-NEXT:     )
37@ OBJ-NEXT:   }
38@ OBJ:        Section {
39@ OBJ:          Index:
40@ OBJ:          Name: .rel.text
41@ OBJ-NEXT:     Type: SHT_REL (0x9)
42@ OBJ-NEXT:     Flags [ (0x0)
43@ OBJ-NEXT:     ]
44@ OBJ-NEXT:     Address: 0x0
45@ OBJ-NEXT:     Offset:
46@ OBJ-NEXT:     Size: 16
47@ OBJ-NEXT:     Link: 6
48@ OBJ-NEXT:     Info: 1
49@ OBJ-NEXT:     AddressAlignment: 4
50@ OBJ-NEXT:     EntrySize: 8
51@ OBJ-NEXT:     Relocations [
52@ OBJ-NEXT:       0x0 R_ARM_MOVW_PREL_NC
53@ OBJ-NEXT:       0x4 R_ARM_MOVT_PREL
54@ OBJ-NEXT:   ]
55@ OBJ-NEXT:     SectionData (
56@ OBJ-NEXT:       0000: 00000000 2D060000 04000000 2E060000  |....-...........|
57@ OBJ-NEXT:     )
58@ OBJ-NEXT:   }
59