public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/10396: Constraint alternatives cause error " `asm' operand requires impossible reload"
@ 2003-04-14  4:06 gonz
  0 siblings, 0 replies; 2+ messages in thread
From: gonz @ 2003-04-14  4:06 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: optimization/10396: Constraint alternatives cause error " `asm' operand requires impossible reload"
@ 2003-04-14  7:23 steven
  0 siblings, 0 replies; 2+ messages in thread
From: steven @ 2003-04-14  7:23 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, gonz, nobody

Synopsis: Constraint alternatives cause error " `asm' operand requires impossible reload"

State-Changed-From-To: open->feedback
State-Changed-By: steven
State-Changed-When: Mon Apr 14 07:23:24 2003
State-Changed-Why:
    Do you have this problem with 3.3 as well?  Many reload and inline-asm problems have been fixed for 3.3, maybe your problem is fixed there as well.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10396


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-14  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14  4:06 optimization/10396: Constraint alternatives cause error " `asm' operand requires impossible reload" gonz
2003-04-14  7:23 steven

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).