[PATCH] D19386: [SPARC] [SSP] Add support for LOAD_STACK_GUARD.
Marcin KoĆcielnicki via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 03:03:54 PDT 2016
koriakin added a comment.
In http://reviews.llvm.org/D19386#411664, @jyknight wrote:
> Looks reasonable. OK, with requested comment addition.
>
> (BTW: the current interface in llvm for overriding the behavior of SSP seems unnecessarily confusing, I hope that gets cleaned up at some point.)
Yeah, there are several, and it's a mess. The LOAD_STACK_GUARD is the most confusing so far, with the justification that it avoids spilling the correct guard onto the stack, thus nullifying the protection...
================
Comment at: lib/Target/Sparc/SparcInstrInfo.cpp:500
@@ +499,3 @@
+ "Only Linux target is expected to contain LOAD_STACK_GUARD");
+ const int64_t Offset = Subtarget.is64Bit() ? 0x28 : 0x14;
+ MI->setDesc(get(Subtarget.is64Bit() ? SP::LDXri : SP::LDri));
----------------
jyknight wrote:
> Is there some ABI documentation that mentions these offsets? Or is this simply offsetof(tcbhead_t, stack_guard) from sysdeps/sparc/nptl/tls.h in glibc?
>
> Can you add a comment here, whatever the source?
I'm afraid not, it's just offsetof in tcbhead_t. I copied these from gcc. I'll add a comment.
Repository:
rL LLVM
http://reviews.llvm.org/D19386
More information about the llvm-commits
mailing list