Extensions
Forms
2 (2 Legacy)
Data
Intel XED v2026.08.23

SYSCALL, without FRED, does this in one step:

  1. saves the address of the next instruction in RCX and RFLAGS in R11;
  2. clears the flags that are set in the IA32_FMASK MSR, such as IF, so that the kernel starts with interrupts off;
  3. loads CS and SS with selectors from bits 47:32 of IA32_STAR, with fixed descriptor contents for a flat 64-bit code segment at privilege level 0;
  4. jumps to the address in IA32_LSTAR.

It does not change RSP. The kernel’s entry code usually executes SWAPGS to reach per-CPU data, switches to a kernel stack and saves the user registers. RCX and R11 are lost to the caller, which is why the Linux convention passes the fourth argument in R10 instead of RCX (see the system call conventions).

SYSRET reverses it: RIP from RCX, RFLAGS from R11, and CS and SS from bits 63:48 of IA32_STAR, to 64-bit code with REX.W or to 32-bit compatibility mode without. It does not restore RSP either. In Intel’s manual it raises a general-protection fault, still at privilege level 0, if RCX holds a non-canonical address, so a kernel that has already loaded the user’s stack pointer must prevent that or handle the fault on a stack of its own; AMD’s manual has no such check (see SYSRET).

SYSCALL works only when IA32_EFER.SCE is set; otherwise it raises #UD. With FRED enabled it delivers an event of its own type instead, and the kernel returns with ERETU.

Forms

Every encoding of SYSCALL that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
SYSCALL 64-bit mode only SYSCALL0F 05LM
SYSCALL not in 64-bit mode SYSCALL_AMD0F 05Base instruction set

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

Forms only in 64-bit mode
if not efer & 1:
    fault(UD)                    # EFER.SCE clear
if not canonical(lstar):
    fault(GP, 0)                 # Intel's, where 4-level paging
                                 # runs on a processor of 5 levels,
                                 # whose LSTAR takes 57 bits
rcx = rip                        # the next instruction
r11 = rflags & ~0x10000          # RF clear in AMD's manual; Intel's
                                 # copies RFLAGS as it is
f = rflags & ~fmask              # the flags SFMASK names cleared
cf = f & 1
pf = f >> 2 & 1
af = f >> 4 & 1
zf = f >> 6 & 1
sf = f >> 7 & 1
tf = f >> 8 & 1
if_ = f >> 9 & 1
df = f >> 10 & 1
of = f >> 11 & 1
iopl = f >> 12 & 3
nt = f >> 14 & 1
ac = f >> 18 & 1
vif = f >> 19 & 1
vip = f >> 20 & 1
id = f >> 21 & 1
rf = 0
vm = 0
s = star >> 32 & 0xFFFF          # STAR[47:32]
cs = s & 0xFFFC                  # 64-bit code of DPL 0: CPL 0
ss = s + 8                       # data of DPL 0
rip = lstar
# RSP stays: the kernel switches to its own stack

Not run on a processor: SYSCALL is a system call of the program that runs it, which the probe never makes.

Forms not in 64-bit mode
if not efer & 1:
    fault(UD)                    # EFER.SCE clear
s = star >> 32 & 0xFFFF          # STAR[47:32]
cs = s & 0xFFFC
ss = s + 8
if efer >> 10 & 1:               # compatibility mode (EFER.LMA)
    rcx = rip                    # into 64-bit mode, as above, at
    r11 = rflags & ~0x10000      # CSTAR's entry point
    f = rflags & ~fmask
    cf = f & 1
    pf = f >> 2 & 1
    af = f >> 4 & 1
    zf = f >> 6 & 1
    sf = f >> 7 & 1
    tf = f >> 8 & 1
    if_ = f >> 9 & 1
    df = f >> 10 & 1
    of = f >> 11 & 1
    iopl = f >> 12 & 3
    nt = f >> 14 & 1
    ac = f >> 18 & 1
    vif = f >> 19 & 1
    vip = f >> 20 & 1
    id = f >> 21 & 1
    rf = 0
    vm = 0
    rip = cstar
else:                            # legacy mode: 32-bit code
    ecx = rip
    if_ = 0
    rf = 0
    vm = 0
    rip = star & 0xFFFFFFFF      # STAR[31:0]
# Intel's processors raise #UD outside 64-bit mode

Not run on a processor: this SYSCALL exists outside 64-bit mode only, where the probe does not run, and is a system call of the program that runs it.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
SYSCALL 64-bit mode only
RIPimplicitwrite
RCXimplicitwrite
R11implicitwrite
RFLAGSimplicitwrite
SYSCALL not in 64-bit mode
rIPimplicitwrite
RFLAGSimplicitwrite

Flags

M modified, 0 cleared; blank: not affected. How to read.
OFSFZFAFPFCFDFIFTFACIOPLNTRFVMVIFVIPID
All forms
MMMMMMMMMMMM00MMM

Attributes

What else XED records about the forms. How to read.

Forms only in 64-bit mode
may abort a TSX transaction

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
LONGMODE

LM
CPUID.80000001H:EDX[29] LM

Every x86-64 processor in XED’s model and Zen 3 to Zen 6
AMD

No CPUID bit: part of the base instruction set.

K10 (Family 10h), Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6

More SYSCALL/SYSRET instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-699 (SYSCALL)
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  5. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.36, March 2024), Wayback Machine copy of AMD's PDF

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The text is our own.