From 4f187fdafdac0cf4a8b83964c89d79741dbd813e Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 21 Aug 2015 17:53:44 +0200 Subject: Adapt the PowerPC port to the new builtin representation. __builtin_get_spr() and __builtin_set_spr() work, but horrible error message if the SPR argument is not a constant. powerpc/AsmToJSON.ml needs updating. --- 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 06a7e395..75dbd23d 100644 --- a/powerpc/CBuiltins.ml +++ b/powerpc/CBuiltins.ml @@ -93,7 +93,12 @@ let builtins = { "__builtin_dcbi", (TVoid [],[TPtr(TVoid [], [])],false); "__builtin_icbi", - (TVoid [],[TPtr(TVoid [], [])],false) + (TVoid [],[TPtr(TVoid [], [])],false); + (* Access to special registers *) + "__builtin_get_spr", + (TInt(IUInt, []), [TInt(IInt, [])], false); + "__builtin_set_spr", + (TVoid [], [TInt(IInt, []); TInt(IUInt, [])], false) ] } -- cgit