Remove i386 and ppc code from os.h. Add comments from STRUCT_SIZE_LIMIT Change-Id: Ibbd2e5a4da6fb67ed3161fb9653c613b0a9b0ba2 Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
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 6d71bb9..69ff811 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 @@ #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