Controlling the Emulation — Intel® SDE documentation

# Controlling the Emulation

Intel® SDE is emulating the instructions that are not supported by the host CPU or instructions that behave differently on the emulated CPU than on the host CPU, for example CPUID or XSAVE instructions.

This means that if the instruction is supported by the host, then in most cases the native instruction will be executed.

There are certain cases where the user would like to control the way Intel® SDE emulate the instructions. For example, tell Intel® SDE to use slower but more accurate emulation (this is available for the emulation of FP16 instructions), to compare between the emulation and the native behavior, or to force certain behavior.

Here is a list of options to control the emulation:

`-emit_illegal_insts`

  Emit information about illegal instructions [default 1]

`-emit_ud_insts`

  Raise illegal exception for UD instructions [default 1]

`-fma_style`

  Control the way FMA is emulated, precise: precise emulation, sloppy: sloppy emulation (fast but less accurate), native: native FMA (only when supported by the host, available on HSW and beyond) [default native]

`-fp16_fast`

  Use fast FP16 emulation (accurate calculation, less accurate update of MXCSR) [default 1]

`-pause_delay`

  Insert delay (milliseconds) when executing the pause instruction [default 0]

`-raise_int3`

  Raise breakpoint signal/exception on int3 [default 0]

`-sde_skip_int3`

  Skip (i.e ignore) INT3 instructions [default 0]

`-emu_fast`

  Emulate Intel AVX-512 instructions with Intel AVX instructions [default 1]

`-emu_fast_amx`

  Emulate Intel AMX instructions with Intel AVX-512 [default 1]

`-emu_trap`

  Emulates the effects of the TF flag (only when set by popf) [default 0]

`-force_emulate`

  Force emulation of specified chip instructions. Can be used multiple times. Use option ‘list’ for list of valid chips for this knob.

`-xsave_by_host`

  Enable XSAVE if supported by the host, use only when emulated CPU does not support XSAVE and XSAVE instructions might exists in the system libraries [default 0]

`-xsave_default`

  Default value for the XCR0 register. Dynamic indicates that the emulator determines the XCR0 value based on configured features [default dynamic]

`-emu_xinuse`

  Emulate XINUSE for more accurate XSAVE emulation [default 1]

`-emu_xinuse_fast`

  Faster emulation of XINUSE assume XMMs are always used [default 1]

Additional Emulation Control:

- CPUID Emulation
- Control Flow Enforcement Technology
- Running Applications with TSX