millimoose
millimoose

Reputation: 39950

"suffix or operands invalid for 'shr'"

I'm trying to get rid of the lower bits (before doing a popcnt) in a register, but can't seem to get the syntax for the instruction right. I want to clear the lower %rdx bits from the value in %r8d. Searching told me the count argument should be an 8-bit register, so I'm currently at:

shrl %dl, %r8d

GAS complains about this, and I've really no clue what exactly the arguments should be if those are wrong.

Upvotes: 0

Views: 873

Answers (1)

Shmil The Cat
Shmil The Cat

Reputation: 4669

According intel PRM, you should use %cl instead of %dl

Upvotes: 1

Related Questions