Bug 150202 - gcc 4.0 doesn't like inline asm syntax that gcc 3.4 didn't mind
gcc 4.0 doesn't like inline asm syntax that gcc 3.4 didn't mind
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-03 13:17 EST by Ray Strode [halfline]
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.0.0-0.32
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-10 04:09:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 20314 None None None Never

  None (edit)
Description Ray Strode [halfline] 2005-03-03 13:17:34 EST
<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 13:19:01 EST
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 06:44:17 EST
Changing the + to = will certainly work as a workaround.
Comment 3 Jakub Jelinek 2005-03-10 04:09:10 EST
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.