qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] target-ppc: Extend FPU state for


From: Alexander Graf
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] target-ppc: Extend FPU state for newer POWER CPUs
Date: Tue, 09 Oct 2012 17:03:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120306 Thunderbird/10.0.3

On 10/09/2012 02:50 PM, David Gibson wrote:
On Tue, Oct 09, 2012 at 01:41:02PM +0200, Alexander Graf wrote:
On 09.10.2012, at 13:38, Alexander Graf wrote:
On 09.10.2012, at 06:17, David Gibson wrote:
[snip]
This will still break TCG for qemu-system-ppc64, no?
To be more precise:

address@hidden:/home/agraf/release/qemu>  grep -R cpu_fpscr target-ppc
target-ppc/translate.c:static TCGv_i32 cpu_fpscr;
I did update the type of cpu_fpscr..

target-ppc/translate.c:    cpu_fpscr = tcg_global_mem_new_i32(TCG_AREG0,
target-ppc/translate.c:    tcg_gen_shri_i32(cpu_crf[crfD(ctx->opcode)], 
cpu_fpscr, bfa);
target-ppc/translate.c:    tcg_gen_andi_i32(cpu_fpscr, cpu_fpscr, ~(0xF<<  
bfa));
target-ppc/translate.c:    tcg_gen_extu_i32_i64(cpu_fpr[rD(ctx->opcode)], 
cpu_fpscr);
target-ppc/translate.c:        tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, 
FPSCR_OX);
target-ppc/translate.c:        tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, 
FPSCR_OX);
target-ppc/translate.c:        tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, 
FPSCR_OX);
target-ppc/translate.c:        tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, 
FPSCR_OX);

All those functions assume cpu_fpscr is a TCGv32. They need to be
adjusted to work on tl instead.
But I didn't spot the type dependent calls.  I figured type checking
would catch that sort of thing, but apparently not.

Type checking only happens with enable-tcg-debug :)


Alex




reply via email to

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