# Shufps instruction, there is a better way to display #1937

Open
opened this Issue Apr 25, 2018 · 4 comments

Projects
None yet
4 participants

### flarejune commented Apr 25, 2018 • edited

 the Shufps instruction, there is a better way to display: for example: Shufps xmm0, xmm1,0x4E can be displayed as: Shufps xmm0, xmm1,1032 For example, the above 0x4E, the binary is 01001110, divided into 2 groups are represented as: 01 (1) 00 (0) 11 (3) 10 (2) After representing the Shuf, the numerical exchange position of the XMM register. The final results: xmm1[1] - > xmm0[3] xmm1[0] - > xmm0[2] xmm0[3] - > xmm0[1] xmm0[2] - > xmm0[0] Code for calculation: v = 0x4E; v1 = v & 0x3; v2 = (v & 0xC) >> 2; v3 = (v & 0x30) >> 4; v4 = (v & 0xC0) >> 6; Result:{v4}{v3}{v2}{v1} = 1032

### flarejune commented Apr 25, 2018

 string to shufps imm: s = "1032"; imm = s[3] - '0' | (s[2] - '0') << 2 | (s[1] - '0') << 4 | (s[0] - '0') << 6;
Member

### torusrxxx commented Apr 25, 2018

 Doing this would also mean assemblers should support such notation. However, this is not the case. So, this feature is probably not suitable for x64dbg.

### flarejune commented Apr 25, 2018

 When inputting the instruction "shufps" to the assembly, If the "imm" string length is 4, need string conversion processing The default length is 1 (does not contain "0x"),Can clearly distinguish

### IssuehuntBot commented Jul 23, 2018

 @0maxxam0 funded this issue with \$6. Visit this issue on Issuehunt