OSDN Git Service

AArch64: Implement support for the shadowcallstack attribute.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 4 Apr 2018 21:55:44 +0000 (21:55 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 4 Apr 2018 21:55:44 +0000 (21:55 +0000)
commit70bca66be3b9af6d5359f731423ec7702f0f7f1a
tree3668743eb3f93d06c5086d66fbcba47ebbbb5230
parente9567627a27343f025321dcc4ebf08734e43161a
AArch64: Implement support for the shadowcallstack attribute.

The implementation of shadow call stack on aarch64 is quite different to
the implementation on x86_64. Instead of reserving a segment register for
the shadow call stack, we reserve the platform register, x18. Any function
that spills lr to sp also spills it to the shadow call stack, a pointer to
which is stored in x18.

Differential Revision: https://reviews.llvm.org/D45239

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329236 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/TargetParser.h
lib/Support/TargetParser.cpp
lib/Target/AArch64/AArch64CallingConvention.td
lib/Target/AArch64/AArch64FrameLowering.cpp
lib/Target/AArch64/AArch64RegisterInfo.cpp
lib/Target/AArch64/AArch64Subtarget.cpp
test/CodeGen/AArch64/shadow-call-stack.ll [new file with mode: 0644]