Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: how to savely mimik .pushnv and .savenv



Permlink Replies: 1 - Last Post: Jul 13, 2014 7:25 AM Last Post By: Michael Rabatsc...
Michael Rabatsc...

Posts: 125
Registered: 1/22/07
how to savely mimik .pushnv and .savenv
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2014 12:58 AM
Hi

I wanted to move my library - which contains a lot of x86 and x64
assembler - on to FPC. X86 was quite straight forward but x64 has
a few glitches - the delphi assembler defines the pseudo-op codes
.pushnv and .savenv which do not have any equivalent in the
FPC world. How can I savely mimik these pseudo instructions
("the oracel at delphi" warns in his fun-facts article
that the stack could be damaged if not using these functions...)?

I had the idea to define local variables and "mimik" the stack
in that regards (instead of using push and pop using mov and movapd).

kind regards
Mike
Michael Rabatsc...

Posts: 125
Registered: 1/22/07
Re: how to savely mimik .pushnv and .savenv
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 13, 2014 7:25 AM   in response to: Michael Rabatsc... in response to: Michael Rabatsc...
Am 23.06.2014 09:58, schrieb Michael Rabatscher:
Hi

I wanted to move my library - which contains a lot of x86 and x64
assembler - on to FPC. X86 was quite straight forward but x64 has
a few glitches - the delphi assembler defines the pseudo-op codes
.pushnv and .savenv which do not have any equivalent in the
FPC world. How can I savely mimik these pseudo instructions
("the oracel at delphi" warns in his fun-facts article
that the stack could be damaged if not using these functions...)?

I had the idea to define local variables and "mimik" the stack
in that regards (instead of using push and pop using mov and movapd).

I fixed this issue by declaring local variables.

kind regards
Mike

kind regards
Mike
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02