Support 16 bit platforms

This commit is contained in:
Manish Goregaokar 2017-12-13 10:40:11 -06:00
parent f8f28886e0
commit 1d818a4d8c

View File

@ -33,6 +33,12 @@ fn contains_zero_byte(x: usize) -> bool {
x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0
}
#[cfg(target_pointer_width = "16")]
#[inline]
fn repeat_byte(b: u8) -> usize {
(b as usize) << 8 | b as usize
}
#[cfg(target_pointer_width = "32")]
#[inline]
fn repeat_byte(b: u8) -> usize {