[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 8/8] target/ppc: Refactor emulation of vmrgew an
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 8/8] target/ppc: Refactor emulation of vmrgew and vmrgow instructions |
Date: |
Thu, 6 Jun 2019 15:43:19 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/6/19 5:15 AM, Stefan Brankovic wrote:
> +/*
> + * We use this macro if one instruction is realized with direct
> + * translation, and second one with helper.
> + */
> +#define GEN_VXFORM_TRANS_DUAL(name0, flg0, flg2_0, name1, flg1, flg2_1)\
> +static void glue(gen_, name0##_##name1)(DisasContext *ctx) \
> +{ \
> + if ((Rc(ctx->opcode) == 0) && \
> + ((ctx->insns_flags & flg0) || (ctx->insns_flags2 & flg2_0))) { \
> + trans_##name0(ctx); \
> + } else if ((Rc(ctx->opcode) == 1) && \
> + ((ctx->insns_flags & flg1) || (ctx->insns_flags2 & flg2_1))) { \
> + gen_##name1(ctx); \
> + } else { \
> + gen_inval_exception(ctx, POWERPC_EXCP_INVAL_INVAL); \
> + } \
> +}
> +
> /* Adds support to provide invalid mask */
> #define GEN_VXFORM_DUAL_EXT(name0, flg0, flg2_0, inval0, \
> name1, flg1, flg2_1, inval1) \
> @@ -431,20 +449,13 @@ GEN_VXFORM(vmrglb, 6, 4);
> GEN_VXFORM(vmrglh, 6, 5);
> GEN_VXFORM(vmrglw, 6, 6);
>
> -static void gen_vmrgew(DisasContext *ctx)
> +static void trans_vmrgew(DisasContext *ctx)
> {
> - TCGv_i64 tmp;
> - TCGv_i64 avr;
> - int VT, VA, VB;
> - if (unlikely(!ctx->altivec_enabled)) {
> - gen_exception(ctx, POWERPC_EXCP_VPU);
> - return;
> - }
This appears to drop the check for altivec_enabled.
r~
- [Qemu-devel] [PATCH 4/8] target/ppc: Optimize emulation of vgbbd instruction, (continued)
- [Qemu-devel] [PATCH 4/8] target/ppc: Optimize emulation of vgbbd instruction, Stefan Brankovic, 2019/06/06
- [Qemu-devel] [PATCH 7/8] target/ppc: Optimize emulation of vclzh and vclzb instructions, Stefan Brankovic, 2019/06/06
- [Qemu-devel] [PATCH 3/8] target/ppc: Optimize emulation of vpkpx instruction, Stefan Brankovic, 2019/06/06
- [Qemu-devel] [PATCH 5/8] target/ppc: Optimize emulation of vclzd instruction, Stefan Brankovic, 2019/06/06
- [Qemu-devel] [PATCH 8/8] target/ppc: Refactor emulation of vmrgew and vmrgow instructions, Stefan Brankovic, 2019/06/06
- Re: [Qemu-devel] [PATCH 8/8] target/ppc: Refactor emulation of vmrgew and vmrgow instructions,
Richard Henderson <=
- [Qemu-devel] [PATCH 6/8] target/ppc: Optimize emulation of vclzw instruction, Stefan Brankovic, 2019/06/06
- Re: [Qemu-devel] [PATCH 0/8] Optimize emulation of ten Altivec instructions: lvsl,, Richard Henderson, 2019/06/06
- Re: [Qemu-devel] [PATCH 0/8] Optimize emulation of ten Altivec instructions: lvsl,, Howard Spoelstra, 2019/06/06