qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned except


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option
Date: Sun, 22 May 2011 09:57:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 05/22/2011 05:10 AM, Max Filippov wrote:
> There are three alignment possibilities for xtensa: no unaligned
> exception, unaligned exception and hardware alignment. In the first
> case unaligned access silently goes to aligned address. It looks like
> it cannot be done via do_unaligned_access, can it? In the third case
> most unaligned accesses are handled transparently by the hardware.
> But e.g. unaligned access by multiprocessor synchronization
> instructions still cause alignment exception. Do I need to implement
> a different alignment checking mechanism for those unhandled cases?

Case (1), silently going to an aligned address, should be handled
inside the translator by masking the address before the load.  See
the ARM and Alpha targets for examples.

Case (2) and (3) are both handled by using ALIGNED_ONLY.  All you
need to do to handle (3) is *not* throw an exception from the
do_unaligned_access function.  See how the code is structured
inside softmmu_template.h.

As for sync insns... You may need to handle it all out-of-line
and check for alignment there.


r~



reply via email to

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