The assembly code egcs emits from cc -S (with or without -O/-O2/-O3) seems
sane - it boils down to:
.L8:
movl %esi,%ebx
sall %cl,%ebx
jmp .L7
.align 4
.L9:
movl %esi,%ebx
sarl %cl,%ebx
So the 386 is doing something "interesting".
./shift r 0x7fffffff 34
shr 0x7fffffff, 0x22 -> 0x1fffffff
Neato.
Sean.