From patchwork Thu Mar 28 15:37:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 232087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0208C2C00AD for ; Fri, 29 Mar 2013 03:08:32 +1100 (EST) Received: from localhost ([::1]:52684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULFNO-0008Cd-3t for incoming@patchwork.ozlabs.org; Thu, 28 Mar 2013 12:08:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULEu4-0006oP-60 for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULEty-0005Eh-8W for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:38:12 -0400 Received: from mail-da0-x22c.google.com ([2607:f8b0:400e:c00::22c]:48420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULEty-0005EZ-1g for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:38:06 -0400 Received: by mail-da0-f44.google.com with SMTP id z20so4604953dae.3 for ; Thu, 28 Mar 2013 08:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=IE4SzBgEcslnD7LoRa2yMp6oDNzWLL2/mX7Sj9awDXU=; b=WkTlnqLE8N8PIMGS/ghVYzDJvFhASTmjfyiFLPeAh/VWlvCX9sEFwHBCibrTJ1RHgP S/qbrvJA8qQ1unZj1oN0TS9FWVz5b1ZOtNtxW4DztXeah2YE6V1aaN7d/K7E2aUB3lZk 68TN6buRb8O2XYPkh9CId8I3QI+EnSppPaHayBbL2dRHcYBcUZB58q6ruST474P4Eb5C 4TrSdd8M7ZBw+Ag68ajtOoneM7LHO+51Dz5eYnlEk1AYVy/5jZqpexhie9VKLiS8rs8y zfHlsdCUXGYPGnjV80vampYo/z4aAPs8rRhQxpRnVc/8pEim2XYk6ZMXY6KAETqRl3J1 Ws8w== X-Received: by 10.68.39.129 with SMTP id p1mr36795274pbk.19.1364485085191; Thu, 28 Mar 2013 08:38:05 -0700 (PDT) Received: from pebble.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id cn1sm11022925pbb.7.2013.03.28.08.38.03 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Mar 2013 08:38:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2013 08:37:53 -0700 Message-Id: <1364485075-17899-4-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1364485075-17899-1-git-send-email-rth@twiddle.net> References: <1364485075-17899-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::22c Cc: Stefan Weil Subject: [Qemu-devel] [PATCH 3/5] tci: Avoid code before declarations 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 This only valid with c99 extensions enabled, and easy to avoid. Signed-off-by: Richard Henderson --- tci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tci.c b/tci.c index 77e0980..70f8308 100644 --- a/tci.c +++ b/tci.c @@ -441,9 +441,6 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) assert(tb_ptr); for (;;) { -#if defined(GETPC) - tci_tb_ptr = (uintptr_t)tb_ptr; -#endif TCGOpcode opc = tb_ptr[0]; #if !defined(NDEBUG) uint8_t op_size = tb_ptr[1]; @@ -466,6 +463,10 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) uint64_t v64; #endif +#if defined(GETPC) + tci_tb_ptr = (uintptr_t)tb_ptr; +#endif + /* Skip opcode and size entry. */ tb_ptr += 2;