llvm.org GIT mirror llvm / 8d8add2
[mips] For PIC code convert unconditional jump to unconditional branch Unconditional branch uses relative addressing which is the right choice in case of position independent code. This is a fix for the bug: https://dmz-portal.mips.com/bugz/show_bug.cgi?id=2445 Differential revision: https://reviews.llvm.org/D27483 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289448 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 2 years ago
3 changed file(s) with 236 addition(s) and 88 deletion(s). Raw diff Collapse all Expand all
17831783 return Error(IDLoc, "immediate operand value out of range");
17841784 break;
17851785 }
1786 }
1787
1788 // For PIC code convert unconditional jump to unconditional branch.
1789 if ((Inst.getOpcode() == Mips::J || Inst.getOpcode() == Mips::J_MM) &&
1790 inPicMode()) {
1791 MCInst BInst;
1792 BInst.setOpcode(inMicroMipsMode() ? Mips::BEQ_MM : Mips::BEQ);
1793 BInst.addOperand(MCOperand::createReg(Mips::ZERO));
1794 BInst.addOperand(MCOperand::createReg(Mips::ZERO));
1795 BInst.addOperand(Inst.getOperand(0));
1796 Inst = BInst;
17861797 }
17871798
17881799 // This expansion is not in a function called by tryExpandInstruction()
0 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -show-encoding |\
1 # RUN: FileCheck %s -check-prefix=NORMAL
2
3 # RUN: llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 -show-encoding |\
4 # RUN: FileCheck %s -check-prefix=NORMAL
5
6 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -show-encoding |\
7 # RUN: FileCheck %s -check-prefix=NORMAL
8
9 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips -show-encoding |\
10 # RUN: FileCheck %s -check-prefix=MICRO
11
12 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -mattr=micromips -show-encoding |\
13 # RUN: FileCheck %s -check-prefix=MICRO
14
15 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -mattr=micromips -show-encoding |\
16 # RUN: FileCheck %s -check-prefix=MICRO
17
18 # Repeat the tests using ELF output.
19
20 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -filetype=obj | \
21 # RUN: llvm-objdump -d -r - | FileCheck %s -check-prefixes=ELF-O32
22 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -filetype=obj | \
23 # RUN: llvm-objdump -d -r - | FileCheck %s -check-prefixes=ELF-NXX
24 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -filetype=obj | \
25 # RUN: llvm-objdump -d -r - | FileCheck %s -check-prefixes=ELF-NXX
26
27 .weak weak_label
28
29 .text
30 .option pic2
31
32 .ent local_label
33 local_label:
34 .frame $sp, 0, $ra
35 .set noreorder
36
37 j local_label
38 nop
39
40 # NORMAL: b local_label # encoding: [0x10,0x00,A,A]
41 # NORMAL: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
42
43 # MICRO: b local_label # encoding: [0x94,0x00,A,A]
44 # MICRO: # fixup A - offset: 0, value: local_label, kind: fixup_MICROMIPS_PC16_S1
45
46 # ELF-O32: 10 00 ff ff b 0
47
48 # ELF-NXX: 10 00 ff ff b 0
49
50 j weak_label
51 nop
52
53 # NORMAL: b weak_label # encoding: [0x10,0x00,A,A]
54 # NORMAL: # fixup A - offset: 0, value: weak_label-4, kind: fixup_Mips_PC16
55
56 # MICRO: b weak_label # encoding: [0x94,0x00,A,A]
57 # MICRO: # fixup A - offset: 0, value: weak_label, kind: fixup_MICROMIPS_PC16_S1
58
59 # ELF-O32: 10 00 ff ff b 0
60 # ELF-O32-NEXT: R_MIPS_PC16 weak_label
61
62 # ELF-NXX: 10 00 00 00 b 4
63 # ELF-NXX-NEXT: R_MIPS_PC16/R_MIPS_NONE/R_MIPS_NONE weak_label
64
65 j global_label
66 nop
67
68 # NORMAL: b global_label # encoding: [0x10,0x00,A,A]
69 # NORMAL: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
70
71 # MICRO: b global_label # encoding: [0x94,0x00,A,A]
72 # MICRO: # fixup A - offset: 0, value: global_label, kind: fixup_MICROMIPS_PC16_S1
73
74 # ELF-O32: 10 00 ff ff b 0
75 # ELF-O32-NEXT: 00000010: R_MIPS_PC16 global_label
76
77 # ELF-NXX: 10 00 00 00 b 4
78 # ELF-NXX-NEXT: R_MIPS_PC16/R_MIPS_NONE/R_MIPS_NONE global_label
79
80 j .text
81 nop
82
83 # NORMAL: b .text # encoding: [0x10,0x00,A,A]
84 # NORMAL: # fixup A - offset: 0, value: .text-4, kind: fixup_Mips_PC16
85
86 # MICRO: b .text # encoding: [0x94,0x00,A,A]
87 # MICRO: # fixup A - offset: 0, value: .text, kind: fixup_MICROMIPS_PC16_S1
88
89 # ELF-O32: 10 00 ff ff b 0
90 # ELF-O32-NEXT: 00000018: R_MIPS_PC16 .text
91
92 # ELF-NXX: 10 00 00 00 b 4
93 # ELF-NXX-NEXT: R_MIPS_PC16/R_MIPS_NONE/R_MIPS_NONE .text
94
95 j 1f
96 nop
97
98 # NORMAL: b {{.*}}tmp0{{.*}} # encoding: [0x10,0x00,A,A]
99 # NORMAL: # fixup A - offset: 0, value: {{.*}}tmp0{{.*}}-4, kind: fixup_Mips_PC16
100
101 # MICRO: b {{.*}}tmp0{{.*}} # encoding: [0x94,0x00,A,A]
102 # MICRO: # fixup A - offset: 0, value: {{.*}}tmp0{{.*}}, kind: fixup_MICROMIPS_PC16_S1
103
104 # ELF-O32: 10 00 00 04 b 20
105
106 # ELF-NXX: 10 00 00 04 b 20
107
108 .local forward_local
109 j forward_local
110 nop
111
112 # NORMAL: b forward_local # encoding: [0x10,0x00,A,A]
113 # NORMAL: # fixup A - offset: 0, value: forward_local-4, kind: fixup_Mips_PC16
114
115 # MICRO: b forward_local # encoding: [0x94,0x00,A,A]
116 # MICRO: # fixup A - offset: 0, value: forward_local, kind: fixup_MICROMIPS_PC16_S1
117
118 # ELF-O32: 10 00 00 04 b 20
119
120 # ELF-NXX: 10 00 00 04 b 20
121
122 j 0x4
123
124 # NORMAL: b 4 # encoding: [0x10,0x00,0x00,0x01]
125
126 # MICRO: b 4 # encoding: [0x94,0x00,0x00,0x02]
127
128 # ELF-O32: 10 00 00 01 b 8
129
130 # ELF-NXX: 10 00 00 01 b 8
131
132 .end local_label
133
134 1:
135 nop
136 nop
137 forward_local:
138
0 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -show-encoding |\
1 # RUN: FileCheck %s -check-prefixes=ALL,NORMAL,O32
1 # RUN: FileCheck %s -check-prefixes=ALL,MIPS,O32
22
33 # RUN: llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 -show-encoding |\
4 # RUN: FileCheck %s -check-prefixes=ALL,NORMAL,N32
4 # RUN: FileCheck %s -check-prefixes=ALL,MIPS,N32
55
66 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -show-encoding |\
7 # RUN: FileCheck %s -check-prefixes=ALL,NORMAL,N64
7 # RUN: FileCheck %s -check-prefixes=ALL,MIPS,N64
88
99 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips -show-encoding |\
10 # RUN: FileCheck %s -check-prefixes=ALL,MICROMIPS,O32-MICROMIPS
10 # RUN: FileCheck %s -check-prefixes=ALL,MM,O32-MM
1111
1212 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -mattr=micromips -show-encoding |\
13 # RUN: FileCheck %s -check-prefixes=ALL,MICROMIPS,N32-MICROMIPS
13 # RUN: FileCheck %s -check-prefixes=ALL,MM,N32-MM
1414
1515 # RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -mattr=micromips -show-encoding |\
16 # RUN: FileCheck %s -check-prefixes=ALL,MICROMIPS,N64-MICROMIPS
16 # RUN: FileCheck %s -check-prefixes=ALL,MM,N64-MM
1717
1818 # Repeat the tests but using ELF output. An initial version of this patch did
1919 # this as the output different depending on whether it went through
6262 # ELF-N64: df 99 00 00 ld $25, 0($gp)
6363 # ELF-N64-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE local_label
6464
65 # O32-MICROMIPS: lw $25, %got(local_label)($gp) # encoding: [0xff,0x3c,A,A]
66 # O32-MICROMIPS: # fixup A - offset: 0, value: %got(local_label), kind: fixup_MICROMIPS_GOT16
67 # O32-MICROMIPS: addiu $25, $25, %lo(local_label) # encoding: [0x33,0x39,A,A]
68 # O32-MICROMIPS: # fixup A - offset: 0, value: %lo(local_label), kind: fixup_MICROMIPS_LO16
69
70 # N32-MICROMIPS: lw $25, %got_disp(local_label)($gp) # encoding: [0xff,0x3c,A,A]
71 # N32-MICROMIPS: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
72
73 # N64-MICROMIPS: ld $25, %got_disp(local_label)($gp) # encoding: [0xdf,0x99,A,A]
74 # N64-MICROMIPS: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
75
76 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
77 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
78 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
65 # O32-MM: lw $25, %got(local_label)($gp) # encoding: [0xff,0x3c,A,A]
66 # O32-MM: # fixup A - offset: 0, value: %got(local_label), kind: fixup_MICROMIPS_GOT16
67 # O32-MM: addiu $25, $25, %lo(local_label) # encoding: [0x33,0x39,A,A]
68 # O32-MM: # fixup A - offset: 0, value: %lo(local_label), kind: fixup_MICROMIPS_LO16
69
70 # N32-MM: lw $25, %got_disp(local_label)($gp) # encoding: [0xff,0x3c,A,A]
71 # N32-MM: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
72
73 # N64-MM: ld $25, %got_disp(local_label)($gp) # encoding: [0xdf,0x99,A,A]
74 # N64-MM: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
75
76 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
77 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
78 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
7979
8080 jal weak_label
8181 nop
9999 # ELF-N64: df 99 00 00 ld $25, 0($gp)
100100 # ELF-N64-NEXT: R_MIPS_CALL16/R_MIPS_NONE/R_MIPS_NONE weak_label
101101
102 # O32-MICROMIPS: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
103 # O32-MICROMIPS: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
104
105 # N32-MICROMIPS: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
106 # N32-MICROMIPS: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
107
108 # N64-MICROMIPS: ld $25, %call16(weak_label)($gp) # encoding: [0xdf,0x99,A,A]
109 # N64-MICROMIPS: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
110
111 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
112 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
113 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
102 # O32-MM: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
103 # O32-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
104
105 # N32-MM: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
106 # N32-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
107
108 # N64-MM: ld $25, %call16(weak_label)($gp) # encoding: [0xdf,0x99,A,A]
109 # N64-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
110
111 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
112 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
113 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
114114
115115 jal global_label
116116 nop
134134 # ELF-N64: df 99 00 00 ld $25, 0($gp)
135135 # ELF-N64-NEXT: R_MIPS_CALL16/R_MIPS_NONE/R_MIPS_NONE global_label
136136
137 # O32-MICROMIPS: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
138 # O32-MICROMIPS: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
139
140 # N32-MICROMIPS: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
141 # N32-MICROMIPS: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
142
143 # N64-MICROMIPS: ld $25, %call16(global_label)($gp) # encoding: [0xdf,0x99,A,A]
144 # N64-MICROMIPS: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
145
146 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
147 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
148 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
137 # O32-MM: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
138 # O32-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
139
140 # N32-MM: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
141 # N32-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
142
143 # N64-MM: ld $25, %call16(global_label)($gp) # encoding: [0xdf,0x99,A,A]
144 # N64-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
145
146 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
147 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
148 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
149149
150150 jal .text
151151 nop
171171 # ELF-N64: df 99 00 00 ld $25, 0($gp)
172172 # ELF-N64-NEXT: R_MIPS_CALL16/R_MIPS_NONE/R_MIPS_NONE .text
173173
174 # O32-MICROMIPS-FIXME: lw $25, %got(.text)($gp) # encoding: [0xff,0x3c,A,A]
175 # O32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got(.text), kind: fixup_MICROMIPS_GOT16
176 # O32-MICROMIPS-FIXME: addiu $25, $25, %lo(.text) # encoding: [0x33,0x39,A,A]
177 # O32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %lo(.text), kind: fixup_MICROMIPS_LO16
178
179 # N32-MICROMIPS-FIXME: lw $25, %got_disp(.text)($gp) # encoding: [0xff,0x3c,A,A]
180 # N32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
181
182 # N64-MICROMIPS-FIXME: ld $25, %got_disp(.text)($gp) # encoding: [0xdf,0x99,A,A]
183 # N64-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
184
185 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
186 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
187 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
174 # O32-MM-FIXME: lw $25, %got(.text)($gp) # encoding: [0xff,0x3c,A,A]
175 # O32-MM-FIXME: # fixup A - offset: 0, value: %got(.text), kind: fixup_MICROMIPS_GOT16
176 # O32-MM-FIXME: addiu $25, $25, %lo(.text) # encoding: [0x33,0x39,A,A]
177 # O32-MM-FIXME: # fixup A - offset: 0, value: %lo(.text), kind: fixup_MICROMIPS_LO16
178
179 # N32-MM-FIXME: lw $25, %got_disp(.text)($gp) # encoding: [0xff,0x3c,A,A]
180 # N32-MM-FIXME: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
181
182 # N64-MM-FIXME: ld $25, %got_disp(.text)($gp) # encoding: [0xdf,0x99,A,A]
183 # N64-MM-FIXME: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
184
185 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
186 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
187 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
188188
189189 # local labels ($tmp symbols)
190190 jal 1f
213213 # ELF-N64: df 99 00 00 ld $25, 0($gp)
214214 # ELF-N64-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE .Ltmp0
215215
216 # O32-MICROMIPS: lw $25, %got($tmp0)($gp) # encoding: [0xff,0x3c,A,A]
217 # O32-MICROMIPS: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_MICROMIPS_GOT16
218 # O32-MICROMIPS: addiu $25, $25, %lo($tmp0) # encoding: [0x33,0x39,A,A]
219 # O32-MICROMIPS: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_MICROMIPS_LO16
220
221 # N32-MICROMIPS: lw $25, %got_disp(.Ltmp0)($gp) # encoding: [0xff,0x3c,A,A]
222 # N32-MICROMIPS: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
223
224 # N64-MICROMIPS: ld $25, %got_disp(.Ltmp0)($gp) # encoding: [0xdf,0x99,A,A]
225 # N64-MICROMIPS: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
226
227 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
228 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
229 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
216 # O32-MM: lw $25, %got($tmp0)($gp) # encoding: [0xff,0x3c,A,A]
217 # O32-MM: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_MICROMIPS_GOT16
218 # O32-MM: addiu $25, $25, %lo($tmp0) # encoding: [0x33,0x39,A,A]
219 # O32-MM: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_MICROMIPS_LO16
220
221 # N32-MM: lw $25, %got_disp(.Ltmp0)($gp) # encoding: [0xff,0x3c,A,A]
222 # N32-MM: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
223
224 # N64-MM: ld $25, %got_disp(.Ltmp0)($gp) # encoding: [0xdf,0x99,A,A]
225 # N64-MM: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
226
227 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
228 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
229 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
230230
231231 .local forward_local
232232 jal forward_local
255255 # ELF-N64: df 99 00 00 ld $25, 0($gp)
256256 # ELF-N64-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE forward_local
257257
258 # O32-MICROMIPS-FIXME: lw $25, %got(forward_local)($gp) # encoding: [0xff,0x3c,A,A]
259 # O32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got(forward_local), kind: fixup_MICROMIPS_GOT16
260 # O32-MICROMIPS-FIXME: addiu $25, $25, %lo(forward_local) # encoding: [0x33,0x39,A,A]
261 # O32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %lo(forward_local), kind: fixup_MICROMIPS_LO16
262
263 # N32-MICROMIPS-FIXME: lw $25, %got_disp(forward_local)($gp) # encoding: [0xff,0x3c,A,A]
264 # N32-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
265
266 # N64-MICROMIPS-FIXME: ld $25, %got_disp(forward_local)($gp) # encoding: [0xdf,0x99,A,A]
267 # N64-MICROMIPS-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
268
269 # NORMAL: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
270 # MICROMIPS: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
271 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
272
258 # O32-MM-FIXME: lw $25, %got(forward_local)($gp) # encoding: [0xff,0x3c,A,A]
259 # O32-MM-FIXME: # fixup A - offset: 0, value: %got(forward_local), kind: fixup_MICROMIPS_GOT16
260 # O32-MM-FIXME: addiu $25, $25, %lo(forward_local) # encoding: [0x33,0x39,A,A]
261 # O32-MM-FIXME: # fixup A - offset: 0, value: %lo(forward_local), kind: fixup_MICROMIPS_LO16
262
263 # N32-MM-FIXME: lw $25, %got_disp(forward_local)($gp) # encoding: [0xff,0x3c,A,A]
264 # N32-MM-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
265
266 # N64-MM-FIXME: ld $25, %got_disp(forward_local)($gp) # encoding: [0xdf,0x99,A,A]
267 # N64-MM-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
268
269 # MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
270 # MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
271 # ALL: nop # encoding: [0x00,0x00,0x00,0x00]
273272
274273 .end local_label
275274
278277 add $8, $8, $8
279278 nop
280279 forward_local:
281