Copies a 32 bit source into a 64 bit register, sign extending it. This is the instruction to reach for when a signed 32 bit value has to become a 64 bit one, because the ordinary mov eax, ... zero extends instead: writing any 32 bit register clears the top half of its 64 bit name.
movsxd
x86-64 and laterMove Doubleword to Quadword with Sign-Extension
movsxd rax, eax | movsxd reg16, r/m32 | movsxd reg32, r/m32 | movsxd reg64, r/m32Loading...
Forms
Every form of movsxd the assembler accepts, from NASM's own instruction table.
The second column is the processor that introduced the form; a badge marks a form that needs
an extension, that is lockable, or that long mode dropped.
| Form | Since | Notes |
|---|---|---|
| movsxd rax, eax | x86-64 | long |
| movsxd reg16, r/m32 | x86-64 | long |
| movsxd reg32, r/m32 | x86-64 | long |
| movsxd reg64, r/m32 | x86-64 | long |