[PATCH] Update preferred_stack_boundary only when expanding function call
H.J. Lu
hjl.tools@gmail.com
Thu Jun 6 18:05:00 GMT 2019
locate_and_pad_parm is called when expanding function call from
initialize_argument_information and when generating function body
from assign_parm_find_entry_rtl:
/* Remember if the outgoing parameter requires extra alignment on the
calling function side. */
if (crtl->stack_alignment_needed < boundary)
crtl->stack_alignment_needed = boundary;
if (crtl->preferred_stack_boundary < boundary)
crtl->preferred_stack_boundary = boundary;
stack_alignment_needed and preferred_stack_boundary should be updated
only when expanding function call, not when generating function body.
Add an argument, outgoing_p, to locate_and_pad_parm to indicate for
expanding function call. Update stack_alignment_needed and
preferred_stack_boundary if the parameter is passed on stack and only
when expanding function call.
Tested on Linux/x86-64.
OK for trunk?
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-preferred_stack_boundary-only-when-expanding-.patch
Type: text/x-patch
Size: 5748 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190606/20b07fe0/attachment.bin>
More information about the Gcc-patches
mailing list