Adding address mask to stvlx.
This commit is contained in:
parent
31161e0245
commit
91e6c4ed9a
|
@ -389,6 +389,7 @@ static void __emulated_stvlx(uint64_t addr, __m128i vd) {
|
||||||
// addr here is the fully translated address.
|
// addr here is the fully translated address.
|
||||||
const uint8_t eb = addr & 0xF;
|
const uint8_t eb = addr & 0xF;
|
||||||
const size_t size = 16 - eb;
|
const size_t size = 16 - eb;
|
||||||
|
addr &= ~0xF;
|
||||||
uint8_t* p = (uint8_t*)addr;
|
uint8_t* p = (uint8_t*)addr;
|
||||||
for (size_t i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
p[i] = vd.m128i_u8[size - eb - 1 - i];
|
p[i] = vd.m128i_u8[size - eb - 1 - i];
|
||||||
|
|
Loading…
Reference in New Issue