[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] target/mips: Add MXU register support
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] target/mips: Add MXU register support |
Date: |
Sat, 25 Aug 2018 09:50:40 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 08/24/2018 12:44 PM, Craig Janeczek via Qemu-devel wrote:
> +/* MXU General purpose registers moves. */
> +static inline void gen_load_mxu_gpr (TCGv t, int reg)
> +{
> + if (reg == 0)
> + tcg_gen_movi_tl(t, 0);
> + else
> + tcg_gen_mov_tl(t, mxu_gpr[reg-1]);
> +}
> +
> +static inline void gen_store_mxu_gpr (TCGv t, int reg)
> +{
> + if (reg != 0)
> + tcg_gen_mov_tl(mxu_gpr[reg-1], t);
> +}
> +
> /* Moves to/from shadow registers. */
> static inline void gen_load_srsgpr (int from, int to)
> {
> @@ -20742,6 +20767,11 @@ void mips_tcg_init(void)
> fpu_fcr31 = tcg_global_mem_new_i32(cpu_env,
> offsetof(CPUMIPSState,
> active_fpu.fcr31),
> "fcr31");
> +
> + for (i = 0; i < 16; i++)
> + mxu_gpr[i] = tcg_global_mem_new(cpu_env,
> + offsetof(CPUMIPSState,
> active_tc.mxu_gpr[i]),
> + mxuregnames[i]);
> }
You need to fix the ./scripts/checkpatch.pl errors.
But otherwise the logic is ok.
r~
- [Qemu-devel] [PATCH 0/7] Add limited MXU instruction support, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 6/7] target/mips: Add MXU instructions Q8MUL and Q8MULSU, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 2/7] target/mips: Add MXU instructions S32I2M and S32M2I, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 1/7] target/mips: Add MXU register support, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 4/7] target/mips: Add MXU instruction D16MUL, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 3/7] target/mips: Add MXU instruction S8LDD, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 7/7] target/mips: Add MXU instructions S32LDD and S32LDDR, Craig Janeczek, 2018/08/24
- [Qemu-devel] [PATCH 5/7] target/mips: Add MXU instruction D16MAC, Craig Janeczek, 2018/08/24