/homeparams (Copy Register Parameters to Stack)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

/homeparams (Copy Register Parameters to Stack)

Forces parameters passed in registers to be written to their locations on the stack upon function entry.


This compiler option is only for the x64 compilers (native and cross compile).

When parameters are passed in an x64 compilation, calling conventions require stackspace for parameters, even for parameters passed in registers. For more information, see Parameter Passing. However, by default in a release build, the register parameters will not be written to the stack, into the space that is already provided for the parameters. This makes it difficult to debug an optimized (release) build of your program.

For a release build, use /homeparams to ensure that you can debug your application. /homeparams does imply a performance disadvantage, because it does require a cycle to load the register parameters on to the stack.

In a debug build, the stack is always populated with parameters passed in registers.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Command Line property page.

  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

© 2015 Microsoft