https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91489

--- Comment #3 from Paul Gofman <gofmanp at gmail dot com> ---
(In reply to Martin Liška from comment #2)
> @Paul: Can you please send the patch to GCC patches mailing list?

I think I found later that unfortunately this patch is not quite correct: the
stack was still wrong under certain conditions, IIRC at least (but probably not
only) if __attribute__((optimize("omit-frame-pointer"))) is additionally used
on function. I thought that such sort of fix looks more like a workaround
anyway. Probably a better fix would be to either track stack pointer properly
upon generating ms hook prologue or maybe enforce some function attributes if
ms_hook_prologue is used, but that time I did not dig gcc code deep enough to
find how to do that right.

I am currently away for about 2 weeks, after that I could get back to it and at
least update the test to indicate how it is still wrong with such a patch.

Reply via email to