qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] target/rx: Fix helper definiton.


From: Peter Maydell
Subject: Re: [PATCH 1/2] target/rx: Fix helper definiton.
Date: Thu, 9 Sep 2021 13:34:16 +0100

On Thu, 9 Sept 2021 at 13:10, Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
>
> Due to an incorrect definition of helper,
> TCG optimization could sometimes behave unexpectedly.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Could you give more detail, please?

I had a look at one or two -- it looks like the floating point
related helpers like fadd write to env->fpsw. That is a TCG global,
but we only use it in the implementation of the "move from FPSW
to a general-purpose register" instruction. So I think the
better fix for that case would be to stop defining fpsw as
a TCG global and instead make the "move from FPSW" insn
use tcg_gen_ld_i32() to read from env->fpsw.

Probably doing the same thing for every helper function is
not right -- some will be better handled by reducing
the use of TCG globals, and some will indeed need to have
the TCG_CALL_NO_WG flag removed.

thanks
-- PMM



reply via email to

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