Re: question on "SavedRegisters::save_registers()"

"Thiago Silva" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.strongtalk
Message-ID <[email protected]>
On 2/28/07, Dave Raymer <[email protected]> wrote:
> Folks,
>
> Maybe I'm missing something here, but I'm at a loss on the correct port for
> SavedRegisters::save_registers().  The existing Win32 code
> uses the MSC __declspec(naked) compiler directive to avoid the generation of
> prolog and epilog code for the method.  Last time I checked, the standard
> prolog code was "push ebp, mov ebp, esp" (using intel syntax).  The epilog
> code basically just undoes this establishment of the local stack frame.
> Now, the inline assembler in question does not effect ebp or esp.  So, I am
> wondering what the subtle magic is that I am missing ... why was this method
> declared "naked"?
>
> Any thoughts would be greatly appreciated.
>

I can only guess here, but I think it might be to not generate the
useless prolog/epilog as
removing the Naked declaration (and the "ret" instruction) seems to
work just as well.

-- 
Thiago Silva
Email: [email protected]
Jabber: [email protected]
Blog: http://sourcecraft.info/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Strongtalk-general" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en
-~----------~----~----~----~------~----~------~--~---
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.