[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 06/55] target/mips: Add emulation of misc nan
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v4 06/55] target/mips: Add emulation of misc nanoMIPS 16-bit instructions |
Date: |
Tue, 24 Jul 2018 12:27:50 -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:
> + /* make sure instructions are on a halfword boundary */
> + if (ctx->base.pc_next & 0x1) {
> + TCGv tmp = tcg_const_tl(ctx->base.pc_next);
> + tcg_gen_st_tl(tmp, cpu_env, offsetof(CPUMIPSState, CP0_BadVAddr));
> + tcg_temp_free(tmp);
> + return 2;
> + }
You've lost the actual raising of the exception since v3.
> + case NM_P16_MV:
> + {
> + int rt1 = NANOMIPS_EXTRACT_RD5(ctx->opcode);
> + if (rt1 != 0) {
> + /* MOVE */
> + int rs1 = NANOMIPS_EXTRACT_RS5(ctx->opcode);
> + gen_arith(ctx, OPC_ADDU, rt1, rs1, 0);
Why are you creating rt1 and rs1 variables?
I see you took my shadowed variables comment to heart, and renamed them, but
why not just overwrite the contents of the existing outer variable?
> + case NM_P_ADDIURS5:
> + {
> + int rt1 = extract32(ctx->opcode, 5, 5);
Likewise.
> + case NM_P16_4X4:
> + {
> + int rt1 = (extract32(ctx->opcode, 9, 1) << 3) |
> + extract32(ctx->opcode, 5, 3);
> + int rs1 = (extract32(ctx->opcode, 4, 1) << 3) |
> + extract32(ctx->opcode, 0, 3);
Likewise.
r~
- [Qemu-devel] [PATCH v4 00/55] Add nanoMIPS support to QEMU, Aleksandar Markovic, 2018/07/24
- [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
- Re: [Qemu-devel] [PATCH v4 06/55] target/mips: Add emulation of misc nanoMIPS 16-bit instructions,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 07/55] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions, Aleksandar Markovic, 2018/07/24
- [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