From f15b5dae9d3a09df20fa5a1d45eac66863c354d9 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 19 Oct 2013 15:07:59 -0700 Subject: [PATCH] I think this is right. --- src/xenia/cpu/x64/x64_emit_altivec.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/x64/x64_emit_altivec.cc b/src/xenia/cpu/x64/x64_emit_altivec.cc index c208cd9a1..647817843 100644 --- a/src/xenia/cpu/x64/x64_emit_altivec.cc +++ b/src/xenia/cpu/x64/x64_emit_altivec.cc @@ -391,7 +391,7 @@ static void __emulated_stvlx(uint64_t addr, __m128i vd) { const size_t size = 16 - eb; uint8_t* p = (uint8_t*)addr; for (size_t i = 0; i < size; i++) { - p[i] = vd.m128i_u8[size - i]; + p[i] = vd.m128i_u8[15 - i]; } } int InstrEmit_stvlx_(X64Emitter& e, X86Compiler& c, InstrData& i, uint32_t vd, uint32_t ra, uint32_t rb) { @@ -437,7 +437,7 @@ static void __emulated_stvrx(uint64_t addr, __m128i vd) { uint8_t* p = (uint8_t*)addr; // Note that if the input is already 16b aligned no bytes are stored. for (size_t i = 0; i < size; i++) { - p[i + (size - 1 - i)] = vd.m128i_u8[i]; + p[size - 1 - i] = vd.m128i_u8[i]; } } int InstrEmit_stvrx_(X64Emitter& e, X86Compiler& c, InstrData& i, uint32_t vd, uint32_t ra, uint32_t rb) {