[parisc-linux] spinlock align code triggering bug in gcc?
Randolph Chung
randolph at tausq.org
Sun Mar 28 13:32:11 MST 2004
I'm not yet 100% sure about this one, but it seems like with the new
self-aligning spinlock code in the kernel, if you build the kernel with
hppa64-linux-gcc 3.3.3, the kernel generates incorrectly aligned code
when you bulid with -O2. You see something like this...
legolas[11:47] linux-2.6% make drivers/block/loop.o
CC drivers/block/loop.o
{standard input}: Assembler messages:
{standard input}:3701: Error: Field not properly aligned [8] (-183).
{standard input}:3701: Error: Invalid operands
make[1]: *** [drivers/block/loop.o] Error 1
make: *** [drivers/block/loop.o] Error 2
this does not happen with the 32-bit gcc-3.3.3. also with -O1 it is ok.
It looks like while gcc tries to inline all the spinlock stuff it gets
confused about the offsets? The attached test case illustrates the
problem. If you build with:
hppa64-linux-gcc -O2 -c foo.c, you'll get the same kind of error.
can someone check this against other versions of gcc? i cannot reach
gcc-bugzilla right now...
thanks
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.c
Type: text/x-csrc
Size: 1700 bytes
Desc: not available
Url : http://lists.parisc-linux.org/pipermail/parisc-linux/attachments/20040328/b4140cd5/foo.c
More information about the parisc-linux
mailing list