qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code


From: Richard Henderson
Subject: Re: [PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code
Date: Tue, 23 Feb 2021 17:48:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 2/22/21 2:39 PM, Philippe Mathieu-Daudé wrote:
> +#else /* !defined(TARGET_MIPS64) */
> +
> +bool decode_ase_mxu(DisasContext *ctx, uint32_t insn)
> +{
> +    return false;

Also seems suspect, but harmless.

> -#if !defined(TARGET_MIPS64)
> -        if (ctx->insn_flags & ASE_MXU) {
> +        if ((TARGET_LONG_BITS == 32) && (ctx->insn_flags & ASE_MXU)) {
>              decode_opc_mxu(ctx, ctx->opcode);

(1) Unnecessary () around ==.

(2) The call to decode_opc_mxu should be eliminated by the compiler because of
the constant false test.  You can (a) retain the function above and omit the
new test, (b) add the new test and leave the function undefined, a diagnostic
link error, or you can re-declare the function with QEMU_ERROR.


> @@ -28081,9 +28085,7 @@ void mips_tcg_init(void)
>      cpu_llval = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, llval),
>                                     "llval");
>  
> -#if !defined(TARGET_MIPS64)
>      mxu_translate_init();
> -#endif /* !TARGET_MIPS64 */

This one won't be eliminated, and is an abort for MIPS64 per patch 8, so all
mips64 now aborts on startup.


r~



reply via email to

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