> On 5 Feb 2024, at 14:56, Iain Sandoe <iains....@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)
>