aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Asmexpand.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-11 12:05:31 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-11 12:05:31 +0200
commit0de3d126e70dfedfd6f74710da31c4b9636f900a (patch)
tree43b19f66ef97def541881bceebcbdac4cfca8fb2 /powerpc/Asmexpand.ml
parent2809e264a4c146b31b5009fba08f74d12126a1b3 (diff)
downloadcompcert-kvx-0de3d126e70dfedfd6f74710da31c4b9636f900a.tar.gz
compcert-kvx-0de3d126e70dfedfd6f74710da31c4b9636f900a.zip
Use the gcc version of atomic load.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r--powerpc/Asmexpand.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index 8cd123fe..5e26e8a6 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -499,12 +499,10 @@ let expand_builtin_inline name args res =
emit (Pisync);
emit (Pstw (GPR11,Cint _0,a3))
| "__builtin_atomic_load", [BA (IR a1); BA (IR a2)],_ ->
- let lbl = new_label() in
emit (Psync);
- emit (Plabel lbl);
emit (Plwz (a1,Cint _0,a1));
emit (Pcmpw (a1,a1));
- emit (Pbne lbl);
+ emit (Pbne_rel _4);
emit (Pisync);
emit (Pstw (a1,Cint _0, a2));
| "__builtin_sync_fetch_and_add", [BA (IR a1); BA(IR a2)], BR (IR res) ->