Raymond Chen1 min readadvanced
Windows on Itanium also provided for hot-patching, in an even simpler way
Summary
Windows hot-patching on Itanium involved overwriting the first instruction bundle with a `nop` and a `brl.cond.sptk target64` instruction. This was simpler than x86 due to Itanium's fixed-size instruction bundles and a direct 64-bit long branch instruction.
- Itanium used fixed-size instruction bundles, each encoding three instructions.
- Hot-patching on Itanium overwrites the first bundle with `nop` and a double-wide `brl.cond.sptk target64`.
- The `brl` instruction directly accepts a 64-bit target, simplifying the jump.
- Indirect jumps require moving the target to a branch register, not a general-purpose register.
Low-level systems engineers and those interested in historical CPU architectures will find this a specific explanation of how hot-patching was implemented on Itanium, contrasting it with other architectures.
7/10