minix/lib/libarchive/minix_utils.c
2010-07-13 19:17:02 +00:00

15 lines
223 B
C

#include "minix_utils.h"
u64_t lshift64(u64_t x, unsigned short b)
{
u64_t r;
if(b >= 32) {
r.lo = 0;
r.hi = x.lo << (b - 32);
}else {
r.lo = x.lo << b;
r.hi = (x.lo >> (32 - b)) | (x.hi << b);
}
return r;
}