在我的程序中,我将一些值压入堆栈
for (i=0;i<i2;i++)
{
_asm
{
mov eax,i // i here is an (int)
push eax
}
}
然后当我完成后,我会像这样恢复堆栈:
for (i=0;i<i2;i++)
{
_asm
{
pop eax // eax in not used later
}
}
工作正常,但可能会浪费周期。 像这样恢复堆栈可以吗:
i=i2*sizeof(int);
_asm
{
add sp,i
}
最佳答案
关于我可以通过 add sp 等恢复堆栈吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18610512/