[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#216933: Compiling XFree86 4.3.0 with -O0 seems to be a workaround



On Tue, Sep 21, 2004 at 06:51:18PM +1000, Chris Lange wrote:
> I've compiled XFree86 4.3.0 with the following compiler flags,
> -march=i386 -mcpu=i386 -O0 -fomit-frame-pointer -finline-functions,
> and my system has now been running without a hitch for 19 days (i was
> usually getting the "BadLength error" after only 2 to 4 hours after
> every reboot when using the stock Fedora XF86 rpms).
> 
> NB: Around the code at line 241 of
> XFree86-4.3.0/xc/extras/Mesa/src/glapi.c I had to comment out the
> following in order to successfully compile with -O0 (gcc was complaining
> about running out of registers): 
> 
> /*
> if (use_cmpxchg8b)
> for (p = _gl_entrypoint_templ + 4; p < _gl_end_table; p += 4) {
> __asm __volatile ("lock; cmpxchg8b %0"
> : "=m" (p[0]), "=m" (p[1]), "=a" (tmp1), "=d" (tmp2)
> : "m" (p[0]), "m" (p[1]), "a" (p[0]), "d" (p[1]),
> "b" (_gl_entrypoint_templ[0]),
> "c" (c | (p[1] & 0xffff0000))
> : "cc");
> }
> */

Huh.  I'm not aware that this caused gcc warnings anywhere.  Maybe it only
does so on Crusoe chips?

-- 
G. Branden Robinson                |         "Religion is nonsense."
Debian GNU/Linux                   |         "It's also a gold mine --
branden@debian.org                 |         if you know where to dig."
http://people.debian.org/~branden/ |         -- _Shine_

Attachment: signature.asc
Description: Digital signature


Reply to: