qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-arm: Report unimplemented opcodes (LOG_U


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-arm: Report unimplemented opcodes (LOG_UNIMP)
Date: Wed, 28 Aug 2013 09:15:44 +0100

On 28 August 2013 05:39, Stefan Weil <address@hidden> wrote:
> These unimplemented opcodes are handled like illegal opcodes, but
> they are used in existing code. We should at least report when they
> are executed.

Yeah, seems reasonable. (There might be other unimplemented
bits lurking too but we can add logging when we find them.)

> Signed-off-by: Stefan Weil <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>

> When running a QEMU system emulation of an ARM system
> (Raspberry PI), Linux booted, but when I tried to run a
> user session, it terminated without error message.
>
> It took me some time to see that bash got an illegal
> instruction exception. It was caused by ARM opcode 'setend'
> which is not implemented in QEMU's ARM emulation.
> The patch should help detecting similar scenarios in
> the future.
>
> Raspberry PI uses 'setend' in an optimized version of
> memcmp, so lots of other executables also fail with QEMU.
>
> As a workaround, the preloading of that optimized code
> can be removed. Of course an improved QEMU emulation
> would be better.

setend is kinda hard to emulate[*] and it's generally not used
by anything (except this weird memcmp implementation).
I'm inclined to think this "optimized" version of memcmp is a
bad idea -- I think setend is expensive on hardware, and I've
never seen it suggested by any of the toolchain folks who
do work on optimised versions of string routines. OTOH I
haven't run any benchmarks and hopefully whoever wrote
that rpi code did.

[*] not impossible, we already do something on the ppc
that's similar; however I'd really want to take the time to
figure out how to do endianness swapping "properly"
and what qemu does currently before messing with it.

-- PMM



reply via email to

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