[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD |
Date: |
Fri, 31 Aug 2018 13:39:35 +0000 |
Hi, Craig,
> From: Craig Janeczek <address@hidden>
> Sent: Thursday, August 30, 2018 9:30 PM
>
> Subject: [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD
> Adds support for emulating the S8LDD MXU instruction.
> Signed-off-by: Craig Janeczek <address@hidden>
> ---
> v1
> - initial patch
> v2
> - changed bitfield usage to extract32
> - used deposit_tl instructions instead of shift and bitmask
> v3
> - Split gen_mxu function into command specific gen_mxu_<ins> functions
> v4
> -Add and use MXU_OPTN3_PTN #defines
> -Add check for MXUEN
> target/mips/translate.c | 98 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 98 insertions(+)
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> + TCGv t0, t1;
> + TCGLabel *l0;
> + uint32_t xra, s8, optn3, rb;
> +
> + t0 = tcg_temp_new();
> + t1 = tcg_temp_new();
> +
> + l0 = gen_new_label();
> +
> + xra = extract32(ctx->opcode, 6, 4);
> + s8 = extract32(ctx->opcode, 10, 8);
> + optn3 = extract32(ctx->opcode, 18, 3);
> + rb = extract32(ctx->opcode, 21, 5);
> +
> + gen_load_mxu_cr(t0);
> + tcg_gen_andi_tl(t0, t0, MXUEN);
> + tcg_gen_brcondi_tl(TCG_COND_NE, t0, MXUEN, l0);
> +
> + gen_load_gpr(t0, rb);
> + tcg_gen_addi_tl(t0, t0, (int8_t)s8);
I am not sure if this works as desired, with respect to branching. In order to
survive branching, tcg variables must be initialized with tcg_temp_local_new(),
rather than with tcg_tem_new(). Please retest, and amend if needed.
Thanks,
Aleksandar
- [Qemu-devel] [PATCH v4 0/9] Add limited MXU instruction support, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 3/9] target/mips: Split mips instruction handling, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 4/9] target/mips: Add MXU instructions S32I2M and S32M2I, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 9/9] target/mips: Add MXU instructions S32LDD and S32LDDR, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 2/9] target/mips: Add all MXU opcodes, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 1/9] target/mips: Introduce MXU registers, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 8/9] target/mips: Add MXU instructions Q8MUL and Q8MULSU, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 6/9] target/mips: Add MXU instruction D16MUL, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 7/9] target/mips: Add MXU instruction D16MAC, Craig Janeczek, 2018/08/30
- [Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD, Craig Janeczek, 2018/08/30
- Re: [Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD,
Aleksandar Markovic <=