Intel 253666-024US Manuel D’Utilisation

Page de 760
Vol. 2A 3-685
INSTRUCTION SET REFERENCE, A-M
MOVSX/MOVSXD—Move with Sign-Extension
MOVSX/MOVSXD—Move with Sign-Extension
Description
Copies the contents of the source operand (register or memory location) to the desti-
nation operand (register) and sign extends the value to 16 or 32 bits (see Figure 7-6 
in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1). 
The size of the converted value depends on the operand-size attribute.
In 64-bit mode, the instruction’s default operation size is 32 bits. Use of the REX.R 
prefix permits access to additional registers (R8-R15). Use of the REX.W prefix 
promotes operation to 64 bits. See the summary chart at the beginning of this 
section for encoding data and limits.
Operation
DEST ← SignExtend(SRC);
Flags Affected
None.
Opcode
Instruction
64-Bit 
Mode
Compat/
Leg Mode
Description
0F BE /r
MOVSX r16, r/m8
Valid
Valid
Move byte to word with sign-
extension.
0F BE /r
MOVSX r32, r/m8
Valid
Valid
Move byte to doubleword 
with sign-extension.
REX + 0F BE /r
MOVSX r64, r/m8*
Valid
N.E.
Move byte to quadword with 
sign-extension.
0F BF /r
MOVSX r32, r/m16
Valid
Valid
Move word to doubleword, 
with sign-extension.
REX.W + 0F BF /r
MOVSX r64, r/m16
Valid 
N.E.
Move word to quadword with 
sign-extension.
REX.W** + 63 /r
MOVSXD r64, r/m32 Valid 
N.E.
Move doubleword to 
quadword with sign-
extension.
NOTES:
* In 64-bit mode, r/m8 can not be encoded to access the following byte registers if a REX prefix is 
used: AH, BH, CH, DH.
** The use of MOVSXD without REX.W in 64-bit mode is discouraged, Regular MOV should be used 
instead of using MOVSXD without REX.W.