From patchwork Fri Feb 12 14:33:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 8292341 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D408E9F3CD for ; Fri, 12 Feb 2016 14:36:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3839A203C1 for ; Fri, 12 Feb 2016 14:36:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EC5D2039E for ; Fri, 12 Feb 2016 14:36:55 +0000 (UTC) Received: from localhost ([::1]:33125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEq6-0008Sv-W3 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 12 Feb 2016 09:36:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEpq-0008OG-H8 for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUEpp-0002as-De for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:38 -0500 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:33127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEpp-0002ao-6P; Fri, 12 Feb 2016 09:36:37 -0500 Received: by mail-pa0-x243.google.com with SMTP id y7so694808paa.0; Fri, 12 Feb 2016 06:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uO1vFpCmSaI684YhiGNJjpdZ/4Q/5ONSG927kCLVAzs=; b=NeTWsIbI0iWFulfrmH+rEzKt+P1jHHEh6g9z8IhDMF8uyffelPryKo9KBsGixny9dV zd8/Qgr9GRNMvpzfXkgF7mdhB2QWPksn48NR4DbtkZgKdC080jgBQjO2u99XaFZQCBEc UCU+qCxYczBMfeq19nAdP/6aRhONveBGiU1Wn0eLFF/ccWdL/pNVdXoFtYYzxi3j+eJ1 w7W7lspPFKd7519wQ+Be+cKusi1Y0SF+VgjBbxWMYd15UW8qkw+FRuaj+zFpA1hTFjtO nF4r7ATqam4IJJXDsz+z9jHF2Akn6UBIIyO8LsSELRCGNKDoKeWGHn/SdK+CxjbJA79T XjaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uO1vFpCmSaI684YhiGNJjpdZ/4Q/5ONSG927kCLVAzs=; b=GddVPtGWQ/0OrieBYkOiGOtnHmN+7bwyD/GUk0gojnSVf6X75MCXgzxhngTNxfQzyu Ld8Vi1Uh0BAopGyCbfY1adeUEEpPDa6Cdc4iTxHfYkrHWgtwGMLvokGB/D1UiiIX2XzE qbfSfZ0rq/LT5fz/bh3RtuDmZeHU7vhtNy8+VLMrvJZ1z5fweHrsg42NgdquTzKyjvMs FzNpiw0b1DHdQiJVs8PZkJgqneeUzYPH8GyDu0NIGlhJz705n4RUw4xXrieQ0talfrKl UCQ1ltL/28CEBBP3J/8auCx2L4kSfuo3P6pKRqi6Vr3/Ie2xnpumKFR/8i119YOPwPWW Ccgg== X-Gm-Message-State: AG10YOTQmg8XGV5f5mxhbLFsgGfN8UqCCtzXeLuRrsR0cvoxcYD0uPYRuaKZY3YeI4nPew== X-Received: by 10.67.4.225 with SMTP id ch1mr2482764pad.77.1455287796344; Fri, 12 Feb 2016 06:36:36 -0800 (PST) Received: from localhost (ec2-52-8-89-49.us-west-1.compute.amazonaws.com. [52.8.89.49]) by smtp.gmail.com with ESMTPSA id h89sm19991198pfj.52.2016.02.12.06.36.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 12 Feb 2016 06:36:35 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 12 Feb 2016 15:33:54 +0100 Message-Id: <1455287642-28166-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> References: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::243 Cc: edgar.iglesias@xilinx.com, serge.fdrv@gmail.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v1 1/9] tcg: Add tcg_set_insn_param 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Add tcg_set_insn_param as a mechanism to modify an insn parameter after emiting the insn. This is useful for icount and also for embedding fault information for a specific insn. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- tcg/tcg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 83da5fb..00dd124 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -585,6 +585,12 @@ struct TCGContext { extern TCGContext tcg_ctx; +static inline void tcg_set_insn_param(int op_idx, int arg, TCGArg v) +{ + int op_argi = tcg_ctx.gen_op_buf[op_idx].args; + tcg_ctx.gen_opparam_buf[op_argi + arg] = v; +} + /* The number of opcodes emitted so far. */ static inline int tcg_op_buf_count(void) {