qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data str


From: Yongbok Kim
Subject: Re: [Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data structure
Date: Fri, 24 Oct 2014 10:35:00 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hi,

On 22/10/2014 12:35, James Hogan wrote:
+union wr_t {
+    int8_t  b[MSA_WRLEN/8];
+    int16_t h[MSA_WRLEN/16];
+    int32_t w[MSA_WRLEN/32];
+    int64_t d[MSA_WRLEN/64];
This is incorrect on a big endian host. The least significant bits of
the lowest indexed element should always alias.

With a compiler for little endian this will work fine since b[0] will
alias the least significant bits of h[0], w[0], and d[0], whereas with a
compiler for big endian, b[0] will alias the upper byte of h[0], w[0],
and d[0].

Yes it wouldn't work for a big endian host.
However this MSA feature has been fully verified for big and little endian targets on a little endian host.
I can see that the dsp_helper.c has similar problem as well.
MSA could be forcibly turned off in a big endian host or might be leaved as it is just like DSP.
If we need to implement for big endian host it would take longer time...

What do you guys think about that?

Regards,
Yongbok




reply via email to

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