public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iains.gcc@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] aarch64, acle header: Cast uint64_t pointers to DIMode.
Date: Mon, 5 Feb 2024 21:04:29 +0000	[thread overview]
Message-ID: <380B64B0-9824-4121-81B8-F61EB4813B0D@gmail.com> (raw)
In-Reply-To: <20240205145606.93835-1-iain@sandoe.co.uk>



> On 5 Feb 2024, at 14:56, Iain Sandoe <iains.gcc@gmail.com> wrote:
> 
> Tested on aarch64-linux,darwin and a cross from aarch64-darwin to linux,
> OK for trunk, or some alternative is needed?

Hmm.. apparently, this fails the linaro pre-commit CI for g++ with:
error: invalid conversion from 'long int*' to 'long unsigned int*' [-fpermissive]

So, I guess some alternative is needed, advice welcome,
Iain

> thanks
> Iain
> 
> --- 8< ---
> 
> Currently, most of the acle tests fail on the Darwin port because
> DI mode is "long" and uint64 is "long long".  The fix for this used
> in other headers is to cast the pointers using __builtin_aarch64_simd_di
> and that is what this patch does.
> 
> gcc/ChangeLog:
> 
> 	* config/aarch64/arm_acle.h (__rndr): Cast uint64 pointer to DI
> 	mode to avoid typedef mismatches.
> 	(__rndrrs): Likewise.
> ---
> gcc/config/aarch64/arm_acle.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/config/aarch64/arm_acle.h b/gcc/config/aarch64/arm_acle.h
> index 2aa681090fa..823f87187b1 100644
> --- a/gcc/config/aarch64/arm_acle.h
> +++ b/gcc/config/aarch64/arm_acle.h
> @@ -309,14 +309,14 @@ __extension__ extern __inline int
> __attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
> __rndr (uint64_t *__res)
> {
> -  return __builtin_aarch64_rndr (__res);
> +  return __builtin_aarch64_rndr ((__builtin_aarch64_simd_di *) __res);
> }
> 
> __extension__ extern __inline int
> __attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
> __rndrrs (uint64_t *__res)
> {
> -  return __builtin_aarch64_rndrrs (__res);
> +  return __builtin_aarch64_rndrrs ((__builtin_aarch64_simd_di *) __res);
> }
> 
> #pragma GCC pop_options
> -- 
> 2.39.2 (Apple Git-143)
> 


  reply	other threads:[~2024-02-05 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 14:56 Iain Sandoe
2024-02-05 21:04 ` Iain Sandoe [this message]
2024-02-15 18:05   ` Richard Sandiford
2024-02-16 13:40     ` Iain Sandoe
2024-02-19  9:48       ` Richard Sandiford

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=380B64B0-9824-4121-81B8-F61EB4813B0D@gmail.com \
    --to=iains.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).