[PATCH] D13455: [safestack] Fast access to the unsafe stack pointer on AArch64/Android.

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 15:17:41 PDT 2015


rengolin added inline comments.

================
Comment at: include/llvm/Target/TargetLowering.h:1951
@@ -1954,1 +1950,3 @@
 
+  const char *kAndroidUnsafeStackPtrAddrFn = "__safestack_pointer_address";
+
----------------
echristo wrote:
> Should probably be folded in.
I was thinking about this one, too. It's only ever used once.

================
Comment at: lib/CodeGen/TargetLoweringBase.cpp:1665-1666
@@ -1664,1 +1664,4 @@
 
+/// Android provides a libc function to retrieve the address of the current
+/// thread's unsafe stack pointer.
+Value *TargetLoweringBase::getSafeStackPointerLocation(IRBuilder<> &IRB) const {
----------------
echristo wrote:
> This comment should go with the Android bits below and a generic comment above the function. Might be better to just duplicate the code in every target rather than have a generic one only implemented for for android (i.e. if there were a generic function in compiler-rt it might make more sense).
Especially when no one it using it...


Repository:
  rL LLVM

http://reviews.llvm.org/D13455





More information about the llvm-commits mailing list