Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Interesting effect when using a stack frame in 64 bit MASM.

Started by hutch--, July 24, 2018, 10:57:06 AM

Previous topic - Next topic


With 64 bit MASM, if you use a normal argument list in a procedure with 4 or less arguments, MASM will write the data to shadow space but if you write the procedure with a stack frame but no argument list, you do not get the shadow space overhead. It means you must write the code so that the registers used to pass the first 4 arguments are in the right place in the source code but it means you can bypass the shadow space overhead if you need to.

Without the shadow space overhead, the overhead calling the procedure is reasonably low,

enter etc ...
sub rsp, whatever

; user code here