Let's say that I want to put two 32-bit registers EAX as the low-order 32-bit word and EDX as the 32-bit word in RAX. I found one way:
shl rdx, 32 or rax, rdx
This method only works if we are sure that bits 32 to 61 of RAX are 0. If we do not avoid this, we must first clear the high 32-bit word, for example:
mov eax, eax
Is this the shortest way?
Is there one asm x86-64 instruction that performs this operation?
source share