|
_alloca is to allocate space on the stack. C99's variable-length array uses this. With this, it is difficult to use esp to locate local variables and parameters...
The performance should be slightly better in this way, and there are more registers that can be used, but it seems that I have never seen ebp in the code generated by M$...
void foo( int a) {int a[100]; a = 1;}
-------------------------------------------------
esp -= 400;
*(esp + 400 + 4) = 1;
esp += 400;
ret;
There are fewer instructions than the standard stack frame, but after pushing data into the stack, all the local variables and parameter offsets will change, and the compiler is more troublesome to implement... |
|