From patchwork Tue Jun 29 07:58:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 57252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7B3F3B6F0C for ; Tue, 29 Jun 2010 18:06:03 +1000 (EST) Received: from localhost ([127.0.0.1]:43860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTVp9-0001SK-45 for incoming@patchwork.ozlabs.org; Tue, 29 Jun 2010 04:05:43 -0400 Received: from [140.186.70.92] (port=46264 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTVim-0006mR-AC for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTVik-00052h-GS for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:59:08 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:61791) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTVik-00050W-70 for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:59:06 -0400 Received: by mail-vw0-f45.google.com with SMTP id 14so1857973vws.4 for ; Tue, 29 Jun 2010 00:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=4TT6UU+8HJDUZAAD72YRJxfOr5/r/Qg7HiFCrumDhDg=; b=eDS3QvavYbJ/VlLZhnAJpWpM3oeoXdwdjrw6lhotV27cfFXGR9IXRtSLH4Y+7xmFvc qGFlEMx6295lyG26tcZHKLCeQuan2deb2D9g7kmEHpW92HituEQUN+a78L3M7kNklkul qQwMd8sR4mATYGU2UUMqJ5hji7cpDc3COuiTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=u1o2bBkeOxE4F7b08RWFtMtCKofSyur7/txwm614UyjE/zvUFJNZt1vxE3vz0JDI2L r4VfTQRgwJVgdgq0P65fpJCXSLtIkBc79nWkU3T6vjIAb55W01nZB2/fItqzC3s1PKhL hBnbwioa0FyjsjwpGEhlHJnplrttO2YYZujeg= Received: by 10.220.47.84 with SMTP id m20mr3687494vcf.90.1277798345816; Tue, 29 Jun 2010 00:59:05 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id h17sm6136800vcr.3.2010.06.29.00.59.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Jun 2010 00:59:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 29 Jun 2010 09:58:52 +0200 Message-Id: <1277798332-32389-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.0.1 In-Reply-To: <1277798332-32389-1-git-send-email-pbonzini@redhat.com> References: <1277798332-32389-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: blauwirbel@gmail.com Subject: [Qemu-devel] [PATCH v2 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- cpu-exec.c | 2 ++ exec-all.h | 4 ++++ target-alpha/exec.h | 2 -- target-alpha/op_helper.c | 1 + target-arm/exec.h | 2 -- target-arm/op_helper.c | 1 + target-cris/exec.h | 2 -- target-cris/op_helper.c | 1 + target-i386/exec.h | 2 -- target-i386/op_helper.c | 1 + target-m68k/exec.h | 2 -- target-m68k/op_helper.c | 2 ++ target-microblaze/exec.h | 2 -- target-microblaze/op_helper.c | 1 + target-mips/exec.h | 2 -- target-mips/op_helper.c | 2 ++ target-ppc/exec.h | 2 -- target-ppc/op_helper.c | 2 ++ target-s390x/exec.h | 2 -- target-s390x/op_helper.c | 1 + target-sh4/exec.h | 2 -- target-sh4/op_helper.c | 2 ++ target-sparc/exec.h | 2 -- target-sparc/op_helper.c | 1 + 24 files changed, 21 insertions(+), 22 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 026980a..5d5170f 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -16,7 +16,9 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ + #include "config.h" +#define NEED_GLOBAL_ENV #include "exec.h" #include "disas.h" #include "tcg.h" diff --git a/exec-all.h b/exec-all.h index a775582..ebe88ad 100644 --- a/exec-all.h +++ b/exec-all.h @@ -353,4 +353,8 @@ extern int singlestep; /* cpu-exec.c */ extern volatile sig_atomic_t exit_request; +#ifdef NEED_GLOBAL_ENV +register CPUState *env asm(AREG0); +#endif + #endif diff --git a/target-alpha/exec.h b/target-alpha/exec.h index a8a38d2..1950f83 100644 --- a/target-alpha/exec.h +++ b/target-alpha/exec.h @@ -26,8 +26,6 @@ #define TARGET_LONG_BITS 64 -register struct CPUAlphaState *env asm(AREG0); - #define FP_STATUS (env->fp_status) #include "cpu.h" diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index ff5ae26..9870d97 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" #include "host-utils.h" #include "softfloat.h" diff --git a/target-arm/exec.h b/target-arm/exec.h index e4c35a3..eda5632 100644 --- a/target-arm/exec.h +++ b/target-arm/exec.h @@ -19,8 +19,6 @@ #include "config.h" #include "dyngen-exec.h" -register struct CPUARMState *env asm(AREG0); - #define M0 env->iwmmxt.val #include "cpu.h" diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 9b1a014..235cffc 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -16,6 +16,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" #include "helpers.h" diff --git a/target-cris/exec.h b/target-cris/exec.h index 93ce768..360f45a 100644 --- a/target-cris/exec.h +++ b/target-cris/exec.h @@ -19,8 +19,6 @@ */ #include "dyngen-exec.h" -register struct CPUCRISState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c index a60da94..8bb3876 100644 --- a/target-cris/op_helper.c +++ b/target-cris/op_helper.c @@ -18,6 +18,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" #include "mmu.h" #include "helper.h" diff --git a/target-i386/exec.h b/target-i386/exec.h index fc8945b..b002805 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -28,8 +28,6 @@ #include "cpu-defs.h" -register struct CPUX86State *env asm(AREG0); - #include "qemu-common.h" #include "qemu-log.h" diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 00fc671..05b6340 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" #include "exec-all.h" #include "host-utils.h" diff --git a/target-m68k/exec.h b/target-m68k/exec.h index f31e06e..ac1cf12 100644 --- a/target-m68k/exec.h +++ b/target-m68k/exec.h @@ -19,8 +19,6 @@ */ #include "dyngen-exec.h" -register struct CPUM68KState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c index 0711107..df4489f 100644 --- a/target-m68k/op_helper.c +++ b/target-m68k/op_helper.c @@ -16,6 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ + +#define NEED_GLOBAL_ENV #include "exec.h" #include "helpers.h" diff --git a/target-microblaze/exec.h b/target-microblaze/exec.h index 87b2494..31a14fe 100644 --- a/target-microblaze/exec.h +++ b/target-microblaze/exec.h @@ -18,8 +18,6 @@ */ #include "dyngen-exec.h" -register struct CPUMBState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index be0c829..07992b7 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include #include "exec.h" #include "helper.h" diff --git a/target-mips/exec.h b/target-mips/exec.h index af61b54..3cb3201 100644 --- a/target-mips/exec.h +++ b/target-mips/exec.h @@ -8,8 +8,6 @@ #include "dyngen-exec.h" #include "cpu-defs.h" -register struct CPUMIPSState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 8ae510a..f6a6a27 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -16,6 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ + +#define NEED_GLOBAL_ENV #include #include "exec.h" diff --git a/target-ppc/exec.h b/target-ppc/exec.h index 44cc5e9..b835273 100644 --- a/target-ppc/exec.h +++ b/target-ppc/exec.h @@ -29,8 +29,6 @@ /* Precise emulation is needed to correctly emulate exception flags */ #define USE_PRECISE_EMULATION 1 -register struct CPUPPCState *env asm(AREG0); - #if !defined(CONFIG_USER_ONLY) #include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 3c3aa60..a10c233 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -16,6 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ + +#define NEED_GLOBAL_ENV #include #include "exec.h" #include "host-utils.h" diff --git a/target-s390x/exec.h b/target-s390x/exec.h index bf3f264..e87622a 100644 --- a/target-s390x/exec.h +++ b/target-s390x/exec.h @@ -19,8 +19,6 @@ #include "dyngen-exec.h" -register struct CPUS390XState *env asm(AREG0); - #include "config.h" #include "cpu.h" #include "exec-all.h" diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c index 402df2d..a3b66b8 100644 --- a/target-s390x/op_helper.c +++ b/target-s390x/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" /*****************************************************************************/ diff --git a/target-sh4/exec.h b/target-sh4/exec.h index 2999c02..73c06ad 100644 --- a/target-sh4/exec.h +++ b/target-sh4/exec.h @@ -22,8 +22,6 @@ #include "config.h" #include "dyngen-exec.h" -register struct CPUSH4State *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 2e5f555..d29d75e 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -18,6 +18,8 @@ */ #include #include + +#define NEED_GLOBAL_ENV #include "exec.h" #include "helper.h" diff --git a/target-sparc/exec.h b/target-sparc/exec.h index f811571..db6ed49 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -3,8 +3,6 @@ #include "config.h" #include "dyngen-exec.h" -register struct CPUSPARCState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index be3c1e0..5ad1fac 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1,3 +1,4 @@ +#define NEED_GLOBAL_ENV #include "exec.h" #include "host-utils.h" #include "helper.h" -- 1.7.0.1 #include #include "exec.h" diff --git a/target-ppc/exec.h b/target-ppc/exec.h index 44cc5e9..b835273 100644 --- a/target-ppc/exec.h +++ b/target-ppc/exec.h @@ -29,8 +29,6 @@ /* Precise emulation is needed to correctly emulate exception flags */ #define USE_PRECISE_EMULATION 1 -register struct CPUPPCState *env asm(AREG0); - #if !defined(CONFIG_USER_ONLY) #include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 3c3aa60..a10c233 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -16,6 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ + +#define NEED_GLOBAL_ENV #include #include "exec.h" #include "host-utils.h" diff --git a/target-s390x/exec.h b/target-s390x/exec.h index bf3f264..e87622a 100644 --- a/target-s390x/exec.h +++ b/target-s390x/exec.h @@ -19,8 +19,6 @@ #include "dyngen-exec.h" -register struct CPUS390XState *env asm(AREG0); - #include "config.h" #include "cpu.h" #include "exec-all.h" diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c index 402df2d..a3b66b8 100644 --- a/target-s390x/op_helper.c +++ b/target-s390x/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ +#define NEED_GLOBAL_ENV #include "exec.h" /*****************************************************************************/ diff --git a/target-sh4/exec.h b/target-sh4/exec.h index 2999c02..73c06ad 100644 --- a/target-sh4/exec.h +++ b/target-sh4/exec.h @@ -22,8 +22,6 @@ #include "config.h" #include "dyngen-exec.h" -register struct CPUSH4State *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 2e5f555..d29d75e 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -18,6 +18,8 @@ */ #include #include + +#define NEED_GLOBAL_ENV #include "exec.h" #include "helper.h" diff --git a/target-sparc/exec.h b/target-sparc/exec.h index f811571..db6ed49 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -3,8 +3,6 @@ #include "config.h" #include "dyngen-exec.h" -register struct CPUSPARCState *env asm(AREG0); - #include "cpu.h" #include "exec-all.h" diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index be3c1e0..5ad1fac 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1,3 +1,4 @@ +#define NEED_GLOBAL_ENV #include "exec.h" #include "host-utils.h" #include "helper.h"