qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Bibo Mao <maobibo@loongson.cn>,
	Richard Henderson <richard.henderson@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] util: Add lasx cpuinfo for loongarch64
Date: Wed, 5 Jun 2024 13:53:30 +0200	[thread overview]
Message-ID: <b4335eb7-0143-4a37-8fbf-3cf5ff528411@linaro.org> (raw)
In-Reply-To: <20240605093213.2191929-2-maobibo@loongson.cn>

On 5/6/24 11:32, Bibo Mao wrote:
> Lasx is 256bit vector FPU capability, lsx is 128bit vector VFP. lsx
> is added already, lasx is added here.
> 
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
>   host/include/loongarch64/host/cpuinfo.h | 1 +
>   util/cpuinfo-loongarch.c                | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/host/include/loongarch64/host/cpuinfo.h b/host/include/loongarch64/host/cpuinfo.h
> index fab664a10b..d7bf27501d 100644
> --- a/host/include/loongarch64/host/cpuinfo.h
> +++ b/host/include/loongarch64/host/cpuinfo.h
> @@ -8,6 +8,7 @@
>   
>   #define CPUINFO_ALWAYS          (1u << 0)  /* so cpuinfo is nonzero */
>   #define CPUINFO_LSX             (1u << 1)
> +#define CPUINFO_LASX            (1u << 2)
>   
>   /* Initialized with a constructor. */
>   extern unsigned cpuinfo;
> diff --git a/util/cpuinfo-loongarch.c b/util/cpuinfo-loongarch.c
> index 08b6d7460c..bb1f7f698b 100644
> --- a/util/cpuinfo-loongarch.c
> +++ b/util/cpuinfo-loongarch.c
> @@ -29,6 +29,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
>   
>       info = CPUINFO_ALWAYS;
>       info |= (hwcap & HWCAP_LOONGARCH_LSX ? CPUINFO_LSX : 0);
> +    info |= (hwcap & HWCAP_LOONGARCH_LASX ? CPUINFO_LASX : 0);
>   
>       cpuinfo = info;
>       return info;

This is 
https://lore.kernel.org/qemu-devel/20240527211912.14060-6-richard.henderson@linaro.org/



  reply	other threads:[~2024-06-05 11:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05  9:32 [PATCH 0/2] Add simd optimization with function buffer_is_zero Bibo Mao
2024-06-05  9:32 ` [PATCH 1/2] util: Add lasx cpuinfo for loongarch64 Bibo Mao
2024-06-05 11:53   ` Philippe Mathieu-Daudé [this message]
2024-06-06  2:17     ` maobibo
2024-06-05  9:32 ` [PATCH 2/2] util/bufferiszero: Add simd acceleration " Bibo Mao
2024-06-05 23:51   ` Richard Henderson
2024-06-06  2:30     ` maobibo
2024-06-06  3:18       ` Richard Henderson
2024-06-06  3:27         ` Richard Henderson
2024-06-06  3:36           ` maobibo
2024-06-06  3:42             ` Richard Henderson
2024-06-06  4:00               ` maobibo
2024-06-07  0:25                 ` 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=b4335eb7-0143-4a37-8fbf-3cf5ff528411@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=maobibo@loongson.cn \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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).