qemu-e2k/util
Jose Ricardo Ziviani f539fbe337 host-utils: Implement unsigned quadword left/right shift and unit tests
Implements 128-bit left shift and right shift as well as their
testcases. By design, shift silently mods by 128, so the caller is
responsible to assert the shift range if necessary.

Left shift sets the overflow flag if any non-zero digit is shifted out.

Examples:
 ulshift(&low, &high, 250, &overflow);
 equivalent: n << 122

 urshift(&low, &high, -2);
 equivalent: n << 126

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[dwg: Added test-shift128 to .gitignore]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-31 10:10:14 +11:00
..
acl.c
base64.c
bitmap.c bitmap: assert that start and nr are non negative 2017-01-20 13:22:17 +01:00
bitops.c
buffer.c
bufferiszero.c
compatfd.c
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c
envlist.c
error.c
event_notifier-posix.c event_notifier: cleanups around event_notifier_set_handler 2017-01-16 17:52:35 +01:00
event_notifier-win32.c event_notifier: cleanups around event_notifier_set_handler 2017-01-16 17:52:35 +01:00
fifo8.c
getauxval.c
hbitmap.c hbitmap: Add hbitmap_is_serializable() 2017-01-26 10:25:01 +08:00
hexdump.c
host-utils.c host-utils: Implement unsigned quadword left/right shift and unit tests 2017-01-31 10:10:14 +11:00
id.c
iov.c
lockcnt.c qemu-thread: optimize QemuLockCnt with futexes on Linux 2017-01-16 13:25:18 +00:00
log.c
Makefile.objs host-utils: Move 128-bit guard macro to .c file 2017-01-31 10:10:14 +11:00
memfd.c
mmap-alloc.c util/mmap-alloc: refactor a little bit for readability 2017-01-24 23:26:53 +03:00
module.c
notify.c
osdep.c
oslib-posix.c
oslib-win32.c win32: use glib gpoll if glib >= 2.50 2017-01-24 23:26:53 +03:00
path.c
qdist.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-error.c
qemu-openpty.c
qemu-option.c
qemu-progress.c
qemu-sockets.c io: introduce a DNS resolver API 2017-01-23 15:32:46 +00:00
qemu-thread-posix.c * QOM interface fix (Eduardo) 2017-01-20 16:42:07 +00:00
qemu-thread-win32.c * QOM interface fix (Eduardo) 2017-01-20 16:42:07 +00:00
qemu-timer-common.c
qht.c
range.c
rcu.c
readline.c
throttle.c
timed-average.c
trace-events qemu-thread: optimize QemuLockCnt with futexes on Linux 2017-01-16 13:25:18 +00:00
unicode.c
uri.c Fix documentation and some comments (article, grammar) 2017-01-24 23:26:52 +03:00
uuid.c