ObjFW  Check-in [d694ea89af]

Overview
Comment:Add of_forward_stret for MIPS/ELF.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d694ea89afc96a42517ba7133fcbd2077500c643c2e65b7e8ab3018b6017796d
User & Date: js on 2013-08-01 18:59:02
Other Links: manifest | tags
Context
2013-08-01
22:12
OFXMLParser: Fix parsing of <![CDATA[x]]]>. check-in: 66cb66e6d8 user: js tags: trunk
18:59
Add of_forward_stret for MIPS/ELF. check-in: d694ea89af user: js tags: trunk
18:53
Add objc_msg_lookup_stret for MIPS/ELF. check-in: 5d814a5ef5 user: js tags: trunk
Changes

Modified src/OFObject.h from [5018540cff] to [357d7fd283].

105
106
107
108
109
110
111



112
113
114
115
116
117
118
#   if __has_feature(objc_msg_lookup_stret)
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
#  if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \
    (defined(__mips_eabi) && _MIPS_SZPTR == 32)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR



#  endif
# endif
#endif

#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((ns_returns_retained))
# define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))







>
>
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#   if __has_feature(objc_msg_lookup_stret)
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
#  if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \
    (defined(__mips_eabi) && _MIPS_SZPTR == 32)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __has_feature(objc_msg_lookup_stret)
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
# endif
#endif

#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((ns_returns_retained))
# define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))

Modified src/forwarding-mips-elf.S from [2f942a63a8] to [f89a8ca2f8].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 */

.globl of_forward
.globl of_forward_stret

.section .text
of_forward:
of_forward_stret: /* FIXME */
#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9
#endif

	addiu	$sp, $sp, -72







<







15
16
17
18
19
20
21

22
23
24
25
26
27
28
 */

.globl of_forward
.globl of_forward_stret

.section .text
of_forward:

#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9
#endif

	addiu	$sp, $sp, -72
123
124
125
126
127
128
129


130













































































































131
132
133
134
135
136
137
138
139
140

#ifdef __PIC__
	move	$t9, $v0
	jr	$t9
#else
	jr	$v0
#endif
















































































































.type of_forward, %function
.size of_forward, .-of_forward

init:
#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9

	lw	$a0, %got(module)($gp)







>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|








122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250

#ifdef __PIC__
	move	$t9, $v0
	jr	$t9
#else
	jr	$v0
#endif
.type of_forward, %function
.size of_forward, .-of_forward

of_forward_stret:
#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9
#endif

	addiu	$sp, $sp, -72

	/*
	 * O32: The registers for floating point arguments don't need to be
	 * saved, as the ABI specifies that all remaining arguments are passed
	 * in integer registers if the first argument is passed in an integer
	 * register. This is always the case, as the first argument is always
	 * self.
	 */
	sw	$gp, 0($sp)
	sw	$ra, 4($sp)
	sw	$a0, 8($sp)
	sw	$a1, 12($sp)
	sw	$a2, 16($sp)
	sw	$a3, 20($sp)
#ifdef __mips_eabi
	/* For some reason, $a4-$a8 are not always defined */
	sw	$8, 24($sp)
	sw	$9, 28($sp)
	sw	$10, 32($sp)
	sw	$11, 36($sp)

	swc1	$f12, 40($sp)
	swc1	$f13, 44($sp)
	swc1	$f14, 48($sp)
	swc1	$f15, 52($sp)
	swc1	$f16, 56($sp)
	swc1	$f17, 60($sp)
	swc1	$f18, 64($sp)
	swc1	$f19, 68($sp)
#endif

	move	$a0, $a1
#ifdef __PIC__
	lw	$a1, %got(sel_forwardingTargetForSelector_)($gp)
#else
	lui	$a1, %hi(sel_forwardingTargetForSelector_)
#endif
	addiu	$a1, $a1, %lo(sel_forwardingTargetForSelector_)
#ifdef __PIC__
	lw	$t9, %call16(objc_msg_lookup)($gp)
	jalr	$t9
#else
	jal	objc_msg_lookup
#endif

	lw	$gp, 0($sp)
	lw	$a0, 12($sp)
#ifdef __PIC__
	lw	$a1, %got(sel_forwardingTargetForSelector_)($gp)
#else
	lui	$a1, %hi(sel_forwardingTargetForSelector_)
#endif
	addiu	$a1, $a1, %lo(sel_forwardingTargetForSelector_)
	lw	$a2, 16($sp)
#ifdef __PIC__
	move	$t9, $v0
	jalr	$t9
#else
	jalr	$v0
#endif
	sw	$v0, 12($sp)

	lw	$gp, 0($sp)
	move	$a0, $v0
	lw	$a1, 16($sp)
#ifdef __PIC__
	lw	$t9, %call16(objc_msg_lookup_stret)($gp)
	jalr	$t9
#else
	jal	objc_msg_lookup_stret
#endif

#ifdef __mips_eabi
	lwc1	$f19, 68($sp)
	lwc1	$f18, 64($sp)
	lwc1	$f17, 60($sp)
	lwc1	$f16, 56($sp)
	lwc1	$f15, 52($sp)
	lwc1	$f14, 48($sp)
	lwc1	$f13, 44($sp)
	lwc1	$f12, 40($sp)

	lw	$11, 36($sp)
	lw	$10, 32($sp)
	lw	$9, 28($sp)
	lw	$8, 24($sp)
#endif
	lw	$a3, 20($sp)
	lw	$a2, 16($sp)
	lw	$a1, 12($sp)
	lw	$a0, 8($sp)
	lw	$ra, 4($sp)

	addiu	$sp, $sp, 72

#ifdef __PIC__
	move	$t9, $v0
	jr	$t9
#else
	jr	$v0
#endif
.type of_forward_stret, %function
.size of_forward_stret, .-of_forward_stret

init:
#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9

	lw	$a0, %got(module)($gp)