mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-08 12:23:39 +00:00
[WinEH] Add localaddress intrinsic instead of using frameaddress
Clang uses this for SEH finally. The new intrinsic will produce the right value when stack realignment is required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -268,15 +268,23 @@ def int_gcwrite : Intrinsic<[],
|
||||
//
|
||||
def int_returnaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_frameaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_localescape : Intrinsic<[], [llvm_vararg_ty]>;
|
||||
def int_localrecover : Intrinsic<[llvm_ptr_ty],
|
||||
[llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty],
|
||||
[IntrNoMem]>;
|
||||
def int_read_register : Intrinsic<[llvm_anyint_ty], [llvm_metadata_ty],
|
||||
[IntrReadMem], "llvm.read_register">;
|
||||
def int_write_register : Intrinsic<[], [llvm_metadata_ty, llvm_anyint_ty],
|
||||
[], "llvm.write_register">;
|
||||
|
||||
// Gets the address of the local variable area. This is typically a copy of the
|
||||
// stack, frame, or base pointer depending on the type of prologue.
|
||||
def int_localaddress : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>;
|
||||
|
||||
// Escapes local variables to allow access from other functions.
|
||||
def int_localescape : Intrinsic<[], [llvm_vararg_ty]>;
|
||||
|
||||
// Given a function and the localaddress of a parent frame, returns a pointer
|
||||
// to an escaped allocation indicated by the index.
|
||||
def int_localrecover : Intrinsic<[llvm_ptr_ty],
|
||||
[llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty],
|
||||
[IntrNoMem]>;
|
||||
// Note: we treat stacksave/stackrestore as writemem because we don't otherwise
|
||||
// model their dependencies on allocas.
|
||||
def int_stacksave : Intrinsic<[llvm_ptr_ty]>,
|
||||
|
||||
Reference in New Issue
Block a user