diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-10 10:20:15 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-10 10:20:15 +0200 |
commit | 41655f6c8d38270cc50407b0141b443f6ee90100 (patch) | |
tree | 838b8432f9a66123ca876579298e2eb34b51d407 /powerpc/Asmexpand.ml | |
parent | be6dc9e64912901b8217f56656d770f957d15cb4 (diff) | |
download | compcert-41655f6c8d38270cc50407b0141b443f6ee90100.tar.gz compcert-41655f6c8d38270cc50407b0141b443f6ee90100.zip |
Added builtin for atomic compare and exchange.
The new __builtin_atomic_compare_exchange(int *ptr,int *exp,int *dsr);
writes dsr into ptr if ptr is equal to exp and returns true if
ptr is not equal to exp it writes ptr into exp and returns false.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r-- | powerpc/Asmexpand.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index beaef42f..8cd123fe 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -527,7 +527,7 @@ let expand_builtin_inline name args res = and lblneq = new_label () and lblsucc = new_label () in emit (Plwz (GPR10,Cint _0,exp)); - emit (Plwz (GPR11,Cint _0,exp)); + emit (Plwz (GPR11,Cint _0,des)); emit (Psync); emit (Plabel lbls); emit (Plwarx (GPR12,GPR0,dst)); |