[PATCH] D51524: [ARM64] [Windows] Handle funclets
Sanjin Sijaric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 03:44:27 PST 2018
ssijaric added a comment.
In https://reviews.llvm.org/D51524#1286331, @efriedma wrote:
> Oh, I guess there is one special case for the prologue I didn't mention: varargs functions. I think the patch handles that correctly already, but I'll add a test.
>
> For both dynamic allocas and stack realignment, the initial implementation of unwinding missed a significant rule: "r29 must point to the bottom of stack". That's probably straightforward to resolve, but I don't really want to do it in this patch (and I'm not sure what the practical effect is). Beyond that, there's probably more handling necessary to correctly handle a dynamic alloca inside a funclet (since we need to reset the frame pointer, but we still need access to the old frame pointer). And I don't really want to block this patch on solving that; it's obscure enough that it won't affect most code.
>
> I have a couple small fixes for stack realignment, a fix for a MachineVerifier failure, and a testcase for realignment; I'll upload a new version.
Hi Eli,
Yin and I looked at the rule that says fp must be at the bottom if alloca is present. We tried a few (simple) test cases to see if this would be a problem. We didn't encounter any issues with our very limited testing, so decided not to implement it at this time. From my recollection, the fp (or the fp/lr pair) has to be separated from the code that saves the callee-saved registers, and handled on its own so that it ends up pointing to the bottom.
Thank you for taking over this!!! I may have some time time between flights to look at this a bit more, depending on the internet connection.
Repository:
rL LLVM
https://reviews.llvm.org/D51524
More information about the llvm-commits
mailing list