[PATCH] D19852: [safestack] Use non-thread-local unsafe stack pointer for Contiki OS

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 15:22:45 PDT 2016


pcc added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:2025
@@ -2024,1 +2024,3 @@
 Value *X86TargetLowering::getSafeStackPointerLocation(IRBuilder<> &IRB) const {
+  if (Subtarget.isTargetContiki()) {
+    const char *Name = "__safestack_unsafe_stack_ptr";
----------------
You might also consider moving the SafeStack::getOrCreateUnsafeStackPtr implementation into a utility function in TargetLoweringBase that takes a bool UseTLS. Then guarantee that getSafeStackPointerLocation always returns non-null and you can remove SafeStack::getOrCreateUnsafeStackPtr altogehter.


https://reviews.llvm.org/D19852





More information about the llvm-commits mailing list