From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by sourceware.org (Postfix) with ESMTPS id 44CAC3952012 for ; Mon, 5 Dec 2022 21:22:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 44CAC3952012 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-3704852322fso131924707b3.8 for ; Mon, 05 Dec 2022 13:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GWSqymWOoTmZ+V1BFivGhOmV5Uo8pbHiFWhom6lWVFc=; b=PmdIumXWkWt8EaKsBhKj5DL2NGUZvgspvKtbUC+E84S34oOMvkbaklhhxEBZ8W5v3z SbPUsMPw6pUKB5zTA+djS08wrq4Bkcq3qVUSWh+G6gWRZjnajMs3I/WkJRZUwVfVHFll bd8SyM0gbH2eogH9A+endTNNA5FQu1G3oQVM8x79XXiQVIvNXNyCQEEjqC8c+MlHAZuw ftxGKZmVQzHXSvFNv1rQ7cKdUlb6gunnkMQm/gL3Dl4iuIo/E30gfN2t5FOw+/xr/u6O 60TFF635MC+tAc7CsO6+vnvpQ5DJPSrJDIP2xDAWLt0sFRmkEK0wJKHSDKzbgZPAvXDj ErGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GWSqymWOoTmZ+V1BFivGhOmV5Uo8pbHiFWhom6lWVFc=; b=UILBBJBrxFn/QW1pwoH7vf7GokrtnTVT8gQQbwT4mNeF7R+KO25EmD6ym0rQAhIfEf 0KVLMj92tp6HHjOYUV8CdeU8Xkf0EZLWsoPSYfHH35fnHyR/ZJWwbFvidO6grb8j7OZ0 nVCmACn2FE7ePA5Uw4IKEgivbB+hwYoltRQ/dP3pGWq45Au/vc1RSgtZVAqcVDsZ0hvI 1/aMVMHNOUt7hoz/t3//kdVRMQ368Y/1NoA6vAaIqsc+VdzGiSyiXHicybxV04/g1YdU yYmjXoD6QXM5/y+WWC4b5HLEXA3ufJb4Ri+DDwbPQJ/A+YRBSR79/qVBIEtOx4Fl4kzR L2BA== X-Gm-Message-State: ANoB5plrqq/JWYdAaqaRvu4zY2gEHH+Dd9aMRIZg2/ba3JEOhcG/DrVF sG7jVZC6npbjaQh5H+XKhR+isfVkegtfbDrIuyw= X-Google-Smtp-Source: AA0mqf5UoiOoN7S3Ok466m5KpILK1H6/Bd5OjHUptECEJzhtyQK19JYj1nw0RLkETebGWPpO3VTYpu3JrWMijv4Qhxg= X-Received: by 2002:a0d:df49:0:b0:3e4:f2f8:4ada with SMTP id i70-20020a0ddf49000000b003e4f2f84adamr11283577ywe.429.1670275346600; Mon, 05 Dec 2022 13:22:26 -0800 (PST) MIME-Version: 1.0 References: <20221204115150.35508-1-iain@sandoe.co.uk> <47BE3C16-6C72-4F13-94D7-9754BD3DEE77@sandoe.co.uk> In-Reply-To: From: Uros Bizjak Date: Mon, 5 Dec 2022 22:22:15 +0100 Message-ID: Subject: Re: [PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI. To: Iain Sandoe Cc: GCC Patches , crazylht@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Mon, Dec 5, 2022 at 10:17 PM Iain Sandoe wrote: > > Hi Uros, > > > On 5 Dec 2022, at 21:07, Uros Bizjak via Gcc-patches wrote: > > > > On Mon, Dec 5, 2022 at 3:54 PM Iain Sandoe wrote: > >> > >> Hi Uros, > >> > >>> On 5 Dec 2022, at 10:37, Uros Bizjak via Gcc-patches wrote: > >>> > >>> On Sun, Dec 4, 2022 at 9:30 PM Iain Sandoe wrote: > >>>> > >> > >>>> gcc/testsuite/ChangeLog: > >>>> > >>>> * gcc.target/x86_64/abi/bf16/args.h: Make xmm_regs, x87_regs e= xtern. > >>>> * gcc.target/x86_64/abi/bf16/m256bf16/args.h: Likewise. > >>>> * gcc.target/x86_64/abi/bf16/m512bf16/args.h: Likewise. > >>>> * gcc.target/x86_64/abi/bf16/asm-support.S: Add Mach-O variant= . > >>>> * gcc.target/x86_64/abi/bf16/m256bf16/asm-support.S: Likewise. > >>>> * gcc.target/x86_64/abi/bf16/m512bf16/asm-support.S: Likewise. > >>> > >>> Please note that in other directories asm-support-darwin.s is > >>> introduced and included via .exp file. Is there a reason a different > >>> approach is introduced here? > >> > >> Since it seems that testcases get added and amended without considerin= g any > >> sub-target apart from x86_64-linux-gnu (even by very experienced contr= ibutors), > >> I was hoping that the Darwin section might prompt folks to remember th= at there > >> are several other sub-targets. > >> > >> However, the main thing is to fix the tests .. so here=E2=80=99s a ver= sion using separate > >> files. > > > > extern void (*callthis)(void); > > extern unsigned long long > > rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15; > > -XMM_T xmm_regs[16]; > > -X87_T x87_regs[8]; > > +extern XMM_T xmm_regs[16]; > > +extern X87_T x87_regs[8]; > > > > Do you still need this change? Existing test files are compiled without= extern. > > > > + .globl _callthis > > + .zerofill __DATA,__bss,_callthis,8,3 > > + .globl _rax > > + .zerofill __DATA,__bss,_rax,8,3 > > + .globl _rbx > > + .zerofill __DATA,__bss,_rbx,8,3 > > + .globl _rcx > > + .zerofill __DATA,__bss,_rcx,8,3 > > + .globl _rdx > > + .zerofill __DATA,__bss,_rdx,8,3 > > ... > > > > I wonder if the above approach is better than existing: > > > > .comm _callthis,8 > > .comm _rax,8 > > .comm _rbx,8 > > .comm _rcx,8 > > .comm _rdx,8 > > ... > > As noted in the changelog, direct access to common data is not permitted = in the Darwin > ABI [for x86_64, it would need to be _xxx@GOTPCREL(%rip)..] that=E2=80=99= s why these have > been moved to bss. Thanks for the explanation! The patch is OK. > > It is strange to have two different approaches for similar tests. If > > the new approach is better, we should also change existing asm-support > > files. > > could be, I have not checked other case so far (extremely limited time at= the moment) > > Quite likely, the accesses work in the testcases, despite violating the A= BI. This is never a good sign, it will break sooner or later... Thanks, Uros.