qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-devel] How to print value of float instruction argument
Date: Mon, 31 Oct 2016 08:39:20 +0000

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



reply via email to

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