[PATCH] D21612: [compiler-rt] [XRay] Basic initialization and flag definition for XRay runtime

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 13:16:58 PDT 2016


rnk added inline comments.

================
Comment at: compiler-rt/trunk/lib/xray/xray_trampoline_x86.S:90
@@ +89,3 @@
+	popq	%rbp
+	retq
+.Ltmp3:
----------------
rSerge wrote:
> rnk wrote:
> > rSerge wrote:
> > > Shouldn't it be RETL for x86 and RETQ for x86_64 ? The original instruction in the compile-time sled could be RETL (then we should do RETL too) or RETQ (then we should do RETQ too), I think.
> > This is definitely x86_64 only code. Perhaps this file should be renamed xray_trampoline_x86_64.S
> Please, see llvm/trunk/lib/Target/X86/X86InstrInfo.cpp at https://reviews.llvm.org/D19904 : the instrumentation seems to be performed for both x86 and x86_64 (at least, both RETL and RETQ are marked for replacement), so I'm afraid that on x86 the code from the current file (which is x86_64 only) may try to execute.
Sure, but this whole assembly file won't assemble for 32-bit. It uses RSP, RDX, R10, pushq, etc, and those are 64-bit only. We'd need a separate .s file to really support 32-bit.


Repository:
  rL LLVM

https://reviews.llvm.org/D21612





More information about the llvm-commits mailing list