© Jo Van Hoey 2019
J. Van HoeyBeginning x64 Assembly Programminghttps://doi.org/10.1007/978-1-4842-5076-1_33

33. Do the Shuffle!

Jo Van Hoey1 
(1)
Hamme, Belgium
 

With the unmasked string instructions, we have a few options. We can find a first or last occurrence of a character, but finding all occurrences is more challenging. We can compare strings and find a difference, but finding all differences is more complicated. Luckily, we also have string instructions that use masks, which makes them much more powerful. But before diving into mask instructions, we need to look at shuffling.

A First Look at Shuffling

Shuffling means moving around packed values. The moving can be within the same xmm register or from one xmm register to another xmm register, ...

Get Beginning x64 Assembly Programming: From Novice to AVX Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.