qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] PPC: Allow little-endian user mode.


From: 關振德
Subject: Re: [Qemu-devel] [PATCH 2/3] PPC: Allow little-endian user mode.
Date: Thu, 8 May 2014 02:05:04 -0700

There are a few places where we do 128-bit loads/store.  We need to swap the high/low halves and also do byteswap for each half.  Byteswap of each half is handled differently depending on TARGET_WORDS_BIGENDIAN but the swapping of high/low halves is always controlled by msr.le.  Would our intention be clearer if defined another function swap_high_low_64_bits() instead of msr.le?  

It's 2am in California.  I need to go off-line.  I will continue tomorrow. Thanks

-Doug


On Thu, May 8, 2014 at 1:55 AM, Alexander Graf <address@hidden> wrote:
On 05/08/2014 10:49 AM, Doug Kwan (關振德) wrote:
If we leave the target mode as big-endian, we need to teach the elfloader to handle binary of reversed endianness.  I have looked into that possibility as well but find the current approach easier.

Please don't top post.

Ok, so if we really want to change the code to be able to handle !TARGET_WORDS_BIGENDIAN the whole notion of s->le_mode becomes flawed. Instead, it should get renamed into needs_swab or needs_byteswap or something along those lines. Then we can set it accordingly based on msr_le and target configuration.

For the mem_helper.c changes, could you please explain why you have to treat msr_le and needs_byteswap separately?


Thanks,

Alex



reply via email to

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