Message ID | 0b105b364007636c195003545bfd8748c27676b6.1430169159.git.peter.crosthwaite@xilinx.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D891214012C for <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2015 08:00:23 +1000 (AEST) Received: from localhost ([::1]:57785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1Ymr4g-0006Ii-2t for incoming@patchwork.ozlabs.org; Mon, 27 Apr 2015 18:00:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymr2a-0001yI-Dx for qemu-devel@nongnu.org; Mon, 27 Apr 2015 17:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymr2U-00039c-KI for qemu-devel@nongnu.org; Mon, 27 Apr 2015 17:58:12 -0400 Received: from mail-bn1on0096.outbound.protection.outlook.com ([157.56.110.96]:19724 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymr2U-00039W-GP for qemu-devel@nongnu.org; Mon, 27 Apr 2015 17:58:06 -0400 Received: from BN1BFFO11FD002.protection.gbl (10.58.144.34) by BN1BFFO11HUB054.protection.gbl (10.58.144.201) with Microsoft SMTP Server (TLS) id 15.1.154.14; Mon, 27 Apr 2015 21:58:04 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of xilinx.com does not designate 149.199.60.96 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.96; helo=xsj-tvapsmtpgw01; Received: from xsj-tvapsmtpgw01 (149.199.60.96) by BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (TLS) id 15.1.154.14 via Frontend Transport; Mon, 27 Apr 2015 21:58:04 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:46800 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymqxf-0003VF-EY; Mon, 27 Apr 2015 14:53:07 -0700 Received: from [127.0.0.1] (port=56662 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymr2R-0005NF-Ex; Mon, 27 Apr 2015 14:58:03 -0700 Received: from xsj-tvapsmtp02 (xsj-tvapsmtp02.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id t3RLrwMn016841; Mon, 27 Apr 2015 14:53:59 -0700 Received: from [172.19.74.49] (port=48030 helo=xsjsorenbubuntu.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from <peter.crosthwaite@xilinx.com>) id 1Ymr2Q-0005N2-Ga; Mon, 27 Apr 2015 14:58:02 -0700 From: Peter Crosthwaite <peter.crosthwaite@xilinx.com> To: <qemu-devel@nongnu.org> Date: Mon, 27 Apr 2015 14:58:02 -0700 Message-ID: <0b105b364007636c195003545bfd8748c27676b6.1430169159.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 2.3.6.3.g2cc70ee In-Reply-To: <cover.1430169159.git.peter.crosthwaite@xilinx.com> References: <cover.1430169159.git.peter.crosthwaite@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-7.5.0.1018-21506.005 X-TM-AS-Result: No--4.119-7.0-31-10 X-imss-scan-details: No--4.119-7.0-31-10 X-TMASE-MatchedRID: Bic0RC0fLKzEQS2ecfkpF+KXavbHY/C12yk8ad/lrSCbKItl61J/yfJv ocwUrWp7do5KXLcCiwULbigRnpKlKZx+7GyJjhAUMVf00SnNrLs+b6GIxijOp8ZHflzz9SXxCWT awEuT9IZlUnbaQS+Vp7Xsh2T/xqEKPBXDuGQw4II40nwv+aMt3d8RAg/FWztI7H2fVekOqwmYL1 KImKhq1ZuOe7yPCBvAf2OJxbAVgHQ+kK598Yf3Mg== X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(339900001)(189002)(199003)(77096005)(46102003)(47776003)(50226001)(71366001)(33646002)(105606002)(106466001)(85426001)(229853001)(110136001)(118296001)(2351001)(92566002)(6806004)(50986999)(76176999)(86362001)(64026002)(87936001)(5001920100001)(62966003)(2950100001)(36756003)(19580405001)(77156002)(19580395003)(50466002)(48376002)(107986001)(4001430100001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1BFFO11HUB054; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB054; X-Microsoft-Antispam-PRVS: <BN1BFFO11HUB054A06770D379A19BD0450790E90@BN1BFFO11HUB054.protection.gbl> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006)(3002001); SRVR:BN1BFFO11HUB054; BCL:0; PCL:0; RULEID:; SRVR:BN1BFFO11HUB054; X-Forefront-PRVS: 0559FB9674 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2015 21:58:04.3923 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.96]; Helo=[xsj-tvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB054 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 157.56.110.96 Cc: peter.maydell@linaro.org, zachp@xilinx.com, jues@xilinx.com, edgari@xilinx.com, kraxel@redhat.com, edgar.iglesias@gmail.com Subject: [Qemu-devel] [RFC PATCH v5 07/14] bitops: Add ONES macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org |
diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 90ca8df..30bad78 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -415,4 +415,6 @@ static inline uint64_t deposit64(uint64_t value, int start, int length, return (value & ~mask) | ((fieldval << start) & mask); } +#define ONES(num) ((num) == 64 ? ~0ull : (1ull << (num)) - 1) + #endif
Little macro that just gives you N ones (justified to LSB). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> --- include/qemu/bitops.h | 2 ++ 1 file changed, 2 insertions(+)