[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/13] target/mips: Add emulation of MMI inst
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/13] target/mips: Add emulation of MMI instruction PCPYH |
Date: |
Mon, 4 Mar 2019 12:36:33 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 3/4/19 7:13 AM, Mateja Marjanovic wrote:
> + uint64_t mask = (1ULL << 16) - 1;
> +
> + tcg_gen_andi_i64(t0, cpu_gpr[rt], mask);
> + tcg_gen_movi_i64(t1, 0);
> + tcg_gen_or_i64(t1, t0, t1);
> + tcg_gen_shli_i64(t0, t0, 16);
> + tcg_gen_or_i64(t1, t0, t1);
> + tcg_gen_shli_i64(t0, t0, 16);
> + tcg_gen_or_i64(t1, t0, t1);
> + tcg_gen_shli_i64(t0, t0, 16);
> + tcg_gen_or_i64(t1, t0, t1);
I have suggested a better way to write this, twice,
the third time is surely the charm...
tcg_gen_deposit_i64(t0, cpu_gpr[rt], cpu_gpr[rt], 16, 48);
tcg_gen_deposit_i64(t0, t0, t0, 32, 32);
r~
- [Qemu-devel] [PATCH v3 11/13] target/mips: Add emulation of MMI instruction PEXTUB, (continued)
- [Qemu-devel] [PATCH v3 11/13] target/mips: Add emulation of MMI instruction PEXTUB, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 03/13] target/mips: Add emulation of MMI instruction PCPYUD, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 04/13] target/mips: Add emulation of MMI instruction PEXCH, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 08/13] target/mips: Add emulation of MMI instruction PEXTLB, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 07/13] target/mips: Add emulation of MMI instruction PEXEW, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 10/13] target/mips: Add emulation of MMI instruction PEXTLW, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 01/13] target/mips: Add emulation of MMI instruction PCPYH, Mateja Marjanovic, 2019/03/04
- Re: [Qemu-devel] [PATCH v3 01/13] target/mips: Add emulation of MMI instruction PCPYH,
Richard Henderson <=
- [Qemu-devel] [PATCH v3 09/13] target/mips: Add emulation of MMI instruction PEXTLH, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 13/13] target/mips: Add emulation of MMI instruction PEXTUW, Mateja Marjanovic, 2019/03/04
- [Qemu-devel] [PATCH v3 06/13] target/mips: Add emulation of MMI instruction PEXEH, Mateja Marjanovic, 2019/03/04