From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12336 invoked by alias); 14 Apr 2003 04:06:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 12299 invoked by uid 71); 14 Apr 2003 04:06:02 -0000 Resent-Date: 14 Apr 2003 04:06:02 -0000 Resent-Message-ID: <20030414040602.12298.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, gonz@ratloop.com Received: (qmail 11374 invoked by uid 48); 14 Apr 2003 04:05:24 -0000 Message-Id: <20030414040524.11372.qmail@sources.redhat.com> Date: Mon, 14 Apr 2003 04:06:00 -0000 From: gonz@ratloop.com Reply-To: gonz@ratloop.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/10396: Constraint alternatives cause error " `asm' operand requires impossible reload" X-SW-Source: 2003-04/txt/msg00592.txt.bz2 List-Id: >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: