qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Aleksandar Rikalo <arikalo@gmail.com>
Subject: Re: [PATCH] target/mips: Introduce disas_mt_available()
Date: Thu, 24 Oct 2024 17:04:09 -0300	[thread overview]
Message-ID: <5d99392c-1b3c-4086-9ce9-463ed7f4162e@linaro.org> (raw)
In-Reply-To: <20241024195447.44600-1-philmd@linaro.org>

On 24/10/24 16:54, Philippe Mathieu-Daudé wrote:
> Similarly to commit 17c2c320f3c ("Introduce ase_mt_available helper"),
> introduce the disas_mt_available() one which takes a DisasContext
> argument to determine whether Multi-Threading is available by
> checking the MT bit of the CP0_Config3 register.
> 
> Remove the then unused ASE_MT definition.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/mips/mips-defs.h     |   1 -
>   target/mips/tcg/translate.h |   5 ++
>   target/mips/tcg/translate.c | 136 ++++++++++++++++++------------------
>   target/mips/cpu-defs.c.inc  |   4 +-
>   4 files changed, 75 insertions(+), 71 deletions(-)


> diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
> index 5d196e69ac4..b613726ea42 100644
> --- a/target/mips/tcg/translate.h
> +++ b/target/mips/tcg/translate.h
> @@ -228,6 +228,11 @@ bool decode_ext_octeon(DisasContext *ctx, uint32_t insn);
>   #endif
>   bool decode_ext_vr54xx(DisasContext *ctx, uint32_t insn);
>   
> +static inline bool disas_mt_available(DisasContext *ctx)
> +{
> +    return ctx->CP0_Config3 & (1 << CP0C3_MT);
> +}

BTW I considered inlining it in translate.c but the MT code will
eventually be converted to decodetree so better keep this helper
in the translate.h header.



  reply	other threads:[~2024-10-24 20:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 19:54 [PATCH] target/mips: Introduce disas_mt_available() Philippe Mathieu-Daudé
2024-10-24 20:04 ` Philippe Mathieu-Daudé [this message]
2024-10-25 12:00 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d99392c-1b3c-4086-9ce9-463ed7f4162e@linaro.org \
    --to=philmd@linaro.org \
    --cc=arikalo@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).