Bug 78962 - i386: Missed optimization: unaligned SSE movs with force_align_arg_pointer
Summary: i386: Missed optimization: unaligned SSE movs with force_align_arg_pointer
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-01 07:25 UTC by Daniel Santos
Modified: 2017-05-19 08:56 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2017-01-01 07:25:13 UTC
void b (void);  /* Normal System V function.  */
__attribute__((ms_abi, force_align_arg_pointer)) void a (void)
{
    b ();
}

When using __attribute__((force_align_arg_pointer)) on 64-bit code, the stack pointer is re-aligned, but SSE movs in pro/epilogues to save/restore clobbers caused by the Microsoft ABI function calling a System V function are emitted unaligned.  I posted a patchset for this problem here https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01924.html.  Uros advised to resubmit when the next stage 1 rolls around, so filing a bug for now.