bbc03b
diff -ru gxemul-0.7.0.orig/src/cpus/cpu_riscv.c gxemul-0.7.0/src/cpus/cpu_riscv.c
bbc03b
--- gxemul-0.7.0.orig/src/cpus/cpu_riscv.c	2021-04-22 18:04:18.000000000 +0000
bbc03b
+++ gxemul-0.7.0/src/cpus/cpu_riscv.c	2022-10-18 15:23:16.025840300 +0000
bbc03b
@@ -401,13 +401,13 @@
bbc03b
 		if (!(cpu->cd.riscv.extensions & RISCV_EXT_C))
bbc03b
 			debug("compressed (req. C ext)\t; ");
bbc03b
 
bbc03b
-		uint w13 = (iw >> 13) & 7;
bbc03b
-		uint w0 = (iw >> 0) & 3;
bbc03b
-		uint op = (w13 << 2) | w0;
bbc03b
+		uint32_t w13 = (iw >> 13) & 7;
bbc03b
+		uint32_t w0 = (iw >> 0) & 3;
bbc03b
+		uint32_t op = (w13 << 2) | w0;
bbc03b
 
bbc03b
-		uint rs1rd = (iw >> 7) & 31;
bbc03b
-		uint rs2 = (iw >> 2) & 31;
bbc03b
-		uint rprim_2 = ((iw >> 2) & 7) + RISCV_CREGBASE;
bbc03b
+		uint32_t rs1rd = (iw >> 7) & 31;
bbc03b
+		uint32_t rs2 = (iw >> 2) & 31;
bbc03b
+		uint32_t rprim_2 = ((iw >> 2) & 7) + RISCV_CREGBASE;
bbc03b
 		uint64_t nzimm5 = ((iw & (1 << 12)) ? -1 : 0) << 5;
bbc03b
 		uint64_t nzimm;
bbc03b
 
bbc03b
diff -ru gxemul-0.7.0.orig/src/cpus/cpu_riscv_instr.c gxemul-0.7.0/src/cpus/cpu_riscv_instr.c
bbc03b
--- gxemul-0.7.0.orig/src/cpus/cpu_riscv_instr.c	2021-04-22 18:04:18.000000000 +0000
bbc03b
+++ gxemul-0.7.0/src/cpus/cpu_riscv_instr.c	2022-10-18 15:22:53.407914100 +0000
bbc03b
@@ -209,11 +209,11 @@
bbc03b
 	 */
bbc03b
 
bbc03b
 	if (instr_length_in_bytes == sizeof(uint16_t)) {
bbc03b
-		uint w13 = (iw >> 13) & 7;
bbc03b
-		uint w0 = (iw >> 0) & 3;
bbc03b
-		uint op = (w13 << 2) | w0;
bbc03b
+		uint32_t w13 = (iw >> 13) & 7;
bbc03b
+		uint32_t w0 = (iw >> 0) & 3;
bbc03b
+		uint32_t op = (w13 << 2) | w0;
bbc03b
 
bbc03b
-		uint rs1rd = (iw >> 7) & 31;
bbc03b
+		uint32_t rs1rd = (iw >> 7) & 31;
bbc03b
 		uint64_t nzimm5 = ((iw & (1 << 12)) ? -1 : 0) << 5;
bbc03b
 		uint64_t nzimm = nzimm5 | ((iw >> 2) & 31);
bbc03b
 
bbc03b
diff -ru gxemul-0.7.0.orig/src/include/thirdparty/alpha_rpb.h gxemul-0.7.0/src/include/thirdparty/alpha_rpb.h
bbc03b
--- gxemul-0.7.0.orig/src/include/thirdparty/alpha_rpb.h	2021-04-22 18:04:14.000000000 +0000
bbc03b
+++ gxemul-0.7.0/src/include/thirdparty/alpha_rpb.h	2022-10-18 15:15:22.740823100 +0000
bbc03b
@@ -334,8 +334,8 @@
bbc03b
 	u_int64_t	pcs_reserved_soft;	/* 120: preserved software */
bbc03b
 
bbc03b
 	struct {				/* 128: inter-console buffers */
bbc03b
-		u_int	iccb_rxlen;
bbc03b
-		u_int	iccb_txlen;
bbc03b
+		u_int32_t	iccb_rxlen;
bbc03b
+		u_int32_t	iccb_txlen;
bbc03b
 		char	iccb_rxbuf[80];
bbc03b
 		char	iccb_txbuf[80];
bbc03b
 	} pcs_iccb;