From: Richard Henderson <richard.henderson@linaro.org>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
libc-alpha@sourceware.org, Szabolcs Nagy <szabolcs.nagy@arm.com>
Subject: Re: [PATCH] arm: Support gcc older than 10 for find_zero_all
Date: Mon, 20 Feb 2023 09:26:57 -1000 [thread overview]
Message-ID: <48f954b7-2ba5-ddb2-cb73-323029b0ed82@linaro.org> (raw)
In-Reply-To: <20230220164809.2581181-1-adhemerval.zanella@linaro.org>
On 2/20/23 06:48, Adhemerval Zanella via Libc-alpha wrote:
> __builtin_arm_uqsub8 is only available on gcc newer or equal than 10.
>
> Checked on arm-linux-gnueabihf built with gcc 9.
> ---
> sysdeps/arm/armv6t2/string-fza.h | 6 ++++++
> 1 file changed, 6 insertions(+)
Whoops, thanks.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> diff --git a/sysdeps/arm/armv6t2/string-fza.h b/sysdeps/arm/armv6t2/string-fza.h
> index 76274ccca7..d85ce86434 100644
> --- a/sysdeps/arm/armv6t2/string-fza.h
> +++ b/sysdeps/arm/armv6t2/string-fza.h
> @@ -33,7 +33,13 @@ find_zero_all (op_t x)
> /* Use unsigned saturated subtraction from 1 in each byte.
> That leaves 1 for every byte that was zero. */
> op_t ones = repeat_bytes (0x01);
> +#if __GNUC_PREREQ (10, 0)
> return __builtin_arm_uqsub8 (ones, x);
> +#else
> + op_t ret;
> + asm ("uqsub8 %0,%1,%2" : "=r"(ret) : "r"(ones), "r"(x));
> + return ret;
> +#endif
> }
>
> /* Identify bytes that are equal between X1 and X2. */
next prev parent reply other threads:[~2023-02-20 19:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 16:48 Adhemerval Zanella
2023-02-20 19:26 ` Richard Henderson [this message]
2023-02-22 16:37 Wilco Dijkstra
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=48f954b7-2ba5-ddb2-cb73-323029b0ed82@linaro.org \
--to=richard.henderson@linaro.org \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=szabolcs.nagy@arm.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 read-only IMAP folder(s) and NNTP newsgroup(s).