qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] Bug in ppc/BookE wait instruction


From: Mark Cave-Ayland
Subject: Re: [Qemu-ppc] [Qemu-devel] Bug in ppc/BookE wait instruction
Date: Fri, 3 Jun 2016 18:11:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 03/06/16 16:45, Jakub Horak wrote:

(Added David as PPC maintainer and qemu-ppc mailing list)

> Hello,
> I think there's a bug in "wait" instruction code generator for PowerPC
> architecture. It doesn't make sense to store a non-initialized register.
> 
> Best regards,
> Jakub Horak
> 
> 
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index f5ceae5..6af567b 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -3439,7 +3439,7 @@ static void gen_sync(DisasContext *ctx)
>  /* wait */
>  static void gen_wait(DisasContext *ctx)
>  {
> -    TCGv_i32 t0 = tcg_temp_new_i32();
> +    TCGv_i32 t0 = tcg_const_i32(1);
>      tcg_gen_st_i32(t0, cpu_env,
>                     -offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
>      tcg_temp_free_i32(t0);
> 

ATB,

Mark.




reply via email to

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