On 2015-08-17 18:25, Artyom Tarasenko wrote: > On Mon, Aug 17, 2015 at 5:40 PM, Richard Henderson <r...@twiddle.net> wrote: > > On 08/17/2015 07:19 AM, Artyom Tarasenko wrote: > >> Well, on the other hand, every access goes via helper_check_align. > >> There is a comment /* XXX remove alignment check */. > >> I wonder how this can be done in a more efficient way? > > > > Not ever access does so. There are only 3 memory related calls to > > check_align. > > The other three are for indirect branches. > > Yes, but I think it's the 3 most used ones. > > > For the 8 byte memory operations we can just remove the checks. There, the > > softmmu operation checks the alignment. > > This is a good news. Where does it happen? > > > For usermode, we've typically ignored > > the guest alignment (which also causes failures for a host that requires > > alignment emulating a guest that does not).
A tiny bit of topic, but couldn't we force the use of unaligned access load/store instructions in user mode instead? For example in QEMU we can use the LWL/LWR couple instead of LW. I doubt it will make any measurable difference in speed. For the MIPS case, that doesn't work for 16-bit load/stores though. The best would indeed be to switch to softmmu for the user mode. I know there are people working on that, but given that it might take time, it could be a simple temporary solution. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net