qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [5645] target-alpha: fix locked loads/stores


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [5645] target-alpha: fix locked loads/stores
Date: Tue, 11 Nov 2008 12:30:55 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Nov 10, 2008 at 09:07:55AM -0800, Krumme, Chris wrote:
>  
> 
> > -----Original Message-----
> > From: 
> > address@hidden 
> > [mailto:address@hidden
> > rg] On Behalf Of Aurelien Jarno
> > Sent: Friday, November 07, 2008 8:01 AM
> > To: address@hidden
> > Subject: [Qemu-devel] [5645] target-alpha: fix locked loads/stores
> > 
> > Revision: 5645
> >           
> > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5645
> > Author:   aurel32
> > Date:     2008-11-07 14:00:24 +0000 (Fri, 07 Nov 2008)
> > 
> > Log Message:
> > -----------
> > target-alpha: fix locked loads/stores
> > 
> > Fix reading of cpu_lock in gen_qemu_stql_c, original patch 
> > from Laurent Desnogues.
> > 
> > A new flag was added to gen_store_mem to allocate local temps 
> > instead of temps;  this flag should be set when the 
> > tcg_gen_qemu_store callback uses brcond before using the 
> > temps or else liveness analysis will get rid of the temps.
> > 
> > This also adds lock printing in cpu_dump_state which can help debug.
> > 
> > Modified Paths:
> > --------------
> >     trunk/target-alpha/helper.c
> >     trunk/target-alpha/translate.c
> > 
> > Modified: trunk/target-alpha/helper.c
> > ===================================================================
> > --- trunk/target-alpha/helper.c     2008-11-07 13:48:25 UTC 
> > (rev 5644)
> > +++ trunk/target-alpha/helper.c     2008-11-07 14:00:24 UTC 
> > (rev 5645)
> > @@ -434,5 +434,6 @@
> >          if ((i % 3) == 2)
> >              cpu_fprintf(f, "\n");
> >      }
> > +    cpu_fprintf(f, "\nlock     " TARGET_FMT_lx "\n", env->lock);
> >  }
> >  
> > 
> > Modified: trunk/target-alpha/translate.c 
> > ===================================================================
> > --- trunk/target-alpha/translate.c  2008-11-07 13:48:25 UTC 
> > (rev 5644)
> > +++ trunk/target-alpha/translate.c  2008-11-07 14:00:24 UTC 
> > (rev 5645)
> > @@ -234,9 +234,13 @@
> >  static always_inline void gen_store_mem (DisasContext *ctx,
> >                                           void 
> > (*tcg_gen_qemu_store)(TCGv t0, TCGv t1, int flags),
> >                                           int ra, int rb, 
> > int32_t disp16,
> > -                                         int fp, int clear)
> > +                                         int fp, int clear, 
> > int local)
> >  {
> >      TCGv addr = tcg_temp_new(TCG_TYPE_I64);
> > +    if (local)
> > +        addr = tcg_temp_local_new(TCG_TYPE_I64);
> > +    else
> > +        addr = tcg_temp_new(TCG_TYPE_I64);
> 
> I don't fully understand how these things work, but for the non-local
> case you are calling tcg_temp_new twice.

Thanks, fixed in r5671.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

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