Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 Widen shift to the LHS type.
details: https://anonhg.NetBSD.org/src/rev/1806cc60901c
branches: trunk
changeset: 319859:1806cc60901c
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Jun 14 08:27:10 2018 +0000
description:
Widen shift to the LHS type.
same as aarch64/db_interface.c r1.4, PR/53338.
diffstat:
sys/arch/aarch64/aarch64/disasm.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 353ee5606557 -r 1806cc60901c sys/arch/aarch64/aarch64/disasm.c
--- a/sys/arch/aarch64/aarch64/disasm.c Thu Jun 14 08:22:52 2018 +0000
+++ b/sys/arch/aarch64/aarch64/disasm.c Thu Jun 14 08:27:10 2018 +0000
@@ -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@localhost>
@@ -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 @@
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)
Home |
Main Index |
Thread Index |
Old Index