[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6
From: |
Richard Henderson |
Subject: |
Re: [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6 LSA/DLSA opcodes |
Date: |
Wed, 9 Dec 2020 08:21:45 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 12/8/20 2:36 PM, Philippe Mathieu-Daudé wrote:
> +++ b/target/mips/isa-mips_rel6_translate.c
> @@ -0,0 +1,33 @@
> +/*
> + * MIPS emulation for QEMU - # Release 6 translation routines
> + *
> + * Copyright (c) 2004-2005 Jocelyn Mayer
> + * Copyright (c) 2006 Marius Groeger (FPU operations)
> + * Copyright (c) 2006 Thiemo Seufer (MIPS32R2 support)
> + * Copyright (c) 2020 Philippe Mathieu-Daudé
> + *
> + * This code is licensed under the GNU GPLv2 and later.
> + */
> +
> +#include "qemu/osdep.h"
> +#include "tcg/tcg-op.h"
> +#include "exec/helper-gen.h"
> +#include "translate.h"
> +
> +/* Include the auto-generated decoder. */
> +#include "decode-isa-mips32r6.c.inc"
> +#if defined(TARGET_MIPS64)
> +#include "decode-isa-mips64r6.c.inc"
> +#endif /* TARGET_MIPS64 */
> +
> +static bool trans_LSA(DisasContext *ctx, arg_LSA *a)
> +{
> + return gen_LSA(ctx, a->rd, a->rt, a->rs, a->sa);
> +}
> +
> +#if defined(TARGET_MIPS64)
> +static bool trans_DLSA(DisasContext *ctx, arg_LSA *a)
> +{
> + return gen_DLSA(ctx, a->rd, a->rt, a->rs, a->sa);
> +}
You should be able to share these trans_* functions, and then with or after the
next patch, fold the gen_* functions into their single caller, the trans_*
functions.
Note that decodetree --translate=trans will drop the static, without otherwise
adjusting the function naming.
r~
- [PATCH 00/13] target/mips: Convert LSA/DLSA and part of the Rel6 removed opcodes, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 01/13] !fixup "target/mips/translate: Add declarations for generic code", Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 02/13] target/mips: Extract LSA/DLSA translation generators, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 03/13] target/mips: Introduce decodetree helpers for MSA LSA/DLSA opcodes, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6 LSA/DLSA opcodes, Philippe Mathieu-Daudé, 2020/12/08
- Re: [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6 LSA/DLSA opcodes,
Richard Henderson <=
- [PATCH 05/13] target/mips: Remove now unreachable LSA/DLSA opcodes code, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 06/13] target/mips: Convert Rel6 Special2 opcode to decodetree, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 07/13] target/mips: Convert Rel6 COP1X opcode to decodetree, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 08/13] target/mips: Convert Rel6 CACHE/PREF opcodes to decodetree, Philippe Mathieu-Daudé, 2020/12/08
- [PATCH 09/13] target/mips: Convert Rel6 LWL/LWR/SWL/SWR opcodes to decodetree, Philippe Mathieu-Daudé, 2020/12/08