aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Asmexpand.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-21 17:49:22 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-21 17:49:22 +0200
commit3174d685154a1e0febf305d305fc79422a1adcd3 (patch)
tree185cbc49bea43ddb179bf372321aa0abc1f84348 /powerpc/Asmexpand.ml
parentbc1fbdd0baaab41aa048b3214ec71bb0cc04dfcc (diff)
downloadcompcert-kvx-3174d685154a1e0febf305d305fc79422a1adcd3.tar.gz
compcert-kvx-3174d685154a1e0febf305d305fc79422a1adcd3.zip
Removed unnecessary move register and use the correct register as base value for the rlwinm.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r--powerpc/Asmexpand.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index 9a3804a0..23704feb 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -533,12 +533,11 @@ let expand_builtin_inline name args res =
(* Here, CR2 is true if the exchange succeeded, false if it failed *)
emit (Pisync);
emit (Pmfcr dst);
- emit (Prlwinm (res,res,(Z.of_uint 3),_1));
+ emit (Prlwinm (res,dest,(Z.of_uint 3),_1));
(* Update exp with the current value of dst if the exchange failed *)
emit (Pbt (CRbit_2,lblsucc));
emit (Pstw (GPR0,Cint _0,exp));
- emit (Plabel lblsucc);
- emit (Pmr (res,dst))
+ emit (Plabel lblsucc)
(* Catch-all *)
| _ ->
raise (Error ("unrecognized builtin " ^ name))