[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] How to print value of float instruction argu

From: Programmingkid
Subject: Re: [Qemu-ppc] [Qemu-devel] How to print value of float instruction argument
Date: Tue, 1 Nov 2016 23:10:22 -0400

On Oct 31, 2016, at 4:39 AM, Peter Maydell wrote:

> On 31 October 2016 at 03:13, Programmingkid <address@hidden> wrote:
>> I'm trying to print the value of the arguments sent to
>> gen_fmadds() in target-ppc/translate/fp-impl.inc.c. How
>> do I do this? I have tried printf("cpu_fpr[rA(ctx->opcode)] = %d\n",
>> cpu_fpr[rA(ctx->opcode)]), but that always prints the same
>> value of 138 even if I change the values sent to fmadds.
> At translate time we do not know the values in registers:
> those are only available at runtime. The cpu_fpr[] values
> are TCGv_i64 which are opaque datatypes (and just track
> that FP register 5 is a unique thing that's not the same
> as FP register 6, and so on).
> For runtime information you need to turn on the -d
> tracing with suitable flags for what you care about.
> Where generated code calls a helper function you can
> put a breakpoint or tracing in the helper to show
> the arguments it prints, because the helper is called
> at runtime, not translate time.
> thanks
> -- PMM

Thank you very much for your help. I guess I should explain what I want. The 
C99 standard defines functions that are IEEE 754 complaint. I'm hoping to 
replace QEMU's fmadd implementation (for the PowerPC) with the fma() function. 
The fma() function does the exact same thing that fmadd does. I just don't know 
where exactly I can access the values being sent to the emulated fmadd 
instruction. Would you have a suggestion as to where I can place the fma() 

reply via email to

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