public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gonz@ratloop.com
To: gcc-gnats@gcc.gnu.org
Subject: optimization/10396: Constraint alternatives cause error " `asm' operand requires impossible reload"
Date: Mon, 14 Apr 2003 04:06:00 -0000	[thread overview]
Message-ID: <20030414040524.11372.qmail@sources.redhat.com> (raw)


>Number:         10396
>Category:       optimization
>Synopsis:       Constraint alternatives cause error " `asm' operand requires impossible reload"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 14 04:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pete Gonzalez
>Release:        GCC 3.2.1 (cross compiler)
>Organization:
>Environment:
This is a custom build of GCC on Win32 Cygwin, with target CPU arm7tdmi.  I am using the C++ front end.
>Description:
When compiling with optimizations (-O2 or -O3), the function below sometimes causes GCC to fail with the error message "`asm' operand requires impossible reload".  The function compiles fine by itself and also in simple contexts; it seems that the error only occurs in complex inlining situations.

The error goes away if I reduce the constraints to a single alternative (instead of 3).  It does not matter which of the three I choose, which suggests that my constraint expressions are valid.

The "impossible reload" message is coming from line 3933 of gcc/reload1.c, but I can't find any documentation on this error.

_____________________________

inline int multiplyFixedPoint(int mantissaA,int mantissaB) {
  int result;
  int temp;

  asm("\n\
	smull	%0, %1, %2, %3 \n\
	mov	%0, %0, lsr #16 \n\
	orr	%0, %0, %1, lsl #16 \n\
  " : "=&r,&r,&r"(result), "=&r,&r,&r"(temp) // outputs
    : "%r,r,r"(mantissaA), "0,1,r"(mantissaB)  // inputs
    : "cc" // clobbered
  );
  return result;
}
>How-To-Repeat:
If someone is interested in pursuing this, I can isolate some source code that reproduces the problem.  However, the situations which expose the bug might depend on the particular build of GCC.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2003-04-14  4:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14  4:06 gonz [this message]
2003-04-14  7:23 steven

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=20030414040524.11372.qmail@sources.redhat.com \
    --to=gonz@ratloop.com \
    --cc=gcc-gnats@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).