public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: Marcel Vollweiler <marcel@codesourcery.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] gcc/configure.ac: fix register issue for global_load assembler functions
Date: Mon, 14 Jun 2021 13:36:54 +0100	[thread overview]
Message-ID: <20210614133654.0b5aae6f@squid.athome> (raw)
In-Reply-To: <284bb460-f192-db1d-8deb-fd9579ebdd9a@codesourcery.com>

On Wed, 9 Jun 2021 16:47:21 +0200
Marcel Vollweiler <marcel@codesourcery.com> wrote:

> This patch fixes an issue with global_load assembler functions leading
> to a "invalid operand for instruction" error since in different LLVM
> versions those functions use either one or two registers.

LLVM is neither forward- nor backward-compatible with regards to those
registers then, I guess? That's unfortunate...

> In this patch a compatibility check is added to the configure.ac.

The implementation of the solution looks fine, but I worry it's the
wrong approach. What would someone packing GCC for a distribution use
for the configuration setting? It'd mean having a dependency on the
exact LLVM version for a given offloading-compiler build -- so LLVM
couldn't be upgraded separately from the offloading compiler. Maybe
that's OK in practice?

I wonder if the LLVM assembler has a macro system we could abuse
instead? Perhaps not. Or another (very ugly) alternative that would work
with either assembler is giving up and emitting the instruction bit
patterns directly (as we have done elsewhere for certain "SCC"-setting
instructions).

Julian


  reply	other threads:[~2021-06-14 12:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 14:47 Marcel Vollweiler
2021-06-14 12:36 ` Julian Brown [this message]
2021-06-14 13:28   ` Tobias Burnus
2021-06-14 14:26   ` Andrew Stubbs
2021-06-14 15:28   ` Julian Brown
2021-06-16  9:34 ` Marcel Vollweiler
2021-06-16 16:01   ` Julian Brown
2021-06-16 17:19     ` Joseph Myers
2021-06-17 13:50       ` Marcel Vollweiler
2021-06-17 20:31         ` Joseph Myers

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=20210614133654.0b5aae6f@squid.athome \
    --to=julian@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcel@codesourcery.com \
    /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).