From owner-cvs-all@FreeBSD.ORG Sun Nov 5 13:33:00 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D1F616A417; Sun, 5 Nov 2006 13:33:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C23E243D45; Sun, 5 Nov 2006 13:32:59 +0000 (GMT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA5DWxaK075612; Sun, 5 Nov 2006 13:32:59 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA5DWxmj075611; Sun, 5 Nov 2006 13:32:59 GMT (envelope-from marius) Message-Id: <200611051332.kA5DWxmj075611@repoman.freebsd.org> From: Marius Strobl Date: Sun, 5 Nov 2006 13:32:59 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/sparc64/include endian.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2006 13:33:00 -0000 marius 2006-11-05 13:32:59 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/sparc64/include endian.h Log: MFC: 1.16 In the replacement text of the __bswapN_const() macros encapsulate the argument in parentheses so these macros are safe to use and invocations with an expression as the argument like __bswap32_const(42 << 23 | 13) work as expected. Additionally, mask all the individually shifted bytes as appropriate so the bytes which exceed the width of the respective __bswapN_const() macro in invocations like __bswap16_const(0xdead600d) are ignored like it's the case with the corresponding __bswapN_var() function. Approved by: re (hrs) Revision Changes Path 1.15.2.1 +12 -8 src/sys/sparc64/include/endian.h