1// RUN: llvm-mc -triple=mips64el-pc-linux -filetype=obj -mcpu=mips64r2 < %s -o - | llvm-readobj -r | FileCheck %s
2
3// Check that the R_MIPS_GOT_DISP relocations were created.
4
5//       CHECK: Relocations [
6// CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_DISP
7
8	.text
9	.abicalls
10	.section	.mdebug.abi64,"",@progbits
11	.file	"<stdin>"
12	.text
13	.globl	main
14	.align	3
15	.type	main,@function
16	.set	nomips16
17	.ent	main
18main:                                   # @main
19	.frame	$sp,16,$ra
20	.mask 	0x00000000,0
21	.fmask	0x90000000,-4
22	.set	noreorder
23	.set	nomacro
24	.set	noat
25# BB#0:                                 # %entry
26	daddiu	$sp, $sp, -16
27	sd	$ra, 8($sp)             # 8-byte Folded Spill
28	sd	$gp, 0($sp)             # 8-byte Folded Spill
29	lui	$1, %hi(%neg(%gp_rel(main)))
30	daddu	$1, $1, $25
31	daddiu	$gp, $1, %lo(%neg(%gp_rel(main)))
32	ld	$1, %got_disp(shl)($gp)
33	ld	$5, 0($1)
34	ld	$1, %got_page($.str)($gp)
35	ld	$25, %call16(printf)($gp)
36	jalr	$25
37	daddiu	$4, $1, %got_ofst($.str)
38	addiu	$2, $zero, 0
39	ld	$gp, 0($sp)             # 8-byte Folded Reload
40	ld	$ra, 8($sp)             # 8-byte Folded Reload
41	jr	$ra
42	daddiu	$sp, $sp, 16
43	.set	at
44	.set	macro
45	.set	reorder
46	.end	main
47$tmp0:
48	.size	main, ($tmp0)-main
49
50	.type	shl,@object             # @shl
51	.data
52	.globl	shl
53	.align	3
54shl:
55	.8byte	1                       # 0x1
56	.size	shl, 8
57
58	.type	$.str,@object           # @.str
59	.section	.rodata.str1.1,"aMS",@progbits,1
60$.str:
61	.asciz	"0x%llx\n"
62	.size	$.str, 8
63
64
65	.text
66