[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] target/mips: Add emulation of MMI instructi
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] target/mips: Add emulation of MMI instruction PCPYUD |
Date: |
Mon, 25 Feb 2019 14:22:06 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/25/19 8:10 AM, Mateja Marjanovic wrote:
> + if (rd == 0) {
> + /* nop */
> + } else if ((rt == 0) && (rs == 0)) {
> + tcg_gen_movi_i64(cpu_gpr[rt], 0);
> + tcg_gen_movi_i64(cpu_mmr[rt], 0);
> + } else if (rt == 0) {
> + tcg_gen_movi_i64(cpu_mmr[rd], 0);
> + tcg_gen_mov_i64(cpu_gpr[rd], cpu_mmr[rs]);
> + } else if (rs == 0) {
> + tcg_gen_mov_i64(cpu_mmr[rd], cpu_mmr[rt]);
> + tcg_gen_movi_i64(cpu_gpr[rd], 0);
> + } else {
> + tcg_gen_mov_i64(cpu_mmr[rd], cpu_mmr[rt]);
> + tcg_gen_mov_i64(cpu_gpr[rd], cpu_mmr[rs]);
> + }
Same as patch 2. You may have to invent gen_load_mmr.
r~