Skip to content

Commit 4e6b9f2

Browse files
authored
Merge pull request swiftlang#85568 from swiftlang/revert-85403-wip-ret-rel-perf
Revert "[Runtime] Don't use write back in EIC retain/release"
2 parents 512ef2e + 0502f0d commit 4e6b9f2

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

stdlib/public/SwiftDirectRuntime/RetainRelease.s

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ Lslowpath_release:
192192
// Save/restore the preservemost registers and call swift_retain.
193193
Lcall_swift_release:
194194
maybe_pacibsp
195-
sub sp, sp, #0x50
196-
str x9, [sp]
195+
str x9, [sp, #-0x50]!
197196
stp x10, x11, [sp, #0x10]
198197
stp x12, x13, [sp, #0x20]
199198
stp x14, x15, [sp, #0x30]
@@ -208,14 +207,12 @@ Lcall_swift_release:
208207
ldp x14, x15, [sp, #0x30]
209208
ldp x12, x13, [sp, #0x20]
210209
ldp x10, x11, [sp, #0x10]
211-
ldr x9, [sp]
212-
add sp, sp, #0x50
210+
ldr x9, [sp], #0x50
213211
ret_maybe_ab
214212

215213
LbridgeObjectReleaseDirectObjC:
216214
maybe_pacibsp
217-
sub sp, sp, #0x50
218-
stp x0, x9, [sp]
215+
stp x0, x9, [sp, #-0x50]!
219216
stp x10, x11, [sp, #0x10]
220217
stp x12, x13, [sp, #0x20]
221218
stp x14, x15, [sp, #0x30]
@@ -230,8 +227,7 @@ LbridgeObjectReleaseDirectObjC:
230227
ldp x14, x15, [sp, #0x30]
231228
ldp x12, x13, [sp, #0x20]
232229
ldp x10, x11, [sp, #0x10]
233-
ldp x0, x9, [sp]
234-
add sp, sp, #0x50
230+
ldp x0, x9, [sp], #0x50
235231
LbridgeObjectReleaseObjCRet:
236232
ret_maybe_ab
237233

@@ -334,8 +330,7 @@ Lslowpath_retain:
334330
// Save/restore the preservemost registers and call swift_retain.
335331
Lcall_swift_retain:
336332
maybe_pacibsp
337-
sub sp, sp, #0x50
338-
stp x0, x9, [sp]
333+
stp x0, x9, [sp, #-0x50]!
339334
stp x10, x11, [sp, #0x10]
340335
stp x12, x13, [sp, #0x20]
341336
stp x14, x15, [sp, #0x30]
@@ -350,14 +345,12 @@ Lcall_swift_retain:
350345
ldp x14, x15, [sp, #0x30]
351346
ldp x12, x13, [sp, #0x20]
352347
ldp x10, x11, [sp, #0x10]
353-
ldp x0, x9, [sp]
354-
add sp, sp, #0x50
348+
ldp x0, x9, [sp], #0x50
355349
ret_maybe_ab
356350

357351
Lswift_bridgeObjectRetainDirectObjC:
358352
maybe_pacibsp
359-
sub sp, sp, #0x50
360-
stp x0, x9, [sp]
353+
stp x0, x9, [sp, #-0x50]!
361354
stp x10, x11, [sp, #0x10]
362355
stp x12, x13, [sp, #0x20]
363356
stp x14, x15, [sp, #0x30]
@@ -372,8 +365,7 @@ Lswift_bridgeObjectRetainDirectObjC:
372365
ldp x14, x15, [sp, #0x30]
373366
ldp x12, x13, [sp, #0x20]
374367
ldp x10, x11, [sp, #0x10]
375-
ldp x0, x9, [sp]
376-
add sp, sp, #0x50
368+
ldp x0, x9, [sp], #0x50
377369
ret_maybe_ab
378370

379371
#else

0 commit comments

Comments
 (0)