|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction |
Date: | Thu, 21 Jul 2016 11:29:09 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 07/12/2016 11:33 PM, Nikunj A Dadhania wrote:
+static void gen_addpcis(DisasContext *ctx) +{ + target_long d = DX(ctx->opcode); + + tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], ctx->nip); + tcg_gen_addi_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rD(ctx->opcode)], d); +}
(1) You appear to have forgotten the "shift" part of "addpcis". (2) Both of these are translate-time constants, so... tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], ctx->nip + (d << 16)); r~
[Prev in Thread] | Current Thread | [Next in Thread] |