From 62277541b0ea1c687c64df79a543f776b9f58f29 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 9 Sep 2015 09:47:57 +0200 Subject: Added an builtin for the atomic exchange operation. The new builtin __builtin_atomic_exchange(int *a, int *b, int *c) stores *b in *a and sets *c to the old value of *a. --- powerpc/CBuiltins.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'powerpc/CBuiltins.ml') diff --git a/powerpc/CBuiltins.ml b/powerpc/CBuiltins.ml index e219a175..1c7a3086 100644 --- a/powerpc/CBuiltins.ml +++ b/powerpc/CBuiltins.ml @@ -118,7 +118,10 @@ let builtins = { (TPtr (TVoid [],[]),[],false); (* isel *) "__builtin_isel", - (TInt (IInt, []),[TInt(IInt, []);TInt(IInt, []);TInt(IInt, [])],false) + (TInt (IInt, []),[TInt(IInt, []);TInt(IInt, []);TInt(IInt, [])],false); + (* atomic operations *) + "__builtin_atomic_exchange", + (TVoid [], [TPtr (TInt(IInt, []),[]);TPtr (TInt(IInt, []),[]);TPtr (TInt(IInt, []),[])],false) ] } -- cgit