+ /* Ignore empty struct return value, if used. */
+ if (info->num_fields == 0 && ainfo->pass_empty_struct) {
+ ainfo->storage = ArgValuetypeInReg;
+ return;
+ }
+
+ /*
+ * Windows x86 ABI for returning structs of size 4 or 8 bytes (regardless of type) dictates that
+ * values are passed in EDX:EAX register pairs, https://msdn.microsoft.com/en-us/library/984x0h58.aspx.
+ * This is different compared to for example float or double return types (not in struct) that will be returned
+ * in ST(0), https://msdn.microsoft.com/en-us/library/ha59cbfz.aspx.
+ *
+ * Apples OSX x86 ABI for returning structs of size 4 or 8 bytes uses a slightly different approach.
+ * If a struct includes only one scalar value, it will be handled with the same rules as scalar values.
+ * This means that structs with one float or double will be returned in ST(0). For more details,
+ * https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html.
+ */
+#if !defined(TARGET_WIN32)
+