Exetools  

Go Back   Exetools > General > x64 OS

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2013, 22:59
mcp mcp is offline
Friend
 
Join Date: Dec 2011
Posts: 73
Rept. Given: 4
Rept. Rcvd 12 Times in 11 Posts
Thanks Given: 7
Thanks Rcvd at 47 Times in 35 Posts
mcp Reputation: 12
Nearly all of your points are completely wrong.
1) The space is not reserved for register spill, in fact there is no constraint on what the callee is supposed to do with that stack space: there is no reserved purpose for that area.
2) Since the callee can always rely on the existence of that area, he is free to use it for whatever he wants (if e.g. the optimizer decides to do so). That contradicts your "won't be used" claim.
3) It is not compiler dependent, all compilers for x64 on windows have to adhere to these conventions (at least when they interface with other compiler generated code or the OS API).
4) The size of the space is not fixed at all. To the contrary: the space depends on the number of parameters passed to the callee.

MSDN documentation

Quote:
It contains at least four entries, but always enough space to hold all the parameters needed by any function that may be called. Note that space is always allocated for the register parameters, even if the parameters themselves are never homed to the stack; a callee is guaranteed that space has been allocated for all its parameters
Reply With Quote
The Following User Says Thank You to mcp For This Useful Post:
Indigo (07-19-2019)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling any function dynamically without typedef Succubus Source Code 0 10-21-2021 16:34
Calling function from a class AdamD General Discussion 0 02-17-2005 22:59
how do you stop a program from calling home? sb1855 General Discussion 4 03-29-2003 04:40
Softice - how do I return to calling code? sync General Discussion 16 08-22-2002 20:02


All times are GMT +8. The time now is 16:35.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )