Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / ExecutionEngine / RuntimeDyld / X86 / COFF_x86_64.s
blobd63bcfc6df3446c36f4c4709a3bc5ef6f159d044
1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj -o %t/COFF_x86_64.o %s
3 # RUN: llvm-rtdyld -triple=x86_64-pc-win32 -dummy-extern external_func=0x1 \
4 # RUN: -dummy-extern external_data=0x2 -verify -check=%s %t/COFF_x86_64.o
7 .section section,"rx"
8 section:
9 .long 0
10 Lreloc:
11 .long 0
12 # rtdyld-check: *{2}Lreloc = 1
13 .reloc 4, secidx, section+4
16 .text
17 .def F;
18 .scl 2;
19 .type 32;
20 .endef
21 .globl __real400921f9f01b866e
22 .section .rdata,"dr",discard,__real400921f9f01b866e
23 .align 8
24 __real400921f9f01b866e:
25 .quad 4614256650576692846 # double 3.1415899999999999
26 .text
27 .globl F
28 .global inst1
29 .align 16, 0x90
30 F: # @F
31 .Ltmp0:
32 .seh_proc F
33 # %bb.0: # %entry
34 .Ltmp1:
35 .seh_endprologue
36 # rtdyld-check: decode_operand(inst1, 4) = __real400921f9f01b866e - next_pc(inst1)
37 inst1:
38 movsd __real400921f9f01b866e(%rip), %xmm0 # xmm0 = mem[0],zero
39 retq
40 .Leh_func_end0:
41 .Ltmp2:
42 .seh_endproc
44 .globl call_to_dllimport
45 .p2align 4, 0x90
46 # Check calls to dllimports.
48 # (1) Check that callq argument points to synthesized stub addr.
49 # rtdyld-check: decode_operand(call_to_dllimport, 3) = \
50 # rtdyld-check: stub_addr(COFF_x86_64.o/.text, __imp_external_func) - \
51 # rtdyld-check: next_pc(call_to_dllimport)
53 # (2) Check that synthesized stub entry points to call target.
54 # rtdyld-check: *{8}(stub_addr(COFF_x86_64.o/.text, __imp_external_func)) = \
55 # rtdyld-check: external_func
56 call_to_dllimport:
57 callq *__imp_external_func(%rip)
59 .globl load_from_dllimport
60 .p2align 4, 0x90
61 # Check loads from dllimports.
63 # (1) Check that the movq argument points to synthesized stub addr.
64 # rtdyld-check: decode_operand(load_from_dllimport, 4) = \
65 # rtdyld-check: stub_addr(COFF_x86_64.o/.text, __imp_external_data) - \
66 # rtdyld-check: next_pc(load_from_dllimport)
68 # (2) Check that synthesized stub entry points to datao target.
69 # rtdyld-check: *{8}(stub_addr(COFF_x86_64.o/.text, __imp_external_data)) = \
70 # rtdyld-check: external_data
71 load_from_dllimport:
72 movq __imp_external_data(%rip), %rax
74 .data
75 .globl x # @x
76 # rtdyld-check: *{8}x = F
78 .quad F
80 # Make sure the JIT doesn't bail out on BSS sections.
81 .bss
82 bss_check:
83 .fill 8, 1, 0