[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 11/14] target-ppc: Add ISA 2.06 ft
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 11/14] target-ppc: Add ISA 2.06 ftdiv Instruction |
Date: |
Tue, 24 Dec 2013 08:06:37 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 12/18/2013 12:49 PM, Tom Musta wrote:
> + env->crf[bf] = 0x8 | (fg_flag ? 4 : 0) | (fe_flag ? 2 : 0);
> +}
You should return that value instead of assigning it. Then you need neither
the env nor bf arguments, and the whole function can be TCG_CALL_NO_RWG_SE.
> +static void gen_ftdiv(DisasContext *ctx)
> +{
> + TCGv_i32 bf;
> + if (unlikely(!ctx->fpu_enabled)) {
> + gen_exception(ctx, POWERPC_EXCP_FPU);
> + return;
> + }
> + /* NIP cannot be restored if the memory exception comes from an helper */
> + gen_update_nip(ctx, ctx->nip - 4);
> + bf = tcg_const_i32(crfD(ctx->opcode));
> + gen_helper_ftdiv(cpu_env, bf, cpu_fpr[rA(ctx->opcode)],
> + cpu_fpr[rB(ctx->opcode)]);
> +}
What memory exception?
Assign the result to cpu_crf[bf] here.
r~
- Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 05/14] target-ppc: Add ISA 2.06 divwe[u][o] Instructions, (continued)
- [Qemu-ppc] [V3 PATCH 07/14] target-ppc: Add ISA 2.06 stbcx. and sthcx. Instructions, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 08/14] target-ppc: Add ISA2.06 Float to Integer Instructions, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 09/14] target-ppc: Add ISA 2.06 fcfid[u][s] Instructions, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 10/14] target-ppc: Fix and enable fri[mnpz], Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 11/14] target-ppc: Add ISA 2.06 ftdiv Instruction, Tom Musta, 2013/12/18
- Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 11/14] target-ppc: Add ISA 2.06 ftdiv Instruction,
Richard Henderson <=
- [Qemu-ppc] [V3 PATCH 12/14] target-ppc: Add ISA 2.06 ftsqrt, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 13/14] target-ppc: Enable frsqrtes on Power7 and Power8, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 14/14] target-ppc: Add ISA2.06 lfiwzx Instruction, Tom Musta, 2013/12/18