From 7dc8a5931f9f5229bff19fc9f709a95ce8b9ce4e Mon Sep 17 00:00:00 2001 From: gibbed Date: Fri, 24 Jan 2014 10:01:45 -0800 Subject: [PATCH] Quick hack fix for vsldoi128. --- src/alloy/frontend/ppc/ppc_emit_altivec.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alloy/frontend/ppc/ppc_emit_altivec.cc b/src/alloy/frontend/ppc/ppc_emit_altivec.cc index 2249deb94..d5a77c400 100644 --- a/src/alloy/frontend/ppc/ppc_emit_altivec.cc +++ b/src/alloy/frontend/ppc/ppc_emit_altivec.cc @@ -1351,7 +1351,9 @@ int InstrEmit_vsldoi_(PPCHIRBuilder& f, uint32_t vd, uint32_t va, uint32_t vb, u // vsldoi128 vr63,vr63,vr63,4 // (ABCD ABCD) << 4b = (BCDA) // (VA << SH) OR (VB >> (16 - SH)) - Value* control = f.LoadConstant(*((vec128_t*)(__vsldoi_table[sh]))); + vec128_t shift = *((vec128_t*)(__vsldoi_table[sh])); + for (int i = 0; i < 4; ++i) shift.i4[i] = XESWAP32BE(shift.i4[i]); + Value* control = f.LoadConstant(shift); Value* v = f.Permute( control, f.LoadVR(va),