Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.
This repository was archived by the owner on Dec 27, 2025. It is now read-only.

32-bit CPU iPhone and 64-bit CPU Mac will crash when return type is CGSize #64

@onesmash

Description

@onesmash

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.

  1. 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.
  2. Scalars 4 bytes in size (such as long, int, and pointers, including array pointers) are placed in GPR3.
  3. Values of type long long are returned in the high word of GPR3 and the low word of GPR4.
  4. Floating-point values are placed in FPR1.
  5. 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.

5685a99e-780d-48fb-ac01-f8126da7a710

x86_64 is more complicated, I don't know how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions