, , x86 c = (c << 7) >> 7
:
movzbl 31(%esp), %eax ;eax = c
sall $7, %eax ;left shift
sarl $7, %eax ;right shift
movb %al, 31(%esp) ;c = al (one byte)
c
32- (eax
), . , (.. al
) c
.
In short, both shifts are evaluated as if the operands were 32-bit.
source
share