[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/9] target/mips: Support the R5900 PCPYUD multi
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] [PATCH 4/9] target/mips: Support the R5900 PCPYUD multimedia instruction |
Date: |
Tue, 15 Jan 2019 21:28:07 +0000 |
> From: Fredrik Noring <address@hidden>
> Sent: Sunday, January 13, 2019 8:04 PM
> To: Aleksandar Markovic; Aurelien Jarno; Philippe Mathieu-Daudé
> Cc: Jürgen Urban; Maciej W. Rozycki; address@hidden
> Subject: [PATCH 4/9] target/mips: Support the R5900 PCPYUD multimedia
> instruction
>
> Signed-off-by: Fredrik Noring <address@hidden>
> ---
> target/mips/translate.c | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index 40faf9cb36..8c350729bc 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -27351,11 +27351,34 @@ static void decode_mmi2(CPUMIPSState *env,
> DisasContext *ctx)
> }
> }
>
> +static void gen_mmi_pcpyud(DisasContext *ctx, int rd, int rs, int rt)
> +{
> + if (rd != 0) {
> + if (rs != 0) {
> + tcg_gen_mov_i64(cpu_gpr[rd], cpu_mmr[rs]);
> + } else {
> + tcg_gen_movi_i64(cpu_gpr[rd], 0);
> + }
> +
> + if (rt != 0) {
> + tcg_gen_mov_i64(cpu_mmr[rd], cpu_mmr[rt]);
> + } else {
> + tcg_gen_movi_i64(cpu_mmr[rd], 0);
> + }
> + }
> +}
> +
> static void decode_mmi3(CPUMIPSState *env, DisasContext *ctx)
> {
> uint32_t opc = MASK_MMI3(ctx->opcode);
> + int rs = extract32(ctx->opcode, 21, 5);
> + int rt = extract32(ctx->opcode, 16, 5);
> + int rd = extract32(ctx->opcode, 11, 5);
>
The similar caveat as in the previous patch: If you move last three lines
to gen_mmi_pcpyud(), and correct its arguments, this patch has:
Reviewed-by: Aleksandar Markovic <address@hidden>
> switch (opc) {
> + case MMI_OPC_3_PCPYUD:
> + gen_mmi_pcpyud(ctx, rd, rs, rt);
> + break;
> case MMI_OPC_3_PMADDUW: /* TODO: MMI_OPC_3_PMADDUW */
> case MMI_OPC_3_PSRAVW: /* TODO: MMI_OPC_3_PSRAVW */
> case MMI_OPC_3_PMTHI: /* TODO: MMI_OPC_3_PMTHI */
> @@ -27363,7 +27386,6 @@ static void decode_mmi3(CPUMIPSState *env,
> DisasContext *ctx)
> case MMI_OPC_3_PINTEH: /* TODO: MMI_OPC_3_PINTEH */
> case MMI_OPC_3_PMULTUW: /* TODO: MMI_OPC_3_PMULTUW */
> case MMI_OPC_3_PDIVUW: /* TODO: MMI_OPC_3_PDIVUW */
> - case MMI_OPC_3_PCPYUD: /* TODO: MMI_OPC_3_PCPYUD */
> case MMI_OPC_3_POR: /* TODO: MMI_OPC_3_POR */
> case MMI_OPC_3_PNOR: /* TODO: MMI_OPC_3_PNOR */
> case MMI_OPC_3_PEXCH: /* TODO: MMI_OPC_3_PEXCH */
> --
> 2.19.2
- [Qemu-devel] [PATCH 0/9] target/mips: Limited support for R5900 multimedia instructions, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 1/9] target/mips: Require TARGET_MIPS64 for R5900 multimedia instructions, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 2/9] target/mips: Introduce 32 R5900 128-bit multimedia registers, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 3/9] target/mips: Support the R5900 PCPYLD multimedia instruction, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 4/9] target/mips: Support the R5900 PCPYUD multimedia instruction, Fredrik Noring, 2019/01/13
- Re: [Qemu-devel] [PATCH 4/9] target/mips: Support the R5900 PCPYUD multimedia instruction,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH 5/9] target/mips: Support the R5900 LQ multimedia instruction, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 6/9] target/mips: Support the R5900 SQ multimedia instruction, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 7/9] tests/tcg/mips: Test R5900 multimedia instructions PCPYUD and PCPYLD, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 8/9] tests/tcg/mips: Test R5900 multimedia instruction LQ, Fredrik Noring, 2019/01/13
- [Qemu-devel] [PATCH 9/9] tests/tcg/mips: Test R5900 multimedia instruction SQ, Fredrik Noring, 2019/01/13