3.16 Directive INVOKE in Win64
The 64-bit version of Masm doesn't support INVOKE anymore. JWasm still
does, but please be aware of some restrictions:
- - in theory, using INVOKE requires the FRAME attribute for PROC. It will
work without FRAME, but Win64 SEH won't be happy with it then.
- - the default implementation in 64-bit is very simple: for each INVOKE register
RSP is reduced by the space required for the arguments, then the call
is issued and finally register RSP is restored. To enable a more efficient code
generation see OPTION WIN64, INVOKE Stack Space Reservation - this
option is not active as default because it virtually requires a certain programming style.
- - there is no additional check that the stack is aligned to 16 byte. The
PROC's FRAME attribute ensures that the stack is correctly aligned after
the prologue is done. However, it's the programmers responsibility that
the stack is still aligned when the code generated by INVOKE starts.