[PATCH] D98789: [PEI] add dwarf information for stack probe

YangKeao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 22:39:41 PDT 2021


YangKeao added inline comments.


================
Comment at: llvm/test/CodeGen/X86/stack-clash-large.ll:38
 ; CHECK-X86-32:      # %bb.0:
-; CHECK-X86-32-NEXT:    movl    %esp, %r11d
-; CHECK-X86-32-NEXT:    subl    $69632, %r11d # imm = 0x11000
----------------
efriedma wrote:
> BTW, this is completely broken; r11d doesn't exist on 32-bit x86.
Wow, surprising discovery. (I think) a "bad register name" should be given when compiling this codes? 

Is there any pass which will omit this problem? Run `clang -fstack-clash-protection -m32 -fomit-frame-pointer -S ` will generate codes containing `r11d`, which is bad. However, `clang -fstack-clash-protection -m32 -fomit-frame-pointer -c` and disassemble the output, the register used here will become `ebx`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98789/new/

https://reviews.llvm.org/D98789



More information about the llvm-commits mailing list