# `sysexit`

[x86-64 Documentation](https://asm-editor.specy.app/documentation/x86.md) › [Instructions](https://asm-editor.specy.app/documentation/x86/instruction.md)

Web page: https://asm-editor.specy.app/documentation/x86/instruction/sysexit

**Fast return from system call** · Privileged

Category: System

Executes a fast return to privilege level 3 user code.

Pentium II and later

[Intel's reference: SYSEXIT](https://intel.github.io/SDM/instruction/SYSEXIT.html)

## Flags

| Flag | Effect |
| --- | --- |
| CF | not changed |
| PF | not changed |
| AF | not changed |
| ZF | not changed |
| SF | not changed |
| DF | not changed |
| OF | not changed |

## Forms

- `sysexit`

## Description

Only kernel code may run it. The plain form returns to 32-bit code: the instruction pointer comes from `edx` and the stack pointer from `ecx`, and the user code and stack selectors are `IA32_SYSENTER_CS` plus 16 and plus 24. With the 64-bit operand size (`o64 sysexit`) it returns to 64-bit code instead, taking `rip` from all of `rdx` and `rsp` from all of `rcx`, with the selectors at plus 32 and plus 40.
