C++ builder中有没有与VC中的__LOCAL_SIZE相对应的预定义变量。
zhc 2002-08-20 11:42:24 __LOCAL_SIZE在VC中有编译器定义,其含义如下:
The compiler provides a symbol, __LOCAL_SIZE, for use in the inline assembler block of function prolog code. This symbol is used to allocate space for local variables on the stack frame in your custom prolog code.
The compiler determines the value of __LOCAL_SIZE. Its value is the total number of bytes of all user-defined locals as well as compiler-generated temporary variables. __LOCAL_SIZE can be used as an immediate operand; it cannot be used in an expression. You must not change or redefine the value of this symbol. For example:
mov eax, __LOCAL_SIZE ;Immediate operand
mov eax, [ebp - __LOCAL_SIZE] ;Expression
The following is a example of a naked function containing custom prolog and epilog sequences using the __LOCAL_SIZE symbol in the prolog sequence:
__declspec ( naked ) func()
{
int i;
int j;
_asm /* prolog */
{
push ebp
mov ebp, esp
sub esp, __LOCAL_SIZE
}
/* Function body */
__asm /* epilog */
{
mov esp, ebp
pop ebp
ret
}
}