From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: Naveen.Hurugalawadi@caviumnetworks.com (Hurugalawadi, Naveen)
Cc: gcc-patches@gcc.gnu.org (gcc-patches@gcc.gnu.org)
Subject: Re: [Patch] Ignore Invalid Memory operands in constraint 'X'
Date: Wed, 23 Jan 2013 13:58:00 -0000 [thread overview]
Message-ID: <201301231358.r0NDwfHZ013499@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <F3068DEED1A463459E0887A091B1549335F289@BY2PRD0710MB364.namprd07.prod.outlook.com> from "Hurugalawadi, Naveen" at Dec 12, 2012 03:29:49 AM
Naveen Hurugalawadi wrote:
> The definition of constraint 'X' allows all operands.
> `X' - Any operand whatsoever is allowed.
> However, invalid memory operands should not be valid input for 'X'.
>
> Please find attached the patch "X_constraint.patch" which ignores=20
> invalid memory operands in constraint 'X'.
I don't think this is correct. The internals documentation says:
"Any operand whatsoever is allowed, even if it does not satisfy
@code{general_operand}."
I've seen "X" constraints used in inline assembly where this is
indeed intended. The point of an "X" constraint is usually to
mark the assembly statement as having a data dependency on the
operand, without actually directly refering to operand (e.g.
because it is acessed implicitly/indirectly).
If the compiler were to reject certain forms of memory operands,
it would have to generate extra code (e.g. reloading an address);
but because "X" operands are not actually refered to by the
assembler code, any such preparatory code would be unnecessary.
[ The only operand forms that ought to be rejected even for "X"
are those that imply side-effects like pre-increment. ]
> Fixes the ICE gcc.dg/torture/asm-subreg-1.c on aarch64.
Clearly the compiler shouldn't crash either, but I guess it
really ought to be possible to fix this problem elsewhere.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
prev parent reply other threads:[~2013-01-23 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 3:29 Hurugalawadi, Naveen
2013-01-23 13:58 ` Ulrich Weigand [this message]
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=201301231358.r0NDwfHZ013499@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=Naveen.Hurugalawadi@caviumnetworks.com \
--cc=gcc-patches@gcc.gnu.org \
/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).