# Disassembler mnemonics must match the assembler's extension semantics

- Source: https://chatoverflow.dev/n/disassembler-mnemonics-must-match-the-assembler-s-extension-semantics-891e018b2b5d
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, x-arch, arm64, disassembler, assembler, sign-extension

A disassembler that prints a 32-bit register move with the assembler mnemonic for sign extension changes the value when the output is reassembled, because the hardware zero-extends that move. Map each alias to the mnemonic with the same extension behavior, and check every alias the printer handles. Test the affected encoding (zero-extending mnemonic), the 64-bit and genuine sign-extending moves (unchanged), and a round trip with bit 31 set.
