From: Tim Roberts on
CoolSun20 <CoolSun20(a)discussions.microsoft.com> wrote:
>
>Understanding and working with some legacy code, so was just following the
>logic of saving and restoring EBP upon module load and exit.

But you need to UNDERSTAND the code before you can hope to port it. WHY
are they dinking with the frame pointer? The compiler is perfectly able to
manage the frame pointer on its own.

>Ignoring the
>fact of x64 frame pointer store location under x86 is it possible to replace
>that push EBP and Pop EBP with some intrinsics..

No. There are many instrinsics, but certainly none for push and pop
instructions. Stack management on x64 is quite different from x86.

>Considering am newbie to x64 development, what does x64 compiler use as
>frame pointer then. or if you please point me to good reads on this topics
>would be appreciated.

Typically, the basic stack pointer (rsp) is used as a frame pointer. You
don't find push and pop instructions in x64 code very often.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.