From 3174d685154a1e0febf305d305fc79422a1adcd3 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 21 Sep 2015 17:49:22 +0200 Subject: Removed unnecessary move register and use the correct register as base value for the rlwinm. --- powerpc/Asmexpand.ml | 5 ++--- 1 file 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)) -- cgit