Module Name:    src
Committed By:   christos
Date:           Sun Jun  3 20:18:10 UTC 2018

Modified Files:
        src/sys/arch/aarch64/aarch64: db_interface.c

Log Message:
PR/53338: David Binderman: Widen shift to the LHS type.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/aarch64/db_interface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/db_interface.c
diff -u src/sys/arch/aarch64/aarch64/db_interface.c:1.3 src/sys/arch/aarch64/aarch64/db_interface.c:1.4
--- src/sys/arch/aarch64/aarch64/db_interface.c:1.3	Thu May 31 05:37:16 2018
+++ src/sys/arch/aarch64/aarch64/db_interface.c	Sun Jun  3 16:18:10 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.3 2018/05/31 09:37:16 ryo Exp $ */
+/* $NetBSD: db_interface.c,v 1.4 2018/06/03 20:18:10 christos Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <r...@nerv.org>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.3 2018/05/31 09:37:16 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.4 2018/06/03 20:18:10 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -147,7 +147,7 @@ db_fetch_reg(unsigned int reg, db_regs_t
 static inline uint64_t
 SignExtend(int bitwidth, uint64_t imm, unsigned int multiply)
 {
-	const uint64_t signbit = (1 << (bitwidth - 1));
+	const uint64_t signbit = ((uint64_t)1 << (bitwidth - 1));
 	const uint64_t immmax = signbit << 1;
 
 	if (imm & signbit)

Reply via email to