aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/CBuiltins.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-07 19:35:02 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-07 19:35:02 +0200
commit73e20bd6e0586e38fbc7d87d8c306fad7b578418 (patch)
tree3b4ffcfd6ab4df231a2fa66716fa58b4d5ab1b76 /powerpc/CBuiltins.ml
parent76d82e41797ef79531e6bf3d530f380dddd3310e (diff)
downloadcompcert-kvx-73e20bd6e0586e38fbc7d87d8c306fad7b578418.tar.gz
compcert-kvx-73e20bd6e0586e38fbc7d87d8c306fad7b578418.zip
Added builtins for call frame and return address.
This builtins can be used to get the call frame address and the return address. To correctly compute the load address of the return address the allocframe is extended to contain the offset of the return address.
Diffstat (limited to 'powerpc/CBuiltins.ml')
-rw-r--r--powerpc/CBuiltins.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/powerpc/CBuiltins.ml b/powerpc/CBuiltins.ml
index 2e014b4c..6d7b2aff 100644
--- a/powerpc/CBuiltins.ml
+++ b/powerpc/CBuiltins.ml
@@ -110,7 +110,12 @@ let builtins = {
"__builtin_get_spr",
(TInt(IUInt, []), [TInt(IInt, [])], false);
"__builtin_set_spr",
- (TVoid [], [TInt(IInt, []); TInt(IUInt, [])], false)
+ (TVoid [], [TInt(IInt, []); TInt(IUInt, [])], false);
+ (* Frame and return address *)
+ "__builtin_call_frame",
+ (TPtr (TVoid [],[]),[],false);
+ "__builtin_return_address",
+ (TPtr (TVoid [],[]),[],false)
]
}