Intel x86 Insturction Set Architecture - 5
[Shift and rotate] [Shift and Rotate Instructions] 리버싱을 하다보면, 이런 명령어를 만나게된다. 더보기 SHL, SHR, SAL, SAR ROL, ROR, RCL, RCR SHLD, SHRD 일단, Logical shift와 arithmetic shift를 비교해보자. Logical shift는 부호 비트가 보존되지않으며, 새로운 비트를 0으로 채운다. arithmetic shift는 새로운 비트를 sign bit(부호비트)의 복사본으로 채운다. [SHL SHR] SHL 명령어는 destination operand를 source operand만큼 왼쪽으로 shift시킨다. (SHL destination, source) 그리고 하단 비트는 0으로 채운다. SHL이 ..
2019. 11. 17.