Aspects
Aspects copied to clipboard
32-bit CPU iPhone and 64-bit CPU Mac will crash when return type is CGSize
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/LowLevelABI/100-32-bit_PowerPC_Function_Calling_Conventions/32bitPowerPC.html#//apple_ref/doc/uid/TP40002438-SW13
Returning Results The following list describes where a function’s return value is passed to the caller.
- Scalars smaller than 4 bytes (such as char and short) are placed in the low word of GPR3. The register’s high word is undefined.
- Scalars 4 bytes in size (such as long, int, and pointers, including array pointers) are placed in GPR3.
- Values of type long long are returned in the high word of GPR3 and the low word of GPR4.
- Floating-point values are placed in FPR1.
- Composite values (such as struct and union) and values larger than 4 bytes are placed at the location pointed to by GPR3. See Passing Arguments for more information.
x86_64 is more complicated, I don't know how to fix it.
It will crash on iPhone5 when used in a static library.
Pull Requests welcome!