diff mbox

[v1,06/10] target/ppc: use tcg ops for neg instruction

Message ID 1487585521-19445-7-git-send-email-nikunj@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nikunj A. Dadhania Feb. 20, 2017, 10:11 a.m. UTC
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
 target/ppc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson Feb. 20, 2017, 7:54 p.m. UTC | #1
On 02/20/2017 09:11 PM, Nikunj A Dadhania wrote:
>  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)]);
>  }
>

NACK.  You're forgetting "neg.".


r~
Nikunj A. Dadhania Feb. 21, 2017, 9:23 a.m. UTC | #2
Richard Henderson <rth@twiddle.net> writes:

> On 02/20/2017 09:11 PM, Nikunj A Dadhania wrote:
>>  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)]);
>>  }
>>
>
> NACK.  You're forgetting "neg.".

Oops, i totally missed that. :(

Regards
Nikunj
diff mbox

Patch

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 5d8d109..9fa3b5a 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -1483,7 +1483,7 @@  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)]);
 }
 
 static void gen_nego(DisasContext *ctx)