I think this is right.

This commit is contained in:
gibbed 2013-10-19 15:07:59 -07:00
parent f7ad9c89dd
commit f15b5dae9d
1 changed files with 2 additions and 2 deletions

View File

@ -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) {