Tssk. Be /very/ careful when assuming bugs in gcc: I find it very
satisfactory, and most bugs aren't in gcc but in the person who thinks
they are. (Well, there is one known bug in the linux-gcc, but that's
No, 12(%esp) is correct. You are forgetting the return address: there
are three longs on the stack before the push: %eax, %ebx and the return
address. Thus the offset 12 is correct. The fact that the resulting
code actually works should have made you cautious. Not using the frame
pointer makes for code that is a bit harder to follow, but on a 386
where the registers are few anyway, I hate to leave one register
practically unused for no good reason.
Linus