Microsoft's C++ object model for ARM64 is the same as that for X86_64. For example, small structs with non-trivial copy constructors or virtual function tables are passed indirectly. Currently, they are passed in registers when compiled with clang.
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
This seems to be another case of all other arches being the same while x86_32 is different. The thumb case (with same actual code as x86_64) has a comment about a corner case where this doesn't match MSVC exactly, does that also apply here?
Yes, it looks like the comment for the thumb case is applicable here as well. VC++ on ARM64 passes small structs with a destructor and a default copy constructor in a register, while clang passes them on the stack. I will probably address this in a separate patch.
Updated to address Martin's observation. Verified that small structs with default copy constructors and non-trivial destructors are passed in registers on ARM64 Windows.
Last change before committing to address Reid's point of using CCK_MicrosoftWin64 for Windows on both X86_64 and ARM64.
This is poorly named. I'll try to send a patch to rename it after this lands.