qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-arm: modifying pc in tcg code for load/s


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-arm: modifying pc in tcg code for load/store multiple
Date: Tue, 10 Mar 2015 19:05:39 +0000

On 19 February 2015 at 16:04, Ildar Isaev <address@hidden> wrote:
> A bit clumsy, but something like that. Qemu never gets to the code past stmda.
>
> -bash-4.1$ cat add.s
>
>
>         .text
>         mov   r0, #5
>         mov   r1, #4
>         add   r2, r1, r0
>         stmda sp, {r1, r2, r5, sp, lr, pc}^
>         mov   r0, #26
>         mov   r1, #30

Oh, I see. You're doing a store-multiple user-registers
form with the PC in the register list. That's pretty weird,
because in that case the PC stored is the current PC
whereas the rest of the register are user-mode ones. QEMU
mishandles this because it misidentifies it as being some
kind of exception-return instruction (when in fact the
exception-return insns are only the LDM-user-regs-with-PC
encodings). This is a real bug, but your fix is wrong.
I'll send out a patch.

-- PMM



reply via email to

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