[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction |
Date: |
Thu, 21 Jul 2016 13:36:34 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Richard Henderson <address@hidden> writes:
> 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".
Yes, i had not seen this reply.
> (2) Both of these are translate-time constants, so...
>
> tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], ctx->nip + (d << 16));
Sure
Regards
Nikunj
- Re: [Qemu-devel] [RFC 4/6] target-ppc: add cmprb instruction, (continued)
[Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction, Nikunj A Dadhania, 2016/07/12
[Qemu-devel] [RFC 6/6] target-ppc: add modulo dword operations, Nikunj A Dadhania, 2016/07/12