From patchwork Wed Jul 10 17:10:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Chouteau X-Patchwork-Id: 258164 Return-Path: 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 710C02C02BA for ; Thu, 11 Jul 2013 03:11:38 +1000 (EST) Received: from localhost ([::1]:58259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwxvS-0005pU-VP for incoming@patchwork.ozlabs.org; Wed, 10 Jul 2013 13:11:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwxuB-00047y-Ao for qemu-devel@nongnu.org; Wed, 10 Jul 2013 13:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwxuA-00067M-3O for qemu-devel@nongnu.org; Wed, 10 Jul 2013 13:10:15 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:59285 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwxu9-000677-UC; Wed, 10 Jul 2013 13:10:14 -0400 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C867126522BF; Wed, 10 Jul 2013 19:10:12 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Th7hoHJl08cG; Wed, 10 Jul 2013 19:10:12 +0200 (CEST) Received: from PomPomGalli.act-europe.fr (pompomgalli.act-europe.fr [10.10.1.88]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id A8E8C2653572; Wed, 10 Jul 2013 19:10:12 +0200 (CEST) From: Fabien Chouteau To: qemu-devel@nongnu.org Date: Wed, 10 Jul 2013 19:10:01 +0200 Message-Id: <1373476202-11277-2-git-send-email-chouteau@adacore.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373476202-11277-1-git-send-email-chouteau@adacore.com> References: <1373476202-11277-1-git-send-email-chouteau@adacore.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 194.98.77.210 Cc: qemu-ppc@nongnu.org, agraf@suse.de Subject: [Qemu-devel] [PATCH 1/2] Add be16_to_cpupu function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Fabien Chouteau --- include/qemu/bswap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 14a5f65..628f41f 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -432,6 +432,11 @@ static inline uint32_t le32_to_cpupu(const uint32_t *p) return ldl_le_p(p); } +static inline uint16_t be16_to_cpupu(const uint16_t *p) +{ + return lduw_be_p(p); +} + static inline uint32_t be32_to_cpupu(const uint32_t *p) { return ldl_be_p(p);