Re: 4k stacks in 2.6

Jörn Engel
2004-06-01T05:25:39Z

On Thu, 27 May 2004 17:34:26 +0200, Arjan van de Ven wrote:
>
> you can write "add 100,%esp" as "sub -100, %esp" :)
> compilers seem to do that at times, probably some cpu model inside the
> compiler decides the later is better code in some cases :)

That and even worse things. sys_sendfile has a "sub $0x10,%esp"
followed by an "add $0x20,%esp". Can you explain that one as well?
0x20 is the size of all automatic variables on i386.

I have no idea what kind of trick gcc is playing there, but it appears
to work which makes me only more curious.

Jörn

--
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra