[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: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions |
Date: |
Fri, 3 Aug 2018 12:30:30 +0000 |
Also,
wrong indentation of the block that follows these lines:
> + case NM_P_LS_WM:
> + case NM_P_LS_UAWM:
________________________________________
From: Richard Henderson <address@hidden>
Sent: Thursday, August 2, 2018 7:39:27 PM
To: Stefan Markovic; address@hidden
Cc: address@hidden; address@hidden; address@hidden; address@hidden; Aleksandar
Markovic; Stefan Markovic; Petar Jovanovic; Paul Burton; Aleksandar Rikalo
Subject: Re: [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit
load and store instructions
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 16/77] target/mips: Add nanoMIPS DSP ASE opcodes, (continued)
- [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
- [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
- [Qemu-devel] [PATCH v6 33/77] target/mips: Implement emulation of nanoMIPS ROTX instruction, Stefan Markovic, 2018/08/02