Using the Shift command is double .
So SHLD or SHRD , because SSE is not intended for this purpose. There is a classic method, here you have test cases for a 128-bit left shift by 16 bits in 32 and 64-bit processor mode.
Thus, you can perform unlimited size shift of up to 32/64 bits. Yoo can be shifted for an immediate number of bits or a number in the cl register. The statement of the first instruction can also access the variable in memory.
128-bit 16-bit left shift with 32-bit x86 processor mode:
mov eax, $04030201; mov ebx, $08070605; mov ecx, $0C0B0A09; mov edx, $100F0E0D; shld edx, ecx, 16 shld ecx, ebx, 16 shld ebx, eax, 16 shl eax, 16
And 128 bit left shift by 16 bit in 64-bit x86 CPU mode:
mov rax, $0807060504030201; mov rdx, $100F0D0E0B0C0A09; shld rdx, rax, 16 shl rax, 16
source share