libcpu: Make sure left shifts are done in unsigned context.
authorMark Wielaard <mark@klomp.org>
Sat, 7 Sep 2019 19:45:26 +0000 (21:45 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 7 Sep 2019 19:45:31 +0000 (21:45 +0200)
commit65a29626e327b0173174cb25f390426e7808d272
treebb7aec126c733d51429be6d5d6f3514c0c78b76c
parent1ee98b6c28fbe9ab532ef947cfe46e833535303c
libcpu: Make sure left shifts are done in unsigned context.

Use UINT64_C (0) instead of INT64_C (0) to make sure the calculation
is done on unsigned values. Otherwise the gcc undefined sanitizer will
warn:

libcpu/riscv_disasm.c:457:57: runtime error: left shift of negative value -1

Signed-off-by: Mark Wielaard <mark@klomp.org>
libcpu/ChangeLog
libcpu/riscv_disasm.c