Errors in aa2
Hi everyone.
When compiling Andreas aa2 patch I got:
/usr/bin/kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O4 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -march=i686 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -DCPU=686 -c -o time.o time.ctime.c: In function `do_gettimeofday':
time.c:727: fixed or forbidden register 0 (ax) was spilled for class AREG. This may be due to a compiler bug or to impossible asm
statements or clauses.
The only difference is the inclusion of timeval_normalize.
If I get time.c from 2.2.18-pre21 compiles fine.
But I don't see any strange asm round there...
Signature · 7 lines
Juan Antonio Magallon Lacarta #> cd /pub mailto:[email protected] #> more beer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · J . A . Magallon
Hi everyone.
When compiling Andreas aa2 patch I got:
/usr/bin/kgcc-D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes(quoted diff) +0
-3-O4 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -march=i686 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o time.o time.c
Quoted 4 lines
time.c: In function `do_gettimeofday':
time.c:727: fixed or forbidden register 0 (ax) was spilled for class AREG. This may be due to a compiler bug or to impossible asm statements or clauses.
That's compiler bug obviously.
Anyways I guess you're triggering compiler bugs because of the weird optimizations (-O4). Note also that everything over -O2 is _wrongly_ used to inline everything and that will trash away all your icache (I remeber also Linus complained about that bad behaviour of >-O2 in the past and it's also trivial to fix [shouldn't be more than a one liner], but nobody on the gcc side seems to care to fix it since it's still impling the inline-functions in gcc CVS of a few weeks ago).
I triggered various compiler bugs both in 2.7.2.3 and egcs in the past but they're should be sorted out in 18pre21aa2 patchkit. If you can still trigger compiler bugs with the _default_ compiler options please let me know and I'll work around them. 2.95.2 compiles it fine for me.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 13 lines · On Sat, 18 Nov 2000 18:19:37 Andrea Arcangeli wrote:
Quoted 1 line · J . A . Magallon
/usr/bin/kgcc-D__KERNEL__ -I/usr/src/linux/include -Wall-Wstrict-prototypes
Quoted 7 lines
(quoted diff) +0
-3-O4 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -march=i686 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o time.o time.c
time.c: In function `do_gettimeofday':
time.c:727: fixed or forbidden register 0 (ax) was spilled for class AREG. This may be due to a compiler bug or to impossible asm statements or clauses.That's compiler bug obviously.
Quoted 8 lines
Anyways I guess you're triggering compiler bugs because of the weird optimizations (-O4). Note also that everything over -O2 is _wrongly_ used to inline everything and that will trash away all your icache (I remeber also Linus complained about that bad behaviour of >-O2 in the past and it's also trivial to fix [shouldn't be more than a one liner], but nobody on the gcc side seems to care to fix it since it's still impling the inline-functions in gcc CVS of a few weeks ago).
Thanks. I tried to do "by hand" the inlining (just cut and paste, the proc seemed
not to be used anywhere but time.c), but the result was the same. So looked at the
gcc info and saw that the function was being inlined from opt level 3. Also realized that the 'O4' level does not exist in gcc ( I think i 'ported' it from
use of IRIX cc), so just O2 is right.
Anyway, you can compile somehing with -O9751, and gcc says nothing. If max opt level
is 3, any higher level should trig a warning at least...
Signature · 7 lines
Juan Antonio Magallon Lacarta #> cd /pub mailto:[email protected] #> more beer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/