Skip to content

Commit

Permalink
Rename objc_msgSend_stret2_np to objc_msgSend_stret2
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Apr 17, 2024
1 parent 16dd6ff commit e2eb711
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Test/objc_msgSend_WoA64.mm
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ int main(int argc, char *argv[]) {
}

// Stret with inreg. Returned in x0.
S4 ret4 = ((S4(*)(id, SEL))objc_msgSend_stret2_np)(TestCls, @selector(stretInRegS4));
S4 ret4 = ((S4(*)(id, SEL))objc_msgSend_stret2)(TestCls, @selector(stretInRegS4));
for (int i = 0; i < 3; i++) {
assert(ret4.a[i] == i);
}

// Stret with inreg. Returned in x0.
S5 ret5 = ((S5(*)(id, SEL))objc_msgSend_stret2_np)(TestCls, @selector(stretInRegS5));
S5 ret5 = ((S5(*)(id, SEL))objc_msgSend_stret2)(TestCls, @selector(stretInRegS5));
assert(ret5.x == 42);

return 0;
Expand Down
4 changes: 2 additions & 2 deletions objc/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ OBJC_PUBLIC
id objc_msgSend_stret(id self, SEL _cmd, ...);

# if defined(_WIN32) && defined(__ARM_ARCH_ISA_A64)
id objc_msgSend_stret2_np(id self, SEL _cmd, ...);
id objc_msgSend_stret2(id self, SEL _cmd, ...);
# endif

#else
void objc_msgSend_stret(id self, SEL _cmd, ...);

# if defined(_WIN32) && defined(__ARM_ARCH_ISA_A64)
void objc_msgSend_stret2_np(id self, SEL _cmd, ...);
void objc_msgSend_stret2(id self, SEL _cmd, ...);
# endif

#endif
Expand Down
14 changes: 7 additions & 7 deletions objc_msgSend.aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ CDECL(objc_msgSend_stret):
We thus need two objc_msgSend functions on Windows on ARM64 for Sret:
1. objc_msgSend_stret for POD Sret
2. objc_msgSend_stret2_np for non-trivial Sret (like C++ class instances)
2. objc_msgSend_stret2 for non-trivial Sret (like C++ class instances)
*/
#ifdef _WIN32
.globl CDECL(objc_msgSend_stret2_np)
TYPE_DIRECTIVE(CDECL(objc_msgSend_stret2_np), %function)
CDECL(objc_msgSend_stret2_np):
MSGSEND objc_msgSend_stret2_np, x1, x2
.globl CDECL(objc_msgSend_stret2)
TYPE_DIRECTIVE(CDECL(objc_msgSend_stret2), %function)
CDECL(objc_msgSend_stret2):
MSGSEND objc_msgSend_stret2, x1, x2

.text
.def objc_msgSend;
Expand All @@ -237,7 +237,7 @@ CDECL(objc_msgSend_stret2_np):
.scl 2;
.type 32;
.endef
.def objc_msgSend_stret2_np;
.def objc_msgSend_stret2;
.scl 2;
.type 32;
.endef
Expand All @@ -246,5 +246,5 @@ CDECL(objc_msgSend_stret2_np):
.ascii " /EXPORT:objc_msgSend"
.ascii " /EXPORT:objc_msgSend_fpret"
.ascii " /EXPORT:objc_msgSend_stret"
.ascii " /EXPORT:objc_msgSend_stret2_np"
.ascii " /EXPORT:objc_msgSend_stret2"
#endif

0 comments on commit e2eb711

Please sign in to comment.