Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
index 6d71bb919e..69ff811351 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
@@ -35,26 +35,18 @@ extern jint CPSSetProcessName(void *, jlong);
#define objc_msgSendSuper_bool objc_msgSendSuper
#define objc_msgSend_floatret objc_msgSend_fpret
-#ifndef __i386__
-#define objc_msgSend_fpret objc_msgSend
-#endif
/* The structure objc_super defines "class" in i386/ppc and "super_class" in x86_64 */
-#ifdef __i386__
-#define swt_super_class class
-#elif __ppc__
-#define swt_super_class class
-#elif __x86_64__
+#ifdef __x86_64__
#define swt_super_class super_class
#elif __arm64__
#define swt_super_class super_class
#endif
-#ifdef __i386__
-#define STRUCT_SIZE_LIMIT 8
-#elif __ppc__
-#define STRUCT_SIZE_LIMIT 4
-#elif __x86_64__
+/* STRUCT_SIZE_LIMIT is the maximum size of struct that can be returned using registers */
+/* When sizeof(struct) is greater than this limit, objc_msgSend*_stret call is used */
+/* objc_msgSend*_stret methods are not available on arm64 architecture, so objc_msgSend* calls are always used */
+#ifdef __x86_64__
#define STRUCT_SIZE_LIMIT 16
#elif __arm64__
#define STRUCT_SIZE_LIMIT 64

Back to the top