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

2004-10-13 Thread Branden Robinson
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] & 0x))
> : "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 --
[EMAIL PROTECTED] | if you know where to dig."
http://people.debian.org/~branden/ | -- _Shine_


signature.asc
Description: Digital signature


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

2004-09-21 Thread Chris Lange
Hi,

I have a laptop with a TM Crusoe TM5800 and ATi mobility M and have been
experiencing this same problem (albeit with Fedora Core 1 -- sorry for
posting here but i haven't found any other mention of it on the web and
thought the info might be handy to others)

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] & 0x))
: "cc");
}
*/

You can download my custom FC1 rpms from here:
http://tardis.ath.cx/misc/xf86_4.3.0_cust/

(i know this is of little relevance but at least it might help some
fedora newbies like me get their laptops working)

Regards,
Chris