[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 18/40] target/mips: Add emulation of nanoMIPS
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] [PATCH v3 18/40] target/mips: Add emulation of nanoMIPS 32-bit load and store instructions |
Date: |
Wed, 25 Jul 2018 15:46:04 +0000 |
Hello, Richard. Sorry for bothering you. One more question.
> On 07/19/2018 05:54 AM, Stefan Markovic wrote:
> > + case NM_ADDIUGP_B:
> > + gen_arith_imm(ctx, OPC_ADDIU, rt, 28, u);
> > + break;
>
> Use gen_op_addr_add, since behaves_like('DADDIU[GP.B]').
Did you perhaps mean an implementation similar to this would be appropriate:
case NM_ADDIUGP_B:
if (rt != 0) {
uint32_t offset = extract32(ctx->opcode, 0, 18);
if (offset == 0) {
gen_load_gpr(cpu_gpr[rt], 28);
} else {
TCGv t0;
t0 = tcg_temp_new();
tcg_gen_movi_tl(t0, offset);
gen_op_addr_add(ctx, cpu_gpr[rt], cpu_gpr[28], t0);
tcg_temp_free(t0);
}
}
break;
(this is like NM_ADDIUGP_W implementation)
Aleksandar M.
- Re: [Qemu-devel] [PATCH v3 04/40] target/mips: Add decode_nanomips_opc() function, (continued)
- [Qemu-devel] [PATCH v3 20/40] target/mips: Implement MT ASE support for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 36/40] mips_malta: Setup GT64120 BARs in nanoMIPS bootloader, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 29/40] target/mips: Adjust set_hflags_for_handler() for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 40/40] target/mips: Add definition of nanoMIPS I7200 CPU, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 10/40] target/mips: Add emulation of some common nanoMIPS 32-bit instructions, Stefan Markovic, 2018/07/19