|
From: Kristian V. D. V. <va...@li...> - 2004-10-17 22:02:31
|
On Sunday 17 October 2004 7:33 pm, Jake Hamby wrote: > Kristian Van Der Vliet wrote: >> So far the only thing which has made any difference is to compile with >> -O1 instead of -O2, so it must be an over-agresive optimisation going on >> somewhere. It just doesn't appear to be in the atomic code. > > Can you figure out which file(s) need to be compiled with -O1 for the > kernel to work? You should be able to do a binary search: compile half > of the files with -O1 and keep dividing by two until you've isolated the > files which are responsible. Then post your results and I'll look at > the assembly output to see if anything pops out. Hopefully the problem > is isolated to one or two specific source files. Attached is the result of tonights work. I've identified smp.c as the culprit (Makes sense, at least) I was working with the stock 0.5.4 source which did not include your previous patches for -O2, so I've used -O3 and -O1, although I will confirm tommorrow with -O1 and -O2 just to be 100% sure. The zip contains the following files: smp.o.O1 - smp.c compiled with the following flags: -D__KERNEL__ -D__BUILD_KERNEL__ -no-fPIC -c -g -O1 -fno-strict-aliasing -Wall -march=i586 -mcpu=i586 smp.o.O3 - smp.c compiled with the following flags: -D__KERNEL__ -D__BUILD_KERNEL__ -no-fPIC -c -g -O3 -fno-strict-aliasing -Wall -march=i586 -mcpu=i586 smp.s.O1 - smp.c compiled with the following flags: -D__KERNEL__ -D__BUILD_KERNEL__ -no-fPIC -s -g -O1 -fno-strict-aliasing -Wall -march=i586 -mcpu=i586 smp.s.O3 - smp.c compiled with the following flags: -D__KERNEL__ -D__BUILD_KERNEL__ -no-fPIC -s -g -O3 -fno-strict-aliasing -Wall -march=i586 -mcpu=i586 smp.O1.dump - Output from objdump -ds smp.o.O1 smp.O3.dump - Output from objsump -ds smp.o.O3 If you need anything else please give me a shout and I'll get see what I can do. -- Vanders http://syllable.sourceforge.net/ http://www.liqwyd.com |