From: Segher Boessenkool <segher@kernel.crashing.org>
To: LIU Hao <lh_mouse@126.com>
Cc: David Brown <david@westcontrol.com>, gcc-help@gcc.gnu.org
Subject: Re: Odd error with the "X" inline assembly constraint
Date: Sun, 7 Jan 2024 12:32:36 -0600 [thread overview]
Message-ID: <20240107183235.GH19790@gate.crashing.org> (raw)
In-Reply-To: <5060b400-38cb-410b-b2d8-1f305b309a50@126.com>
On Sun, Jan 07, 2024 at 06:04:23PM +0800, LIU Hao wrote:
> 在 2024/1/6 2:46, Segher Boessenkool 写道:
> >The C constraint means "Any operand whatsoever is allowed." Here you
> >are saying to use it both as input and as output, and GCC does not know
> >how to reload wherever it chose to put it.
>
> Would you mind elaborating a bit more? On x86 and x86-64 it's almost always
> the case that an expression can be used as either a source or a destination.
This is just GCC internals. The compiler will never look at the
template string in an asm at all, anyway.
I don't know why exactly you get the error. Make a compilable
reproducer, file a bug (<https://gcc.gnu.org/bugs.html>), it sounds like
something we can improve :-)
Segher
next prev parent reply other threads:[~2024-01-07 18:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 16:30 David Brown
2024-01-05 17:53 ` LIU Hao
2024-01-05 18:46 ` Segher Boessenkool
2024-01-07 10:04 ` LIU Hao
2024-01-07 15:26 ` David Brown
2024-01-07 18:32 ` Segher Boessenkool [this message]
2024-01-08 18:39 ` David Brown
2024-01-07 15:10 ` David Brown
2024-01-07 18:24 ` Segher Boessenkool
2024-01-08 18:48 ` David Brown
2024-01-07 23:18 ` Marc Glisse
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=20240107183235.GH19790@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=david@westcontrol.com \
--cc=gcc-help@gcc.gnu.org \
--cc=lh_mouse@126.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).