Simplify away redundant test, and document what's going on.
[llvm/stm8.git] / test / MC / ARM / elf-movt.s
blob0fe7c50a3133b76fbe91d0ed0ef73e4c6b8705e3
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: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
4 .syntax unified
5 .text
6 .globl barf
7 .align 2
8 .type barf,%function
9 barf: @ @barf
10 @ BB#0: @ %entry
11 movw r0, :lower16:GOT-(.LPC0_2+8)
12 movt r0, :upper16:GOT-(.LPC0_2+16)
13 .LPC0_2:
14 @ ASM: movw r0, :lower16:(GOT-(.LPC0_2+8))
15 @ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+16))
17 @@ make sure that the text section fixups are sane too
18 @ OBJ: '.text'
19 @ OBJ-NEXT: 'sh_type', 0x00000001
20 @ OBJ-NEXT: 'sh_flags', 0x00000006
21 @ OBJ-NEXT: 'sh_addr', 0x00000000
22 @ OBJ-NEXT: 'sh_offset', 0x00000034
23 @ OBJ-NEXT: 'sh_size', 0x00000008
24 @ OBJ-NEXT: 'sh_link', 0x00000000
25 @ OBJ-NEXT: 'sh_info', 0x00000000
26 @ OBJ-NEXT: 'sh_addralign', 0x00000004
27 @ OBJ-NEXT: 'sh_entsize', 0x00000000
28 @ OBJ-NEXT: '_section_data', 'f00f0fe3 ff0f4fe3'
30 @ OBJ: Relocation 0x00000000
31 @ OBJ-NEXT: 'r_offset', 0x00000000
32 @ OBJ-NEXT: 'r_sym'
33 @ OBJ-NEXT: 'r_type', 0x0000002d
35 @ OBJ: Relocation 0x00000001
36 @ OBJ-NEXT: 'r_offset', 0x00000004
37 @ OBJ-NEXT: 'r_sym'
38 @ OBJ-NEXT: 'r_type', 0x0000002e