← Thursday, October 1, 2026Performance & OSDeep dive

Windows uses a three-instruction trampoline for AArch64 hot-patching

devblogs.microsoft.com by Raymond Chen Editor score 7/10

Windows reserves 12 bytes before each AArch64 function for a three-instruction trampoline, then redirects the function entry with a branch. The fixed-length instruction set simplifies safe patch-point design.

What
• Windows on AArch64 reserves a 12-byte patch space before each function for hot-patching.
How
• A three-instruction trampoline branches from the function entry point to the patch space, then redirects execution to the replacement.
Why it matters
• Fixed-length AArch64 instructions keep the instruction pointer on 4-byte boundaries, allowing atomic instruction updates without risk of landing mid-instruction.
branch redirect function entrypoint patch space replacement
The function entry point branches to a three-instruction patch-space trampoline that redirects to the replacement. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.