Hacker News new | ask | show | jobs
by loeg 526 days ago
SAL as well? (And anyway this example seems to be shifting by the low 8 bits of RCX (CL), not the full width register.)
2 comments

SAL and SHL are synonyms, they have the same encoding. SHL only accepts CL as the count register, there's no other form that takes a variable shift count
Ahh, thanks, I didn't make that connection.
Intel shifts anyway mask out higher bits of CL, this hurts sometimes e.g. when you need to shift by 1..64 bits