Bug 150202 - gcc 4.0 doesn't like inline asm syntax that gcc 3.4 didn't mind
Summary: gcc 4.0 doesn't like inline asm syntax that gcc 3.4 didn't mind
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-03 18:17 UTC by Ray Strode [halfline]
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 4.0.0-0.32
Clone Of:
Environment:
Last Closed: 2005-03-10 09:09:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File that demonstrates the problem (379 bytes, text/plain)
2005-03-03 18:19 UTC, Ray Strode [halfline]
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 20314 0 None None None Never

Description Ray Strode [halfline] 2005-03-03 18:17:34 UTC
<halfline> does any one know what's wrong with this? I'm not familiar
with gcc's inline assembly syntax: 

__asm__ volatile ("imull %3\n\t" 
                  "shrdl %%cl,%1,%0" 
                  : "+a,a" (x), "=d,d" (zhi) 
                  : "%0,%0" (x), "m,r" (y), "c,c" (n))
<jakub> halfline: I'd try s/%0,%0/%0,0/
<halfline> jakub: unfortunately that doesn't do it
<jakub> halfline: can you cook a really small 5 liner (or so) from it
and bugzilla it against gcc?

Comment 1 Ray Strode [halfline] 2005-03-03 18:19:01 UTC
Created attachment 111624 [details]
File that demonstrates the problem

This attachment shows the problem.  Compile with gcc foo.c -o foo

Comment 2 Jakub Jelinek 2005-03-04 11:44:17 UTC
Changing the + to = will certainly work as a workaround.

Comment 3 Jakub Jelinek 2005-03-10 09:09:10 UTC
gcc-4.0.0-0.32 will grok
: "+a,a" (x), "=d,d" (zhi)
: "m,r" (y), "c,c" (n)
which -0.31 did not grok.
Using "%0,%0" is a bug, and so is using +a and "%0,0" against the same operand
(it is pointless, "+a,a" already has implied "0,0" counterpart)
or you want "=a,a" and "%0,0" instead.

FYI, although for some reason GCC 3.4 happened to reload this, it e.g.
often fails to reload just
: "+a" (x), "=d" (zhi) : "0" (x), "r" (y)", "c" (n)
so I wouldn't call this a regression.


Note You need to log in before you can comment on or make changes to this bug.