public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, crazylht@gmail.com
Subject: Re: [PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI.
Date: Mon, 5 Dec 2022 22:07:40 +0100	[thread overview]
Message-ID: <CAFULd4ZhJjqmSJ5JPoLQksS8xto-kWbHBfXWyZotTH4kwEwqNQ@mail.gmail.com> (raw)
In-Reply-To: <E45AC0D8-DF3E-4EAD-9F40-42464D688BBA@sandoe.co.uk>

On Mon, Dec 5, 2022 at 3:54 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
>
> Hi Uros,
>
> > On 5 Dec 2022, at 10:37, Uros Bizjak via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Sun, Dec 4, 2022 at 9:30 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
> >>
>
> >> gcc/testsuite/ChangeLog:
> >>
> >>        * gcc.target/x86_64/abi/bf16/args.h: Make xmm_regs, x87_regs extern.
> >>        * 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 considering any
> sub-target apart from x86_64-linux-gnu (even by very experienced contributors),
> I was hoping that the Darwin section might prompt folks to remember that there
> are several other sub-targets.
>
> However, the main thing is to fix the tests .. so here’s a version 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
...

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.

Uros.

  reply	other threads:[~2022-12-05 21:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 11:51 Iain Sandoe
2022-12-04 20:20 ` Uros Bizjak
2022-12-04 20:30   ` Iain Sandoe
2022-12-05 10:37     ` Uros Bizjak
2022-12-05 14:54       ` Iain Sandoe
2022-12-05 21:07         ` Uros Bizjak [this message]
2022-12-05 21:17           ` Iain Sandoe
2022-12-05 21:22             ` Uros Bizjak

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=CAFULd4ZhJjqmSJ5JPoLQksS8xto-kWbHBfXWyZotTH4kwEwqNQ@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /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).