[PATCH] D32202: [XRay][compiler-rt] Fix up CFI annotations and stack alignment

Martin Pelikán via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 23:38:00 PDT 2017


pelikan added a comment.

As discussed, the first CFA offset should be 8 when the trampoline is entered using JMP (16 is for CALL insns which save RIP onto the stack).  The other number does NOT include the first number because the directive represents the amount of bytes from RSP.  Therefore it will NOT be a multiple of 16 because the last set of registers we save are 16B each, and the number will end with that final 8 caused by the initial PUSH RBP.  And these things should really go into the SAVE_REGISTERS macro since in the case of stack overflow, we want the precise information in gdb.

Math is hard, let's go shopping.


Repository:
  rL LLVM

https://reviews.llvm.org/D32202





More information about the llvm-commits mailing list