x86 flags after bit shifts with count = 0 (Developers)
> Not that I needed to know this certain behaviour of shift instructions
> yet, but knowing such details often helps.
Indeed. Knowing precisely the processor's state helps to make code simpler. In this particular case I avoid treating the cases CL = 0 and CL > 0 separately and save a conditional jump.
Complete thread:
- x86 flags after bit shifts with count = 0 - mht, 22.11.2008, 15:15 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- x86 flags after bit shifts with count = 0 - Rugxulo, 25.11.2008, 06:47
- x86 flags after bit shifts with count = 0 - ecm, 25.11.2008, 13:31
- x86 flags after bit shifts with count = 0 - mht, 25.11.2008, 22:11
- x86 flags after bit shifts with count = 0 - rr, 25.11.2008, 21:21
- x86 flags after bit shifts with count = 0 - mht, 25.11.2008, 21:59
- x86 flags after bit shifts with count = 0 - rr, 25.11.2008, 22:10
- x86 flags after bit shifts with count = 0 - mht, 28.11.2008, 07:17
- x86 flags after bit shifts with count = 0 - mht, 05.12.2008, 08:55
- x86 flags after bit shifts with count = 0 - mht, 28.11.2008, 07:17
- x86 flags after bit shifts with count = 0 - rr, 25.11.2008, 22:10
- x86 flags after bit shifts with count = 0 - RayeR, 25.11.2008, 22:22
- x86 flags after bit shifts with count = 0 - rr, 26.11.2008, 20:57
- x86 flags after bit shifts with count = 0 - Rugxulo, 28.11.2008, 00:09
- x86 flags after bit shifts with count = 0 - marcov, 28.11.2008, 15:41
- x86 flags after bit shifts with count = 0 - rr, 30.11.2008, 18:33
- x86 flags after bit shifts with count = 0 - Rugxulo, 30.11.2008, 20:53
- portable handhelds' battery life - Rugxulo, 30.11.2008, 21:06
- x86 flags after bit shifts with count = 0 - rr, 30.11.2008, 22:38
- x86 flags after bit shifts with count = 0 - RayeR, 30.11.2008, 22:41
- x86 flags after bit shifts with count = 0 - Rugxulo, 30.11.2008, 20:53
- x86 flags after bit shifts with count = 0 - Rugxulo, 28.11.2008, 00:09
- x86 flags after bit shifts with count = 0 - rr, 26.11.2008, 20:57
- x86 flags after bit shifts with count = 0 - mht, 25.11.2008, 21:59
- x86 flags after bit shifts with count = 0 - ecm, 25.11.2008, 13:31
- x86 flags after bit shifts with count = 0 - Rugxulo, 25.11.2008, 06:47
Mix view