1 // RUN
: llvm-mc
-triple thumbv7-windows-itanium
-filetype obj
-o
%t.obj
%s
2 // RUN
: llvm-rtdyld
-triple thumbv7-windows
-dummy-extern OutputDebugStringW
=0x01310061 -dummy-extern OutputDebugStringA
=0x78563413 -dummy-extern ExitProcess
=0x54769891 -dummy-extern unnamed_addr
=0x00001024 -verify
-check
%s
%t.obj
23 # b unnamed_addr @ IMAGE_REL_ARM_BRANCH24T
36 rel2
: @ IMAGE_REL_ARM_MOV32T
37 movw
r0, :lower16
:__imp_OutputDebugStringA
38 # rtdyld-check: decode_operand(rel2, 1) = (__imp_OutputDebugStringA&0x0000ffff)
39 movt
r0, :upper16
:__imp_OutputDebugStringA
40 # TODO rtdyld-check: decode_operand(rel2, 1) = (__imp_OutputDebugStringA&0xffff0000>>16)
42 rel3
: @ IMAGE_REL_ARM_MOV32T
43 movw
r0, :lower16
:string
44 # rtdyld-check: decode_operand(rel3, 1) = (string&0x0000ffff)
45 movt
r0, :upper16
:string
46 # TODO rtdyld-check: decode_operand(rel3, 1) = (string&0xffff0000>>16)
48 rel4
: @ IMAGE_REL_ARM_MOV32T
49 movw
r0, :lower16
:__imp_ExitProcess
50 # rtdyld-check: decode_operand(rel4, 1) = (__imp_ExitProcess&0x0000ffff)
51 movt
r0, :upper16
:__imp_ExitProcess
52 # TODO rtdyld-check: decode_operand(rel4, 1) = (__imp_ExitProcess&0xffff0000>>16)
70 # bl function @ IMAGE_REL_ARM_BLX23T
77 .asciz "Hello World\n"
82 __imp_OutputDebugStringA
:
84 .long OutputDebugStringA @ IMAGE_REL_ARM_ADDR32
85 # rtdyld-check: *{4}__imp_OutputDebugStringA = 0x78563413
90 .long ExitProcess @ IMAGE_REL_ARM_ADDR32
91 # rtdyld-check: *{4}__imp_ExitProcess = 0x54769891
96 .long function(imgrel) @ IMAGE_REL_ARM_ADDR32NB
97 # rtdyld-check: *{4}relocations = function - section_addr(COFF_Thumb.s.tmp.obj, .text)
99 .secidx __imp_OutputDebugStringA @ IMAGE_REL_ARM_SECTION
100 # rtdyld-check: *{2}rel9 = 1
102 .long relocations(secrel32) @ IMAGE_REL_ARM_SECREL
103 # rtdyld-check: *{4}rel10 = relocations - section_addr(COFF_Thumb.s.tmp.obj, .data)
105 .secrel32 relocations @ IMAGE_REL_ARM_SECREL
106 # rtdyld-check: *{4}rel11 = relocations - section_addr(COFF_Thumb.s.tmp.obj, .data)
107 rel12
: @ IMAGE_REL_ARM_MOV32T
108 movw
r0, :lower16
:__imp_OutputDebugStringW
109 # rtdyld-check: decode_operand(rel12, 1) = (__imp_OutputDebugStringW&0x0000ffff)
110 movt
r0, :upper16
:__imp_OutputDebugStringW
111 # TODO rtdyld-check: decode_operand(rel12, 1) = (__imp_OutputDebugStringW&0xffff0000>>16)
118 __imp_OutputDebugStringW
:
120 .long OutputDebugStringW @ IMAGE_REL_ARM_ADDR32
121 # rtdyld-check: *{4}__imp_OutputDebugStringW = 0x01310061
125 branch_to_thumb_func
:
126 @ rel14
: @ IMAGE_REL_ARM_MOV32T
127 movw
r0, :lower16
:function
128 # rtdyld-check: decode_operand(branch_to_thumb_func, 1) = (function&0x0000ffff|1)
129 movt
r0, :upper16
:function
130 # TODO rtdyld-check: decode_operand(branch_to_thumb_func, 1) = (function&0xffff0000>>16)
144 ref_to_data_symbol_addr
:
145 @ rel15
: @ IMAGE_REL_ARM_MOV32T
146 movw
r0, :lower16
:a_data_symbol
147 # rtdyld-check: decode_operand(ref_to_data_symbol_addr, 1) = (a_data_symbol&0x0000ffff)
148 movt
r0, :upper16
:a_data_symbol
149 # TODO rtdyld-check: decode_operand(ref_to_data_symbol_addr, 1) = (a_data_symbol&0xffff0000>>16)