[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions |
Date: |
Thu, 2 Aug 2018 13:39:27 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 08/02/2018 10:16 AM, Stefan Markovic wrote:
> case NM_P16_LB:
> + switch (extract32(ctx->opcode, 2, 2)) {
> + case NM_LB16:
> + offset = extract32(ctx->opcode, 0, 2);
> + gen_ld(ctx, OPC_LB, rt, rs, offset);
> + break;
> + case NM_SB16:
> + offset = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
> + gen_st(ctx, OPC_SB, rt, rs, offset);
That looks wrong. I think you want
rt = decode_gpr_gpr3_src_store(...);
offset = extract32(ctx->opcode, 0, 2);
here.
> case NM_P16_LH:
> + switch ((extract32(ctx->opcode, 3, 1) << 1) | (ctx->opcode & 1)) {
> + case NM_LH16:
> + offset = extract32(ctx->opcode, 1, 2) << 1;
> + gen_ld(ctx, OPC_LH, rt, rs, offset);
> + break;
> + case NM_SH16:
> + offset = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
> + gen_st(ctx, OPC_SH, rt, rs, offset);
Similarly.
r~
- [Qemu-devel] [PATCH v6 15/77] target/mips: Add nanoMIPS base instruction set opcodes, (continued)
- [Qemu-devel] [PATCH v6 15/77] target/mips: Add nanoMIPS base instruction set opcodes, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 16/77] target/mips: Add nanoMIPS DSP ASE opcodes, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 17/77] target/mips: Add placeholder and invocation of decode_nanomips_opc(), Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 18/77] target/mips: Add nanoMIPS decoding and extraction utilities, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 19/77] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 20/77] target/mips: Add emulation of nanoMIPS 16-bit branch instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 21/77] target/mips: Add emulation of nanoMIPS 16-bit shift instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 22/77] target/mips: Add emulation of nanoMIPS 16-bit misc instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions, Stefan Markovic, 2018/08/02
- Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 24/77] target/mips: Add emulation of nanoMIPS 16-bit logic instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 25/77] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 26/77] target/mips: Add emulation of some common nanoMIPS 32-bit instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 27/77] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 28/77] target/mips: Add emulation of nanoMIPS 48-bit instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 29/77] target/mips: Add emulation of nanoMIPS FP instructions, Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 30/77] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0), Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 31/77] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf), Stefan Markovic, 2018/08/02
- [Qemu-devel] [PATCH v6 32/77] target/mips: Add emulation of misc nanoMIPS instructions (p_lsx), Stefan Markovic, 2018/08/02