RE: [AD] improvements on alpha blending... |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> No, shifts doesn't do anything with portability... *any* ISO (ANSI) C
> compiler translates shifts into legal assembly code. in other words if you
> compile C code containing shifts to a target platform where the processor
> doesn't support bit-shifts, the resulting assembly code will contain a
> division or multiplication instead of a shift.
I think the original poster meant whether the new bit (most significant
bit in a right shift) would get zeroed (as would happen if the number
was positive (in a 2s complement encoding) or set to 1 (thus preserving
the original number's signedness).
This is a valid concern (see the difference between shl/shr and sar/sal).
--
Lyrian