On Sat, Mar 30, 2013 at 01:45:26PM +0000, Blue Swirl wrote: > On Fri, Mar 29, 2013 at 9:44 PM, <edgar.igles...@gmail.com> wrote: > > From: "Edgar E. Iglesias" <edgar.igles...@xilinx.com> > > > > Signed-off-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> > > --- > > 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