From patchwork Sat Sep 17 20:00:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 115166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8BE7DB70C1 for ; Sun, 18 Sep 2011 06:38:09 +1000 (EST) Received: from localhost ([::1]:58857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R514u-0003r2-Vu for incoming@patchwork.ozlabs.org; Sat, 17 Sep 2011 16:01:32 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R514G-0001oE-Em for qemu-devel@nongnu.org; Sat, 17 Sep 2011 16:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R514F-0007iu-Jb for qemu-devel@nongnu.org; Sat, 17 Sep 2011 16:00:52 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:56015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R514F-0007ig-CL for qemu-devel@nongnu.org; Sat, 17 Sep 2011 16:00:51 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id C8D117283383; Sat, 17 Sep 2011 22:00:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qGdD+svugunn; Sat, 17 Sep 2011 22:00:47 +0200 (CEST) Received: from flocke.weilnetz.de (p5086E8FB.dip.t-dialin.net [80.134.232.251]) by v220110690675601.yourvserver.net (Postfix) with ESMTPSA id 6B146728337F; Sat, 17 Sep 2011 22:00:46 +0200 (CEST) Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1R514A-0004te-3l; Sat, 17 Sep 2011 22:00:46 +0200 From: Stefan Weil To: QEMU Developers Date: Sat, 17 Sep 2011 22:00:27 +0200 Message-Id: <1316289634-18786-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <4E74FC29.1050003@mail.berlios.de> References: <4E74FC29.1050003@mail.berlios.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 78.47.199.172 Subject: [Qemu-devel] [PATCH 1/8] tcg: Declare TCG_TARGET_REG_BITS in tcg.h 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 TCG_TARGET_REG_BITS can be determined by the compiler, so there is no need to declare it for each individual tcg target. This is especially important for new tcg targets which will be supported by the tcg interpreter. Signed-off-by: Stefan Weil --- tcg/tcg.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index dc5e9c9..1859fae 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -22,6 +22,16 @@ * THE SOFTWARE. */ #include "qemu-common.h" + +/* Target word size (must be identical to pointer size). */ +#if UINTPTR_MAX == UINT32_MAX +# define TCG_TARGET_REG_BITS 32 +#elif UINTPTR_MAX == UINT64_MAX +# define TCG_TARGET_REG_BITS 64 +#else +# error Unknown pointer size for tcg target +#endif + #include "tcg-target.h" #include "tcg-runtime.h"