x86 Assembly Language Reference Manual

Move With Sign Extend (movsx)

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

SignExtend(SRC) -> DEST


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.

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