qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target/arm: Fix PC test for LDM (exception return)
@ 2019-03-01 20:29 Richard Henderson
  2019-03-02 19:10 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2019-03-01 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

Found by inspection: Rn is the base register against which the
load began; I is the register within the mask being processed.
The exception return should of course be procesed from the loaded PC.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/translate.c b/target/arm/translate.c
index 8f7f5b95aa..ad879e3480 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
                             } else if (i == rn) {
                                 loaded_var = tmp;
                                 loaded_base = 1;
-                            } else if (rn == 15 && exc_return) {
+                            } else if (i == 15 && exc_return) {
                                 store_pc_exc_ret(s, tmp);
                             } else {
                                 store_reg_from_load(s, i, tmp);
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target/arm: Fix PC test for LDM (exception return)
  2019-03-01 20:29 [Qemu-devel] [PATCH] target/arm: Fix PC test for LDM (exception return) Richard Henderson
@ 2019-03-02 19:10 ` Philippe Mathieu-Daudé
  2019-03-04 15:09   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-02 19:10 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: peter.maydell

On 3/1/19 9:29 PM, Richard Henderson wrote:
> Found by inspection: Rn is the base register against which the
> load began; I is the register within the mask being processed.
> The exception return should of course be procesed from the loaded PC.

"processed"

> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/translate.c b/target/arm/translate.c
> index 8f7f5b95aa..ad879e3480 100644
> --- a/target/arm/translate.c
> +++ b/target/arm/translate.c
> @@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
>                              } else if (i == rn) {
>                                  loaded_var = tmp;
>                                  loaded_base = 1;
> -                            } else if (rn == 15 && exc_return) {
> +                            } else if (i == 15 && exc_return) {
>                                  store_pc_exc_ret(s, tmp);
>                              } else {
>                                  store_reg_from_load(s, i, tmp);
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target/arm: Fix PC test for LDM (exception return)
  2019-03-02 19:10 ` Philippe Mathieu-Daudé
@ 2019-03-04 15:09   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2019-03-04 15:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Richard Henderson, QEMU Developers

On Sat, 2 Mar 2019 at 19:10, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 3/1/19 9:29 PM, Richard Henderson wrote:
> > Found by inspection: Rn is the base register against which the
> > load began; I is the register within the mask being processed.
> > The exception return should of course be procesed from the loaded PC.
>
> "processed"
>
> >
> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> > ---
> >  target/arm/translate.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/arm/translate.c b/target/arm/translate.c
> > index 8f7f5b95aa..ad879e3480 100644
> > --- a/target/arm/translate.c
> > +++ b/target/arm/translate.c
> > @@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
> >                              } else if (i == rn) {
> >                                  loaded_var = tmp;
> >                                  loaded_base = 1;
> > -                            } else if (rn == 15 && exc_return) {
> > +                            } else if (i == 15 && exc_return) {
> >                                  store_pc_exc_ret(s, tmp);
> >                              } else {
> >                                  store_reg_from_load(s, i, tmp);
> >
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


Applied to target-arm.next (with the typo fixed), thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-04 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01 20:29 [Qemu-devel] [PATCH] target/arm: Fix PC test for LDM (exception return) Richard Henderson
2019-03-02 19:10 ` Philippe Mathieu-Daudé
2019-03-04 15:09   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).