[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 07/55] target/mips: Add emulation of nanoMIPS
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v4 07/55] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions |
Date: |
Tue, 24 Jul 2018 12:34:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 07/24/2018 10:31 AM, Aleksandar Markovic wrote:
> + case NM_SB16:
> + {
> + int rt = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
Shadowed variable.
> + case NM_SH16:
> + {
> + int rt = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
Likewise.
> case NM_LWSP16:
> + {
> + int rt = NANOMIPS_EXTRACT_RD5(ctx->opcode);
Likewise.
> case NM_LW4X4:
> + {
> + int rt = (extract32(ctx->opcode, 9, 1) << 3) |
> + extract32(ctx->opcode, 5, 3);
> + int rs = (extract32(ctx->opcode, 4, 1) << 3) |
> + extract32(ctx->opcode, 0, 3);
Likewise.
> case NM_SW4X4:
> + {
> + int rt = (extract32(ctx->opcode, 9, 1) << 3) |
> + extract32(ctx->opcode, 5, 3);
> + int rs = (extract32(ctx->opcode, 4, 1) << 3) |
> + extract32(ctx->opcode, 0, 3);
Likewise.
> case NM_SWSP16:
> + {
> + int rt = NANOMIPS_EXTRACT_RD5(ctx->opcode);
Likewise.
> case NM_SW16:
> + {
> + int rt = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
> + int rs = decode_gpr_gpr3(NANOMIPS_EXTRACT_RS(ctx->opcode));
Likewise.
> case NM_SWGP16:
> + {
> + int rt = decode_gpr_gpr3_src_store(
> + NANOMIPS_EXTRACT_RD(ctx->opcode));
Likewise.
It might be handy to temporarily add
target/mips/translate.o: QEMU_CFLAGS += -Wshadow=local
to target/mips/Makefile.objs, but I don't know how prevalent that situation is
within the existing code base...
r~
- [Qemu-devel] [PATCH v4 01/55] target/mips: Add preprocessor constants for nanoMIPS, (continued)
- [Qemu-devel] [PATCH v4 01/55] target/mips: Add preprocessor constants for nanoMIPS, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 02/55] target/mips: Add nanoMIPS base instruction set opcodes, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 03/55] target/mips: Add nanoMIPS DSP ASE opcodes, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 04/55] target/mips: Add placeholder and invocation of decode_nanomips_opc(), Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 05/55] target/mips: Add nanoMIPS decoding and extraction utilities, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 06/55] target/mips: Add emulation of misc nanoMIPS 16-bit instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 07/55] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions, Aleksandar Markovic, 2018/07/24
- Re: [Qemu-devel] [PATCH v4 07/55] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 08/55] target/mips: Add emulation of nanoMIPS 16-bit logic instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 09/55] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 10/55] target/mips: Add emulation of some common nanoMIPS 32-bit instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 11/55] target/mips: Add emulation of nanoMIPS 48-bit instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 12/55] target/mips: Add emulation of nanoMIPS FP instructions, Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 13/55] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0), Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 14/55] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf), Aleksandar Markovic, 2018/07/24
- [Qemu-devel] [PATCH v4 15/55] target/mips: Add emulation of misc nanoMIPS instructions (pool p_lsx), Aleksandar Markovic, 2018/07/24