qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 28/84] target/mips: Add emulation of some com


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v9 28/84] target/mips: Add emulation of some common nanoMIPS 32-bit instructions
Date: Thu, 16 Aug 2018 09:11:35 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/16/2018 07:57 AM, Aleksandar Markovic wrote:
> +            imm = extract32(ctx->opcode, 0, 16);
> +            if (rs != 0) {
> +                tcg_gen_addi_tl(cpu_gpr[rt], cpu_gpr[rs], imm);
> +                tcg_gen_ext32s_tl(cpu_gpr[rt], cpu_gpr[rt]);
> +            } else {
> +                tcg_gen_movi_tl(cpu_gpr[rt], imm);
> +            }

The nanomips pseudocode says ADDIU always sign-extends from 32-bit.

I'm hoping for the sake of nanomips64 that the legacy "inputs to 32-bit
instructions must always be sign-extended" rule has gone?

> +                    } else if (rt == 0 && shift == 5) {
> +                        /* PAUSE */
> +                        if (ctx->hflags & MIPS_HFLAG_BMASK) {
> +                            generate_exception_end(ctx, EXCP_RI);
> +                        }

No delay slots for nanomips, so no BMASK.
Probably best to comment that we're implementing PAUSE as a nop.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]