Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-01-15 14:25:04 +0000
committerLakshmi Shanmugam2021-01-15 14:25:04 +0000
commit74bac53a3ad150bd2e6113246c9ed79c079534c5 (patch)
treeeb5fb0fd668ad0bdda82411bb900232b7462b89d
parent7fad7e445c60c8f2677ee45fc49b6d783de185c0 (diff)
downloadeclipse.platform.swt-mac_arm64.tar.gz
eclipse.platform.swt-mac_arm64.tar.xz
eclipse.platform.swt-mac_arm64.zip
Remove i386 and ppc code from os.h. Add comments from STRUCT_SIZE_LIMITmac_arm64
Change-Id: Ibbd2e5a4da6fb67ed3161fb9653c613b0a9b0ba2 Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
-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