Bug 4283

Summary: Use of global labels in fbHaveMMX()
Product: pixman Reporter: Owen Taylor <otaylor>
Component: pixmanAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: mldb
Version: 0.1.3   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch I've applied to cairo/pixman

Description Owen Taylor 2005-08-28 12:50:37 UTC
Marco Manfredini reports:

http://lists.freedesktop.org/archives/cairo/2005-August/005168.html

===
Compiling the cairo release with gcc-4.0.1 and -O3 fails in pixman/src

$ gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I. -mmmx -msse -Winline --param 
inline-unit-growth=10000 --param large-function-growth=10000 -O3 
-march=athlon-xp -fomit-frame-pointer -MT libpixman_mmx_la-fbmmx.lo -MD -MP 
-MF .deps/libpixman_mmx_la-fbmmx.Tpo -c fbmmx.c -o libpixman_mmx_la-fbmmx.o
/tmp/ccUfhV8U.s: Assembler messages:
/tmp/ccUfhV8U.s:783: Error: symbol `skip' is already defined
/tmp/ccUfhV8U.s:878: Error: symbol `skip2' is already defined

That's because gcc-4.0.1 is inlining more aggressively and duplicates the 
assembly in detectCPUFeatures().
===
Comment 1 Owen Taylor 2005-08-28 12:53:51 UTC
Created attachment 3091 [details] [review]
Patch I've applied to cairo/pixman

I've applied the attached patch to libpixman; Marco tested that
it fixed his problem. Billy - can you do the merge-to-xserver
drill?
Comment 2 Billy Biggs 2005-08-28 20:28:29 UTC
While I have no problem with the change, it seems like the problem occurs when
fbHaveMMX is inlined into fbComposeSetupMMX, which seems odd.  Are we bringing
any of this onto ourselves by compiling with these parameters:

-Winline --param inline-unit-growth=10000 --param large-function-growth=10000

Or, is this just -O3 being completely insane and bloating code?
Comment 3 Billy Biggs 2005-08-28 20:33:16 UTC
I have applied the patch to xserver.
Comment 4 Owen Taylor 2005-08-29 10:34:45 UTC
It may indeed be a bad interaction between our "inline big functions"
parameters and -O3's "inline even when not asked for" behavior. But I think
the change is correct in any case.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.