I have been trying to figure out exactly what is happening with these instructions and can't make sense of them. I can see that the PSHUFLW instruction acts upon the first 16 bytes of the XMM register but can not figure it out. I have read the decription in the Intel® Architecture Instruction Set Extensions Programming Reference but just can't seem to get it. I am a very visual person so any help would be greatly appreciated. I have run some tests using the code
xxm0 = 00000000000000000000000000003E2D
PSHUFLW xmm0, xmm0, N
and have the following results
N = 0, output = 00000000000000003E2D3E2D3E2D3E2D
N = 1, output = 00000000000000003E2D3E2D3E2D0000
N = 2, output = 00000000000000003E2D3E2D3E2D0000
N = 3, output = 00000000000000003E2D3E2D3E2D0000
N = 4, output = 00000000000000003E2D3E2D00003E2D
N = 5, output = 00000000000000003E2D3E2D00000000
N = 6, output = 00000000000000003E2D3E2D00000000
N = 7, output = 00000000000000003E2D3E2D00000000
N = 8, output = 00000000000000003E2D3E2D00003E2D
N = 9, output = 00000000000000003E2D3E2D00000000
N = 10, output = 00000000000000003E2D00003E2D3E2D
N = 11, output = 00000000000000003E2D00003E2D0000
N = 12, output = 00000000000000003E2D00003E2D0000
N = 13, output = 00000000000000003E2D00003E2D0000
N = 14, output = 00000000000000003E2D000000003E2D
N = 15, output = 00000000000000003E2D000000000000
N = 16, output = 00000000000000003E2D000000000000
N = 17, output = 00000000000000003E2D000000000000
N = 18, output = 00000000000000003E2D000000003E2D
N = 19, output = 00000000000000003E2D000000000000
N = 20, output = 00000000000000003E2D00003E2D3E2D
I would like to know how these instructions work, and maybe a visual guide on future instructions similar to this. I have only been reversing for a couple of weeks so I am very fresh. Thanks for any help you can provide.