1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

For PR1028:

Add the llvm.stacksave and llvm.stackrestore intrinsics that correspond
to the GCC builtins __builtin_stack_save and __builtin_stack_restore. This
allows the CBE to execute these builtins, and fixes:

   test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll
   External/SPEC/CINT2000/176.gcc (CBE)

Patch by Gordon Henriksen.

llvm-svn: 33313
This commit is contained in:
Reid Spencer 2007-01-17 23:33:20 +00:00
parent 145fef9445
commit 1f1443b916

View File

@ -138,8 +138,10 @@ def int_gcwrite : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty,
// //
def int_returnaddress : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>; def int_returnaddress : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>;
def int_frameaddress : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>; def int_frameaddress : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>;
def int_stacksave : Intrinsic<[llvm_ptr_ty], [IntrReadMem]>; def int_stacksave : Intrinsic<[llvm_ptr_ty], [IntrReadMem]>,
def int_stackrestore : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>; GCCBuiltin<"__builtin_stack_save">;
def int_stackrestore : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>,
GCCBuiltin<"__builtin_stack_restore">;
def int_prefetch : Intrinsic<[llvm_void_ty, llvm_ptr_ty, def int_prefetch : Intrinsic<[llvm_void_ty, llvm_ptr_ty,
llvm_i32_ty, llvm_i32_ty]>; llvm_i32_ty, llvm_i32_ty]>;
def int_pcmarker : Intrinsic<[llvm_void_ty, llvm_i32_ty]>; def int_pcmarker : Intrinsic<[llvm_void_ty, llvm_i32_ty]>;