x86 flags after bit shifts with count = 0 (Developers)
I needed to know what happens to the x86 flags after executing bit shift instructions (SHR, SHL, etc.) when the shift count given in CL is zero. Unfortunately, virtually all my books and electronic documentation only describe the cases CL = 1 and CL > 1. But I found that:
Intel(R) 64 and IA-32 Architectures Software Developer Manual, Vol. 2B: Instruction Set Reference on page 4-364 says that all flags remain unchanged if the shift count (CL mod 32) is zero.
Am186(TM) and Am188(TM) Family Instruction Set Manual says the same on page 252 and others.
Randall Hyde's The art of assembly language in page 29 of Chapter 6 also says the same.
So I guess I can assume this is true for all x86 processors... Anyone with original 8088/8086 manuals?
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