diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-09 09:47:57 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-09 09:47:57 +0200 |
commit | 62277541b0ea1c687c64df79a543f776b9f58f29 (patch) | |
tree | 018b97b58a96f6c778db85ed16b382e295efee31 /powerpc/CBuiltins.ml | |
parent | fc4af0aa2601b290ec62dceef11599171f056770 (diff) | |
download | compcert-kvx-62277541b0ea1c687c64df79a543f776b9f58f29.tar.gz compcert-kvx-62277541b0ea1c687c64df79a543f776b9f58f29.zip |
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.
Diffstat (limited to 'powerpc/CBuiltins.ml')
-rw-r--r-- | powerpc/CBuiltins.ml | 5 |
1 files changed, 4 insertions, 1 deletions
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) ] } |