[Qemu-devel] [PATCH v5 02/17] target/m68k: fix gen_get_ccr()

Laurent Vivier posted 17 patches 7 years, 9 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v5 02/17] target/m68k: fix gen_get_ccr()
Posted by Laurent Vivier 7 years, 9 months ago
As gen_helper_get_ccr() is able to compute CCR from cc_op and
flags, we don't need to flush flags before to call it.
flush_flags() and get_ccr() use COMPUTE_CCR() to compute
flags. get_ccr() computes CCR value,
whereas flush_flags update live cc_op and flags.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/m68k/translate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 0e9d651a2a..1e9fb01252 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2478,7 +2478,6 @@ static TCGv gen_get_ccr(DisasContext *s)
 {
     TCGv dest;
 
-    gen_flush_flags(s);
     update_cc_op(s);
     dest = tcg_temp_new();
     gen_helper_get_ccr(dest, cpu_env);
-- 
2.14.3


Re: [Qemu-devel] [PATCH v5 02/17] target/m68k: fix gen_get_ccr()
Posted by Richard Henderson 7 years, 9 months ago
On 01/01/2018 05:10 PM, Laurent Vivier wrote:
> As gen_helper_get_ccr() is able to compute CCR from cc_op and
> flags, we don't need to flush flags before to call it.
> flush_flags() and get_ccr() use COMPUTE_CCR() to compute
> flags. get_ccr() computes CCR value,
> whereas flush_flags update live cc_op and flags.
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  target/m68k/translate.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~