From 50f53a483e22c7ec71596da9984a496572e3436e Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 8 Dec 2013 12:25:48 -0800 Subject: [PATCH] How did this ever work? Fixing and*. --- src/alloy/frontend/ppc/ppc_emit_alu.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/alloy/frontend/ppc/ppc_emit_alu.cc b/src/alloy/frontend/ppc/ppc_emit_alu.cc index 23fbac2c7..5a6cdda1d 100644 --- a/src/alloy/frontend/ppc/ppc_emit_alu.cc +++ b/src/alloy/frontend/ppc/ppc_emit_alu.cc @@ -621,7 +621,7 @@ XEEMITTER(cmpli, 0x28000000, D )(PPCFunctionBuilder& f, InstrData& i) { XEEMITTER(andx, 0x7C000038, X )(PPCFunctionBuilder& f, InstrData& i) { // RA <- (RS) & (RB) - Value* ra = f.Add(f.LoadGPR(i.X.RT), f.LoadGPR(i.X.RB)); + Value* ra = f.And(f.LoadGPR(i.X.RT), f.LoadGPR(i.X.RB)); if (i.X.Rc) { f.UpdateCR(0, ra); } @@ -631,7 +631,7 @@ XEEMITTER(andx, 0x7C000038, X )(PPCFunctionBuilder& f, InstrData& i) { XEEMITTER(andcx, 0x7C000078, X )(PPCFunctionBuilder& f, InstrData& i) { // RA <- (RS) & ¬(RB) - Value* ra = f.Add(f.LoadGPR(i.X.RT), f.Not(f.LoadGPR(i.X.RB))); + Value* ra = f.And(f.LoadGPR(i.X.RT), f.Not(f.LoadGPR(i.X.RB))); if (i.X.Rc) { f.UpdateCR(0, ra); } @@ -641,7 +641,7 @@ XEEMITTER(andcx, 0x7C000078, X )(PPCFunctionBuilder& f, InstrData& i) { XEEMITTER(andix, 0x70000000, D )(PPCFunctionBuilder& f, InstrData& i) { // RA <- (RS) & (i48.0 || UI) - Value* ra = f.Add( + Value* ra = f.And( f.LoadGPR(i.D.RT), f.LoadConstant((uint64_t)i.D.DS)); f.UpdateCR(0, ra); @@ -651,7 +651,7 @@ XEEMITTER(andix, 0x70000000, D )(PPCFunctionBuilder& f, InstrData& i) { XEEMITTER(andisx, 0x74000000, D )(PPCFunctionBuilder& f, InstrData& i) { // RA <- (RS) & (i32.0 || UI || i16.0) - Value* ra = f.Add( + Value* ra = f.And( f.LoadGPR(i.D.RT), f.LoadConstant((uint64_t)(i.D.DS << 16))); f.UpdateCR(0, ra);