[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~
- Re: [PATCH v3 04/10] target/mips: Pass instruction opcode to decode_opc_mxu(), (continued)
- [PATCH v3 05/10] target/mips: Extract decode_ase_mxu() from decode_opc_mxu(), Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 06/10] target/mips: Use OPC_MUL instead of OPC__MXU_MUL, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 07/10] target/mips: Introduce mxu_translate_init() helper, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 08/10] target/mips: Make mxu_translate_init() / decode_ase_mxu() proto public, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code, Philippe Mathieu-Daudé, 2021/02/22
- Re: [PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code,
Richard Henderson <=
- [PATCH v3 10/10] target/mips: Extract MXU code to new mxu_translate.c file, Philippe Mathieu-Daudé, 2021/02/22