mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Implement the stack protector stack accesses via intrinsics:
- stackprotector_prologue creates a stack object and stores the guard there. - stackprotector_epilogue reads the stack guard from the stack position created by stackprotector_prologue. - The PrologEpilogInserter was changed to make sure that the stack guard is first on the stack frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -165,6 +165,7 @@ def int_stacksave : Intrinsic<[llvm_ptr_ty]>,
|
||||
GCCBuiltin<"__builtin_stack_save">;
|
||||
def int_stackrestore : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>,
|
||||
GCCBuiltin<"__builtin_stack_restore">;
|
||||
|
||||
// IntrWriteArgMem is more pessimistic than strictly necessary for prefetch,
|
||||
// however it does conveniently prevent the prefetch from being reordered
|
||||
// with respect to nearby accesses to the same memory.
|
||||
@@ -175,6 +176,10 @@ def int_pcmarker : Intrinsic<[llvm_void_ty, llvm_i32_ty]>;
|
||||
|
||||
def int_readcyclecounter : Intrinsic<[llvm_i64_ty]>;
|
||||
|
||||
// Stack protector intrinsics.
|
||||
def int_stackprotector_prologue : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>;
|
||||
def int_stackprotector_epilogue : Intrinsic<[llvm_ptr_ty]>;
|
||||
|
||||
//===------------------- Standard C Library Intrinsics --------------------===//
|
||||
//
|
||||
|
||||
|
Reference in New Issue
Block a user