On Windows, X8 may be used to pass in the address of an aggregate that
is returned indirectly. Therefore, it should be forwarded to variadic
musttail calls and preserved in thunks.
Fixes PR41997
Differential D62344
[AArch64] Preserve X8 for thunks ending in variadic musttail calls rnk on May 23 2019, 1:53 PM. Authored by
Details On Windows, X8 may be used to pass in the address of an aggregate that Fixes PR41997
Diff Detail
Event TimelineComment Actions The varargs argument list for a function normally can't contain an sret parameter; I guess musttail vararg lists are special. Maybe worth calling out in the LangRef description of mustttail? (I guess you could argue that sret is an ABI issue which is inherently target-specific, but it still seems a little surprising.) Otherwise LGTM Comment Actions There was half a sentence in langref about forwarding varargs, but it was really meant to be a stronger guarantee. I added another bullet there, feel free to take a look and suggest improvements.
Thanks. |