|
From: | Richard Henderson |
Subject: | Re: [PATCH for-6.2 12/43] target/sh4: Implement do_unaligned_access for user-only |
Date: | Thu, 29 Jul 2021 14:01:15 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/29/21 3:52 AM, Peter Maydell wrote:
sh4 kernel default for unaligned accesses seems to be "warn and fixup", not SIGBUS, unless the user changes that by writing to /proc/cpu/alignment or the process changes it via prctl().
We will still need this for load-locked/store-conditional (MOVLI/MOVCO).It appears that the sh4 kernel fails to decode these properly, and will do something ugly, like interpreting MOVLI as a multiple-store instead of a load.
There are also other instructions that the kernel does not attempt to handle, such as MAC. I suppose we could begin with turning off TARGET_ALIGNED_ONLY for sh4-linux-user, then re-enabling MO_ALIGN for the atomics (at least).
r~
[Prev in Thread] | Current Thread | [Next in Thread] |