[PATCH] D15549: [X86] Use push-pop for materializing small constants under 'minsize'

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 19:58:35 PST 2015


majnemer added a subscriber: majnemer.
majnemer added a comment.

Hi Hans,

Compiling `int f() { return -1; }` with x86_64-pc-win32 gives:

  f:                                      # @f
  .Ltmp0:
  .seh_proc f
  # BB#0:                                 # %entry
  .Ltmp1:
          .seh_endprologue
          pushl   $-1
          popl    %eax
          retq
          .seh_handlerdata
          .text
  .Ltmp2:
          .seh_endproc

I believe this is a violation of the x64 ABI because your program has stack pointer adjustments after the prologue without also having a frame pointer.


http://reviews.llvm.org/D15549





More information about the llvm-commits mailing list