From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 2EF8838582BC for ; Fri, 16 Feb 2024 13:40:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2EF8838582BC Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2EF8838582BC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.119.248.221 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708090859; cv=none; b=wu5wfBmCdNXNz5M/X/kuExNuOKSwqaQ8uuoVldNTjBQXPv3Q6UuskyxdXYfUC2IyU+Yl0lpo5HGioKf4R1dIU8aMzdz1IDaF3mOLVhubjOZGJzlleiA6l21ffthuH6lsMmo+8xOknL9HkgtgDCbyXOHqUNpun5JfB9r4/sf/61s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708090859; c=relaxed/simple; bh=lXpdMO3Lcj9jMjycWxt1LX2VFMb3KARzrVMDa5qiNTI=; h=Mime-Version:Subject:From:Date:Message-Id:To; b=pqGX9eKyZyQSPTITxF5wKLEPl9E7eQK9DLxd1QX0CT7hMXJZe2UJBkc4AlqQCbpibVv39682h9E55bnrg25hwohepTv7+HnZv0+YMaHXH43Z9RFWrpX0/9RhbQo7+34W2mQLTYf60NtIt4XXL6rouQkQcV1yrVscn2y/aXd9al4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 82003 invoked from network); 16 Feb 2024 13:40:55 -0000 X-APM-Out-ID: 17080908558200 X-APM-Authkey: 257869/1(257869/1) 3 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 16 Feb 2024 13:40:55 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: [PATCH] aarch64, acle header: Cast uint64_t pointers to DIMode. From: Iain Sandoe In-Reply-To: Date: Fri, 16 Feb 2024 13:40:55 +0000 Cc: GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: References: <20240205145606.93835-1-iain@sandoe.co.uk> <380B64B0-9824-4121-81B8-F61EB4813B0D@gmail.com> To: Richard Sandiford X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_COUK,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On 15 Feb 2024, at 18:05, Richard Sandiford = wrote: >=20 > Iain Sandoe writes: >>> On 5 Feb 2024, at 14:56, Iain Sandoe wrote: >>>=20 >>> Tested on aarch64-linux,darwin and a cross from aarch64-darwin to = linux, >>> OK for trunk, or some alternative is needed? >>=20 >> Hmm.. apparently, this fails the linaro pre-commit CI for g++ with: >> error: invalid conversion from 'long int*' to 'long unsigned int*' = [-fpermissive] >>=20 >> So, I guess some alternative is needed, advice welcome, >=20 > The builtins are registered with: >=20 > static void > aarch64_init_rng_builtins (void) > { > tree unsigned_ptr_type =3D build_pointer_type = (unsigned_intDI_type_node); > ... >=20 > Does it work if you change unsigned_intDI_type_node to > get_typenode_from_name (UINT64_TYPE)? Yes, that works fine; tested on aarch64-linux and aarch64-darwin. revised, as below, OK for trunk? Iain Subject: [PATCH] aarch64: Register rng builtins with uint64_t pointers. Currently, these are registered as unsigned_intDI_type_node which is not necessarily the same type definition as uint64_t. On platforms where = these differ that causes fails in consuming the arm_acle.h header. gcc/ChangeLog: * config/aarch64/aarch64-builtins.cc = (aarch64_init_rng_builtins): Register these builtins with a pointer to uint64_t rather than = unsigned DI mode. --- gcc/config/aarch64/aarch64-builtins.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64-builtins.cc = b/gcc/config/aarch64/aarch64-builtins.cc index e211a7271ba..1330558f109 100644 --- a/gcc/config/aarch64/aarch64-builtins.cc +++ b/gcc/config/aarch64/aarch64-builtins.cc @@ -1759,7 +1759,8 @@ aarch64_init_tme_builtins (void) static void aarch64_init_rng_builtins (void) { - tree unsigned_ptr_type =3D build_pointer_type = (unsigned_intDI_type_node); + tree unsigned_ptr_type + =3D build_pointer_type (get_typenode_from_name (UINT64_TYPE)); tree ftype =3D build_function_type_list (integer_type_node, unsigned_ptr_type, = NULL); aarch64_builtin_decls[AARCH64_BUILTIN_RNG_RNDR] --=20 2.39.2 (Apple Git-143)