Widen shift to the LHS type.

same as aarch64/db_interface.c r1.4, PR/53338.
This commit is contained in:
ryo 2018-06-14 08:27:10 +00:00
parent 9de5f4c04e
commit 9c9fdef1bf
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: disasm.c,v 1.1 2018/04/01 04:35:03 ryo Exp $ */
/* $NetBSD: disasm.c,v 1.2 2018/06/14 08:27:10 ryo Exp $ */
/*
* Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.1 2018/04/01 04:35:03 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.2 2018/06/14 08:27:10 ryo Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -568,7 +568,7 @@ sysregname(char *buf, size_t buflen, uint32_t rw,
static 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)