This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79793] New: Incorrect stack alignment for interrupt handler in 64-bit


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

            Bug ID: 79793
           Summary: Incorrect stack alignment for interrupt handler in
                    64-bit
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: julia.koval at intel dot com
  Target Milestone: ---
            Target: x86-64

Section I6.14.2 64-Bit Mode Stack Frame in Intel SDM Vol 3 has

In IA-32e mode, the RSP is aligned to a 16-byte boundary before pushing the
stack
frame. The stack frame itself is aligned on a 16-byte boundary when the
interrupt
handler is called.

static unsigned int
ix86_minimum_incoming_stack_boundary (bool sibcall)
{
  unsigned int incoming_stack_boundary;

  /* Stack of interrupt handler is always aligned to MIN_STACK_BOUNDARY.
   */
  if (cfun->machine->func_type != TYPE_NORMAL)
    incoming_stack_boundary = MIN_STACK_BOUNDARY;

is incorrect for 64-bit mode.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]