ObjFW  Check-in [d8b9ec4ce4]

Overview
Comment:lookup-asm-powerpc-elf.S: Support non-PIC targets
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d8b9ec4ce43f2ba233a8121cb06f1fc505278942cccf824a1ade547497a74b6e
User & Date: js on 2020-11-24 00:09:07
Other Links: manifest | tags
Context
2020-11-25
00:40
Clean up unnecessary build variables check-in: 590bbe7203 user: js tags: trunk
2020-11-24
00:09
lookup-asm-powerpc-elf.S: Support non-PIC targets check-in: d8b9ec4ce4 user: js tags: trunk
2020-11-23
23:43
forwarding-powerpc-elf.S: Non-PIC optimization check-in: 191b809f87 user: js tags: trunk
Changes

Modified src/runtime/lookup-asm/lookup-asm-powerpc-elf.S from [6a0efd2f1b] to [b5f4644a75].

47
48
49
50
51
52
53

54



55
56
57
58

59
60
61
62
63
64
65
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70







+

+
+
+




+







#ifdef OF_SELUID24
	lwzx	%r5, %r5, %r6
#endif
	lwzx	%r5, %r5, %r7
	lwzx	%r5, %r5, %r8

	cmpwi	%r5, 0
#ifdef OF_PIC
	beq-	0f
#else
	beq-	\not_found
#endif

	mr	%r3, %r5
	blr

#ifdef OF_PIC
0:
	stwu	%r1, -16(%r1)
	mflr	%r0	
	stw	%r0, 20(%r1)
	stw	%r30, 8(%r1)

	bl	0f
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
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
118







+


+









+
+
+
+




+

+
+
+
+








	lwz	%r30, 8(%r1)
	lwz	%r0, 20(%r1)
	addi	%r1, %r1, 16
	mtlr	%r0

	bctr
#endif

.Ltagged_pointer_\name:
#ifdef OF_PIC
	mflr	%r7
	bl	0f
0:
	mflr	%r6
	mtlr	%r7
	addis	%r6, %r6, .Lbiased_got2-0b@ha
	addi	%r6, %r6, .Lbiased_got2-0b@l

	lwz	%r5, .Lgot_objc_tagged_pointer_secret-.Lbiased_got2(%r6)
#else
	lis	%r5, objc_tagged_pointer_secret@ha
	addi	%r5, %r5, objc_tagged_pointer_secret@l
#endif
	lwz	%r5, 0(%r5)
	xor	%r5, %r3, %r5
	rlwinm	%r5, %r5, 1, 0x1C

#ifdef OF_PIC
	lwz	%r6, .Lgot_objc_tagged_pointer_classes-.Lbiased_got2(%r6)
#else
	lis	%r6, objc_tagged_pointer_classes@ha
	addi	%r6, %r6, objc_tagged_pointer_classes@l
#endif
	lwzx	%r5, %r6, %r5
	lwz	%r5, 32(%r5)

	b	.Lmain_\name
.type \name, @function
.size \name, .-\name
.endm
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149

150
151
152
153
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171







+










+




	li	%r3, 0
	blr

get_pc:
	mflr	%r3
	blr

#ifdef OF_PIC
.section .got2, "aw"
.Lbiased_got2 = .+0x8000
.Lgot_objc_method_not_found:
	.long objc_method_not_found
.Lgot_objc_method_not_found_stret:
	.long objc_method_not_found_stret
.Lgot_objc_tagged_pointer_secret:
	.long objc_tagged_pointer_secret
.Lgot_objc_tagged_pointer_classes:
	.long objc_tagged_pointer_classes
#endif

#ifdef OF_LINUX
.section .note.GNU-stack, "", @progbits
#endif