summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcpu/ChangeLog5
-rw-r--r--libcpu/riscv_disasm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 883896a2..e23097bd 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-07 Mark Wielaard <mark@klomp.org>
+
+ * riscv_disasm.c (riscv_disasm): Use UINT64_C to make calculation
+ unsigned.
+
2019-07-05 Omar Sandoval <osandov@fb.com>
* Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a.
diff --git a/libcpu/riscv_disasm.c b/libcpu/riscv_disasm.c
index bc4e02e5..bc0d8f37 100644
--- a/libcpu/riscv_disasm.c
+++ b/libcpu/riscv_disasm.c
@@ -453,7 +453,7 @@ riscv_disasm (Ebl *ebl,
mne = "fsd";
break;
case 16:
- opaddr = (((INT64_C (0) - ((first >> 12) & 0x1)) << 11)
+ opaddr = (((UINT64_C (0) - ((first >> 12) & 0x1)) << 11)
| ((first << 2) & 0x400)
| ((first >> 1) & 0x300)
| ((first << 1) & 0x80)