IA-32 Assembly Language Reference Manual

Move With Sign Extend (movsx)

movsx{wl}		r/m8, reg[16|32]
movsxwl		r/m16, reg32
Operation

SignExtend(SRC) -> DEST

Description

movsx reads the contents of the register or effective address as a word or byte. movsx then sign-extends the 16- or 32-bit value to the operand-size attribute of the instruction. The result is stored in the destination register by movsx.

Example
movsxbl 1(%esi), %edx
 movsxwl 5(%ebx), %edx