summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.s
blob: 385e7fdbe4751d6ed567aefbfdde64cf73b6368e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
	.abicalls
	.set	noreorder
	.set	nomips16
	.global	foo
	.ent	foo
foo:
	.cpload	$25
	lw	$25,%call16(foo)($28)
	lw	$2,%got(data)($28)
	jr	$25
	addiu	$2,$2,%lo(data)
	.end	foo

	.set	mips16
	.global	bar
	.ent	bar
bar:
	li	$2,%hi(_gp_disp)
	addiu	$2,$pc,%lo(_gp_disp)
	sll	$2,16
	addu	$2,$2,$3
	lw	$3,%call16(ext)($2)
	move	$28,$2
	jr	$3
	move	$25,$3
	.end	bar

	.data
data:	.word	0x12345678