Dear GCC Developers, I am working on a target backend for the DLX architecture and I have a question concerning the layout of the stack frame. Here is a simple test C-program:
---snip--- int main(void) { int a = 1; int b = 2; int c = a + b; return c; } ---snap--- The initialisation of the variables a and b produce the following output: ---snip--- movl $1, -24(%ebp) movl $2, -20(%ebp) ---snap--- Although I have declared "STACK_GROWS_DOWNWARD" the variables a and b are lying upwards in memory (-24 < -20). Shouldn't it be the other way around because the stack should grow downwards towards smaller addresses. I think it should be like this: ---snip--- movl $1, -20(%ebp) movl $2, -24(%ebp) ---snap--- Please let me know whether I missunderstood something completely. If this behaviour is correct what can I do to change it to the other way around. Which macro variable do I have to change? Thanks in advance, Markus Franke