I was learning SSE-instructions and found a weird error with GNU's as assembler, when trying to copy a single byte from an xmm-register to al:
"Error: operand type mismatch for pextrb".
I think my syntax is right, it works perfectly fine with pextrd.
pextrd $3, %xmm0, %eax # Works perfectly fine
pextrb $3, %xmm0, %al # Error: operand type mismatch for 'pextrb'
Marc Glisse is right, it works when using eax instead of al. It is zero-extended, so eax actually contains only the one single byte. Thank you!
pextrb $3, %xmm0, %eax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With