From: Nikunj A Dadhania Date: Mon, 27 Feb 2017 04:57:58 +0000 (+0530) Subject: target/ppc: use tcg ops for neg instruction X-Git-Tag: v2.9.0-rc0~43^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1480d71cbe811d453b393e3b342f102535fe1202;p=thirdparty%2Fqemu.git target/ppc: use tcg ops for neg instruction Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 16f422fb9c7..d4d9941f083 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -1483,7 +1483,10 @@ static inline void gen_op_arith_neg(DisasContext *ctx, bool compute_ov) static void gen_neg(DisasContext *ctx) { - gen_op_arith_neg(ctx, 0); + tcg_gen_neg_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]); + if (unlikely(Rc(ctx->opcode))) { + gen_set_Rc0(ctx, cpu_gpr[rD(ctx->opcode)]); + } } static void gen_nego(DisasContext *ctx)