diff options
| author | Nikunj A Dadhania | 2017-02-27 05:57:58 +0100 |
|---|---|---|
| committer | David Gibson | 2017-03-01 01:23:39 +0100 |
| commit | 1480d71cbe811d453b393e3b342f102535fe1202 (patch) | |
| tree | 3aa460954ae12b7827aab72ad4767698c0eaae87 /target | |
| parent | target/ppc: update overflow flags for add/sub (diff) | |
| download | qemu-1480d71cbe811d453b393e3b342f102535fe1202.tar.gz qemu-1480d71cbe811d453b393e3b342f102535fe1202.tar.xz qemu-1480d71cbe811d453b393e3b342f102535fe1202.zip | |
target/ppc: use tcg ops for neg instruction
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target')
| -rw-r--r-- | target/ppc/translate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 16f422fb9c..d4d9941f08 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) |
