When we compile a function on Arm64EC, the function need arm64 function signature, and a corresponding x64 signature.
The frontend always generates the function with the arm64 signature, and thunk generation translates that to the x64 signature.
For now only from arm64 signature function type we can't translate all kinds of function to x64 signature.
So this change add a attribute to contain structure's original size to help thunk generation pass to generate correct x64 signature.
Details
Details
- Reviewers
efriedma
Diff Detail
Diff Detail
- Build Status
Buildable 188330
Event Timeline
Comment Actions
Using "Sign" as an abbreviation for "Signature" is confusing. Avoid abbreviating if you can; if you think it's necessary, use "Sig" as shorthand for "Signature".
Not sure it's the right thing to put in the name of the attribute, though; the name of the attribute should probably mention it's the "size" of the argument. Maybe just arm64ec_arg_size().
This looks like it matches the approach I suggested.
clang/lib/CodeGen/CGCall.cpp | ||
---|---|---|
2338 | Ty->isArrayType() will never be true; type promotion rules don't allow specifying an array as a function argument. | |
2340 | Please use getTypeSizeInChars(). |
Ty->isArrayType() will never be true; type promotion rules don't allow specifying an array as a function argument.