-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
According to C++ tests (build natively on the target machine), HFA(float) requires a 4-byte alignment that contradicts with a standard 8-byte alignment for all structs on arm64.
So when passing Vector3 a, Vector3 b on the stack they take 24 bytes, when on default arm64 it would take 32.
However, for a struct Vector3int {int x; int y; int z; } I see normal 8-byte alignment, so 2 of them are taking 32 bytes on the stack.
This behavior is not explicitly described in Apple docs (Writing ARM64 Code for Apple Platforms), so it would be nice to get a confirmation that it is expected.
The issue requires 3 things:
-
Distinguish HFA(float) from
structwhen create argInfo and putArgs; -
Fix code in morph args (
fgInitArgInfo) and codegen (genPutArgStk) that uses the assumption that SIMD12 arguments can be always propagated as SIMD16. -
If we have to support non-rounded putArgs for arm64 apple it could be beneficial for other platforms to use as well, because now we create temporary copies
Metadata
Metadata
Assignees
Labels
Type
Projects
Status