From 73e20bd6e0586e38fbc7d87d8c306fad7b578418 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 7 Sep 2015 19:35:02 +0200 Subject: 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. --- powerpc/CBuiltins.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'powerpc/CBuiltins.ml') 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) ] } -- cgit