qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/2] target-mips: Misaligned memory accesses


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 2/2] target-mips: Misaligned memory accesses for MSA
Date: Fri, 15 May 2015 06:43:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 05/15/2015 05:09 AM, Leon Alrae wrote:
> On 14/05/2015 20:12, Richard Henderson wrote:
>>   /* We know both pages are present and writable.  */
>>   if (eaddr == baddr + 15) {
>>       /* Consecutive pages in RAM.  */
>>       memcpy(baddr, register, 16);
>>   } else {
>>       /* Someone's doing an MSA store to device memory.  */
>>       for (i = 0; i < 2; ++i) {
>>           helper_ret_stq_mmu(env, vaddr + i*8, register.d[0],
>>                              make_memop_idx(MO_UNALN | MO_TEQ, mmu_idx),
>>                              GETRA());
>>       }
>>   }
> 
> We would additionally need to take care of vector elements' endianness
> before using this code. Therefore always using helper_ret_st[bwlq]_mmu
> (depending on data format) in a loop probably is simpler.

I suppose.  I'd thought one of the patches defined functions to do the
swapping, so I assumed that would still be used.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]