[PATCH] D36816: [XRay][compiler-rt] Support sled versioning for custom event sleds

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 11:10:39 PDT 2017


pcc added inline comments.


================
Comment at: lib/xray/xray_trampoline_x86_64.S:205
   .cfi_startproc
-	subq $16, %rsp
-	.cfi_def_cfa_offset 24
-	movq %rbp, 8(%rsp)
-	movq %rax, 0(%rsp)
+	SAVE_REGISTERS
 
----------------
Without backend support I'd expect you to need to realign the stack here. You can see how to do that by compiling any C function with `-mstackrealign`.


================
Comment at: test/xray/TestCases/Linux/custom-event-handler-alignment.cc:28
+void printer(void* ptr, size_t size) {
+  printf("handler called\n");
+}
----------------
Probably want to copy lines 19 and 20 from the function foo above in order to test that the stack is properly aligned in the event handler.


https://reviews.llvm.org/D36816





More information about the llvm-commits mailing list