qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] linux-user: Handle compressed ISA encodings


From: Maciej W. Rozycki
Subject: Re: [Qemu-devel] [PATCH v3] linux-user: Handle compressed ISA encodings when processing MIPS exceptions
Date: Wed, 14 Aug 2013 13:03:00 +0100
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

On Mon, 29 Jul 2013, Maciej W. Rozycki wrote:

> > Decode trap instructions during the handling of an EXCP_BREAK or EXCP_TRAP
> > according to the current ISA mode.
> > 
> > Signed-off-by: Kwok Cheung Yeung <address@hidden>
> > ---
> >  linux-user/main.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
> >  1 file changed, 43 insertions(+), 3 deletions(-)
> > 
> > v2->v3: Handle microMIPS and MIPS16e instructions when processing 
> > EXCP_BREAK.
> > 
> > diff --git a/linux-user/main.c b/linux-user/main.c
> > index 7f15d3d..b137216 100644
> > --- a/linux-user/main.c
> > +++ b/linux-user/main.c
> > @@ -2348,7 +2348,31 @@ done_syscall:
> >                  abi_ulong trap_instr;
> >                  unsigned int code;
> >  
> > -                ret = get_user_ual(trap_instr, env->active_tc.PC);
> > +                if (env->hflags & MIPS_HFLAG_M16) {
> > +                    if (env->insn_flags & ASE_MICROMIPS) {
> > +                        /* microMIPS mode */
> > +                        abi_ulong instr[2];
> > +
> > +                        ret = get_user_u16(instr[0], env->active_tc.PC) ||
> > +                              get_user_u16(instr[1], env->active_tc.PC + 
> > 2);
> > +
> > +                        trap_instr = (instr[0] << 16) | instr[1];
> 
>  You need to tell 16-bit and 32-bit microMIPS BREAK instructions apart 
> somehow.

 I can see the broken change was actually applied -- Kwok, did you have a
chance to have a look at making a fix?

  Maciej



reply via email to

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