From owner-svn-src-head@freebsd.org Mon Jun 26 22:32:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1504AD93185; Mon, 26 Jun 2017 22:32:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D47E068D92; Mon, 26 Jun 2017 22:32:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QMWrJw048497; Mon, 26 Jun 2017 22:32:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QMWrBs048496; Mon, 26 Jun 2017 22:32:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706262232.v5QMWrBs048496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 26 Jun 2017 22:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320388 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 22:32:54 -0000 Author: andrew Date: Mon Jun 26 22:32:52 2017 New Revision: 320388 URL: https://svnweb.freebsd.org/changeset/base/320388 Log: In _bswap16 and _bswap32 cast constant values to the appropriate type. This is similar to what is done in the x86 code. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/endian.h Modified: head/sys/arm64/include/endian.h ============================================================================== --- head/sys/arm64/include/endian.h Mon Jun 26 21:45:33 2017 (r320387) +++ head/sys/arm64/include/endian.h Mon Jun 26 22:32:52 2017 (r320388) @@ -106,12 +106,12 @@ __bswap16_var(__uint16_t v) #define __bswap16(x) \ ((__uint16_t)(__builtin_constant_p(x) ? \ - __bswap16_constant(x) : \ + __bswap16_constant((__uint16_t)x) : \ __bswap16_var(x))) #define __bswap32(x) \ ((__uint32_t)(__builtin_constant_p(x) ? \ - __bswap32_constant(x) : \ + __bswap32_constant((__uint32_t)x) : \ __bswap32_var(x))) #else