From 74bac53a3ad150bd2e6113246c9ed79c079534c5 Mon Sep 17 00:00:00 2001 From: Lakshmi Shanmugam Date: Fri, 15 Jan 2021 15:25:04 +0100 Subject: Remove i386 and ppc code from os.h. Add comments from STRUCT_SIZE_LIMIT Change-Id: Ibbd2e5a4da6fb67ed3161fb9653c613b0a9b0ba2 Signed-off-by: Lakshmi Shanmugam --- .../org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h | 18 +++++------------- 1 file 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 -- cgit v1.2.3