ObjFW  Check-in [3d98184cc2]

Overview
Comment:Forwarding: Save FP args when using MIPS/EABI.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3d98184cc2d63982e3a553a8f62ac85d4cf9914cba2aac5eadba5bdf0703226e
User & Date: js on 2013-07-25 23:21:07
Other Links: manifest | tags
Context
2013-07-26
15:21
Add support for objc_msg_lookup_stret. check-in: 9713ad857d user: js tags: trunk
2013-07-25
23:21
Forwarding: Save FP args when using MIPS/EABI. check-in: 3d98184cc2 user: js tags: trunk
22:54
More -[forwardingTargetForSelector:] tests. check-in: 37ea76ea9d user: js tags: trunk
Changes

Modified src/forwarding-mips-elf.S from [39560a8c6a] to [6394ce1502].

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
of_forward:
#ifdef __PIC__
	lui	$gp, %hi(_gp_disp)
	addiu	$gp, $gp, %lo(_gp_disp)
	addu	$gp, $gp, $t9
#endif



	/*
	 * 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.
	 */
	addiu	$sp, -48
	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)









#endif

#ifdef __PIC__
	lw	$a1, %got(sel_forwardingTargetForSelector_)($gp)
#else
	lui	$a1, %hi(sel_forwardingTargetForSelector_)
#endif







>
>

|
|
|



<












>
>
>
>
>
>
>
>
>







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
of_forward:
#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

#ifdef __PIC__
	lw	$a1, %got(sel_forwardingTargetForSelector_)($gp)
#else
	lui	$a1, %hi(sel_forwardingTargetForSelector_)
#endif
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
	lw	$t9, %call16(objc_msg_lookup)($gp)
	jalr	$t9
#else
	jal	objc_msg_lookup
#endif

#ifdef __mips_eabi









	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, 48

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







>
>
>
>
>
>
>
>
>










>
|







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
118
119
120
121
122
123
124
125
126
127
	lw	$t9, %call16(objc_msg_lookup)($gp)
	jalr	$t9
#else
	jal	objc_msg_lookup
#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