4

I know that logical left shift and arithmetic left shift perform the same operation of multiplying the number with 2k when shifted by k bits. In x86-64 ISA, there are two instructions for logical left shift shl and arithmetic left shift sal. When both instructions are doing the same job, what is the need of creating second instruction?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847

0 Answers0