summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/mips/empic.s
blob: 5f37adff38282d5b28bb78d938128f8b9740e143 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Check GNU-specific embedded relocs, for ELF.

	.text
	.set noreorder
	nop
l2:	jal	g1		# R_MIPS_GNU_REL16_S2	g1   -1
	nop
	b	g2		# R_MIPS_GNU_REL16_S2	g2   -1
	nop
	b	g2		# R_MIPS_GNU_REL16_S2	g2   -1
	nop
	jal	l1		# R_MIPS_GNU_REL16_S2	.foo 3F
	nop
	jal	l2		# R_MIPS_GNU_REL16_S2	.text 0  or -9
	nop
	b	l1+8		# R_MIPS_GNU_REL16_S2	.foo 41
	nop
l3:
	b	l2		# R_MIPS_GNU_REL16_S2	.text 0  or -D
	nop
	la	$3,g1-l3	# R_MIPS_GNU_REL_HI16   g1   0
				# R_MIPS_GNU_REL_LO16   g1   C
	la	$3,l1-l3	# R_MIPS_GNU_REL_HI16   .foo 0
				# R_MIPS_GNU_REL_LO16   .foo 114
	la	$3,l2-l3	# -30
	.word	g1		# R_MIPS_32	g1    0
	.word	l1		# R_MIPS_32	.foo  100
	.word	l2		# R_MIPS_32	.text 4
	.word	g1-l3		# R_MIPS_PC32	g1    28
	.word	l1-l3		# R_MIPS_PC32	.foo  12C
	.word	l2-l3		# -30
	.align 3
	.dword	g1		# R_MIPS_64	g1    0
	.dword	l1		# R_MIPS_64	.foo  100
	.dword	l2		# R_MIPS_64	.text 4
	.dword	g1-l3		# R_MIPS_PC64	g1    4C
	.dword	l1-l3		# R_MIPS_PC64	.foo  154
	.dword	l2-l3		# -30
l5:
	b	2f		# R_MIPS_GNU_REL16_S2	.text 32
	b	2f+4		# R_MIPS_GNU_REL16_S2	.text 33
	la	$3,2f-l5	# R_MIPS_GNU_REL_HI16	.text 0
	                        # R_MIPS_GNU_REL_LO16   .text D8
	la	$3,2f+8-l5	# R_MIPS_GNU_REL_HI16	.text 0
	                        # R_MIPS_GNU_REL_LO16   .text E8


	.word	2f		# R_MIPS_32	.text CC
	.word	2f-l5		# R_MIPS_PC32	.text EC  or 34
	.dword	2f		# R_MIPS_64	.text CC
	.dword	2f-l5		# R_MIPS_PC64	.text F8  or 34
	nop
2:				# at address 0xCC.
	b	2b		# R_MIPS_GNU_REL16_S2	.text 32
	b	2b+4		# R_MIPS_GNU_REL16_S2	.text 33
	la      $3,2b-l5        # 34
	la      $3,2b+8-l5      # 3C
	.word	2b		# R_MIPS_32	.text CC
	.word	2b-l5		# R_MIPS_PC32	.text 11C  or 34
	nop
	.dword	2b		# R_MIPS_64	.text CC
	.dword	2b-l5		# R_MIPS_PC64	.text 98  or 34

# align section end to 16-byte boundary for easier testing on multiple targets
	.p2align 4

	.section ".foo","ax",@progbits
	nop
l4:	
	la	$3,g1-l4
	la	$3,l1-l4
	la	$3,l2-l4
	la	$3,g1-l4

	dla	$3,g1-l4
	dla	$3,l1-l4
	dla	$3,l2-l4

	.word	g1
	.word	l1
	.word	l2
	.word	g1-l4
	.word	l1-l4
	.word	l2-l4
	.dword	g1
	.dword	l1
	.dword	l2
	.dword	g1-l4
	.dword	l1-l4
	.dword	l2-l4

	la	$3,g1-l4+4
	la	$3,l1-l4+4
	la	$3,l2-l4+4

	dla	$3,g1-l4+4
	dla	$3,l1-l4+4
	dla	$3,l2-l4+4

	.word	g1+4
	.word	l1+4
	.word	l2+4
	.word	g1-l4+4
	.word	l1-l4+4
	.word	l2-l4+4
	.dword	g1+4
	.dword	l1+4
	.dword	l2+4
	.dword	g1-l4+4
	.dword	l1-l4+4
	.dword	l2-l4+4
l1:

	nop

# align section end to 16-byte boundary for easier testing on multiple targets
	.p2align 4