1# RUN: llvm-mc -triple i686-pc-win32 < %s -show-encoding \
2# RUN:     | FileCheck -check-prefix=ASM %s
3# RUN: llvm-mc -triple i686-pc-win32 < %s -show-encoding \
4# RUN:     -filetype=obj | llvm-readobj --sections --section-data -r | \
5# RUN:     FileCheck -check-prefix=OBJ-32 %s
6# RUN: llvm-mc -triple x86_64-pc-win32 < %s -show-encoding \
7# RUN:     -filetype=obj | llvm-readobj --sections --section-data -r | \
8# RUN:     FileCheck -check-prefix=OBJ-64 %s
9	.text
10foo:
11	.long 0
12	.long 0
13	.long 0
14	.long 0
15	.long 0
16	.reloc 4, dir32,    foo          # ASM: .reloc 4, dir32, foo
17	.reloc 0, secrel32, foo+4        # ASM: .reloc 0, secrel32, foo+4
18	.reloc 8, secidx,   foo+8        # ASM: .reloc 8, secidx, foo+8
19	.reloc 12, dir32,   foo@secrel32 # ASM: .reloc 12, dir32, foo@SECREL32
20	.reloc 16, dir32,   foo@imgrel   # ASM: .reloc 16, dir32, foo@IMGREL
21
22# OBJ-32-LABEL: Name: .text
23# OBJ-32:       0000: 04000000 00000000 00000000
24# OBJ-32-LABEL: }
25# OBJ-32-LABEL: Relocations [
26# OBJ-32:       0x4  IMAGE_REL_I386_DIR32   foo
27# OBJ-32:       0x0  IMAGE_REL_I386_SECREL  foo
28# OBJ-32:       0x8  IMAGE_REL_I386_SECTION foo
29# OBJ-32:       0xC  IMAGE_REL_I386_SECREL  foo
30# OBJ-32:       0x10 IMAGE_REL_I386_DIR32NB foo
31
32# OBJ-64-LABEL: Name: .text
33# OBJ-64:       0000: 04000000 00000000 00000000
34# OBJ-64-LABEL: }
35# OBJ-64-LABEL: Relocations [
36# OBJ-64:       0x4  IMAGE_REL_AMD64_ADDR32   foo
37# OBJ-64:       0x0  IMAGE_REL_AMD64_SECREL   foo
38# OBJ-64:       0x8  IMAGE_REL_AMD64_SECTION  foo
39# OBJ-64:       0xC  IMAGE_REL_AMD64_SECREL   foo
40# OBJ-64:       0x10 IMAGE_REL_AMD64_ADDR32NB foo
41