aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf/mips16-pic-3.inc
blob: 96116114ef98f3053dfc8cc041ac498751327563 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
	.macro	test_call,name
	.set	mips16
	.text
	.ent	test_\name
test_\name:
	jal	\name
	.end	test_\name
	.endm

	.macro	call_stub,name
	.set	nomips16
	.section .mips16.call.\name, "ax", @progbits
	.ent	__call_\name
__call_\name:
	la	$25,\name
	jr	$25
	mtc1	$4,$f12
	.end	__call_\name

	test_call \name
	.endm

	.macro	call_fp_stub,name
	.set	nomips16
	.section .mips16.call.fp.\name, "ax", @progbits
	.ent	__call_fp_\name
__call_fp_\name:
	move	$18,$31
	la	$25,\name
	jalr	$25
	mtc1	$4,$f12
	mfc1	$2,$f0
	jr	$18
	nop
	.end	__call_fp_\name

	test_call \name
	.endm

	.macro	lstub,name,mode
	.set	\mode
	.text
	.ent	\name
\name:
	jr	$31
	nop
	.end	\name
	.endm

	.macro	hstub,name,mode
	.globl	\name
	.hidden	\name
	lstub	\name, \mode
	.endm

	.macro	gstub,name,mode
	.globl	\name
	lstub	\name, \mode
	.endm