Preventing gcc from aligning stack???
David Weinehall
tao en acc.umu.se
Mie Ene 26 01:37:57 CST 2000
On Tue, 25 Jan 2000, Jamie Lokier wrote:
> Tuukka Toivonen wrote:
> > > Yes it is. New gcc's (try to) keep the stack aligned at 16 bytes. The
> > > kernel stack is 8Kb on ia32; the 16byte alignment is mostly for floating
> > > point performance on Pentium and up, and floating point is forbidden in the
> >
> > I'd like to ask, why? Even double is only 8 bytes. Does this mean that 12
> > bytes is wasted each argumentless call and -fno-omit-frame-pointer, for
> > saving ebp?
>
> Yes. And gcc does tend to emit redundant stack alignment instructions
> too (though this is being improved).
>
> So turning off stack alignment reduces stack usage _and_ reduces the
> code size.
Oh, talking about alignment, how about anyone familiar with the inner
workings of gcc (2.7.2.3 in this case) tell me why I get this warning for
all newer v2.3.xx kernels:
sched.c:77: warning: alignment of `aligned_data' is greater than maximum
object file alignment
socket.c:182: warning: alignment of `sockets_in_use' is greater than
maximum object file alignment
irq.c:75: warning: alignment of `irq_desc' is greater than maximum object
file alignment
init_task.c:33: warning: alignment of `init_tss' is greater than maximum
object file alignment
Even if everything works fine, I *HATE* warnings.
/David Weinehall
_ _
// David Weinehall <tao en acc.umu.se> /> Northern lights wander \\
// Project MCA Linux hacker // Dance across the winter sky //
\> http://www.acc.umu.se/~tao/ </ Full colour fire </
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda