[PATCH] D13789: [safestack] Fast access to the unsafe stack pointer on AArch64/Android (2nd try).

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 15:21:23 PDT 2015


eugenis created this revision.
eugenis added reviewers: echristo, rengolin.
eugenis added a subscriber: llvm-commits.
eugenis set the repository for this revision to rL LLVM.
Herald added subscribers: srhines, danalbert, tberghammer, rengolin, aemerson.

Android libc provides a fixed TLS slot for the unsafe stack pointer,
 and this change implements direct access to that slot on AArch64 via
 __builtin_thread_pointer() + offset.
    
This change also moves more code into TargetLowering and its
target-specific subclasses to get rid of target-specific codegen
in SafeStackPass.
    
This change does not touch the ARM backend because ARM lowers
builting_thread_pointer as aeabi_read_tp, which is not available
on Android.

This is a second attempt which leave the generic, compiler-rt-based implementation in SafeStack.cpp. This way things still work even when there is no TargetMachine.


Repository:
  rL LLVM

http://reviews.llvm.org/D13789

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Transforms/Instrumentation/SafeStack.cpp
  test/Transforms/SafeStack/AArch64/abi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13789.37527.patch
Type: text/x-patch
Size: 11374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151015/b1214e06/attachment.bin>


More information about the llvm-commits mailing list