From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULwas-0007FX-TR for qemu-devel@nongnu.org; Sat, 30 Mar 2013 10:17:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULwaq-0002wc-Dd for qemu-devel@nongnu.org; Sat, 30 Mar 2013 10:17:18 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:40332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULwaq-0002wY-7I for qemu-devel@nongnu.org; Sat, 30 Mar 2013 10:17:16 -0400 Received: by mail-ea0-f182.google.com with SMTP id q15so523804ead.27 for ; Sat, 30 Mar 2013 07:17:15 -0700 (PDT) Date: Sat, 30 Mar 2013 15:13:35 +0100 From: "Edgar E. Iglesias" Message-ID: <20130330141335.GA15741@smtp.vpn> References: <1364593471-26730-1-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] microblaze: Add support for the sleep insn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On Sat, Mar 30, 2013 at 01:45:26PM +0000, Blue Swirl wrote: > On Fri, Mar 29, 2013 at 9:44 PM, wrote: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target-microblaze/translate.c | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > > diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c > > index a74da8e..21a7119 100644 > > --- a/target-microblaze/translate.c > > +++ b/target-microblaze/translate.c > > @@ -1317,6 +1317,21 @@ static void dec_br(DisasContext *dc) > > /* Memory barrier. */ > > mbar = (dc->ir >> 16) & 31; > > if (mbar == 2 && dc->imm == 4) { > > + /* mbar IMM & 16 decodes to sleep. */ > > + if (dc->rd & 16) { > > + TCGv_i32 tmp = tcg_const_i32(EXCP_HLT); > > + > > + LOG_DIS("sleep\n"); > > + > > + t_sync_flags(dc); > > + tcg_gen_st_i32(tcg_const_i32(1), cpu_env, > > This leaks the result of tcg_const_i32(1). Fixed in v2, thanks Edgar