3.9 Directive OPTION WIN64
Directive OPTION WIN64 allows to set parameters for the Win64 output
format if this format (see -win64 cmdline option) is selected. For other output formats,
this option has no effect. The syntax for the directive is:
- OPTION WIN64: switches
- accepted values for switches are:
- Store Register Arguments [ bit 0 ]:
- - 0: the "home locations" (also sometimes called
"shadow space") of the first 4 register parameters are
uninitialized. This is the default setting.
- - 1: register contents of the PROC's first 4 parameters (RCX, RDX,
R8 and R9 ) will be copied to the "home locations" within
a PROC's prologue.
- INVOKE Stack Space Reservation [bit 1]:
- - 0: for each INVOKE the stack is adjusted to reserve
space for the parameters required for the call. After the
call, the space is released again. This is the default setting.
- - 1: the maximum stack space required by all INVOKEs inside
a procedure is computed by the assembler and reserved once
on the procedure's entry. It's released when the procedure is exited.
If INVOKEs are to be used outside of procedures, the stack space has to be
reserved manually!
Note: an assembly time variable, @ReservedStack, is created internally
when this option is set. It will reflect the value computed by the assembler.
It should also be mentioned that when this option is on, and a procedure contains
no INVOKEs at all, then nevertheless the minimal amount of 4*8 bytes is
reserved on the stack.
Warning: You should have understood exactly what this
option does BEFORE you're using it. Using PUSH/POP instruction pairs to "save" values
across an INVOKE is VERBOTEN if this option is on.
- 16-byte Alignment for Local Stack Variables [bit 2]:
- 0: standard 8-byte alignment for local variables.
- 1: 16-byte alignment for local variables. This setting is useful if you
want to load or store XMM registers with instructions that expect aligned
memory references ( i.e. MOVAPS ). Note that variables with size < 16
are not affected.