Bug 4283 - Use of global labels in fbHaveMMX()
Summary: Use of global labels in fbHaveMMX()
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: 0.1.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2005-08-28 12:50 UTC by Owen Taylor
Modified: 2005-08-28 17:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Patch I've applied to cairo/pixman (1.92 KB, patch)
2005-08-28 12:53 UTC, Owen Taylor
Details | Splinter Review

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


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