From nobody Sat Jun 29 02:53:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1610051818; cv=none; d=zohomail.com; s=zohoarc; b=HJs+9dz38fJaVrWmeTS7tcBz5McINEV+iIKRr3vkhH5rd4BVWOxBRXyJ5XNytM0CqOiYsKx7A8CT3xbSPzDDDFQwRX/JtQiuyXTykqJQbvjMbMuouifLottXqXLjbLYp/msFLF8CZKoRoTpHf4yHMHM0LvNfvYRj8RcRkuYkRzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610051818; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1C9DAauAp7ESr+w+Jngt35D1tFX2Zjw12yc74O3Eyt0=; b=PSKkYL1T1zXpCrwW4qovqjtxwoPK8HytoCTzkfPu1gwalg1ekDGhsRuxI08ZChKVowXUW37ueVCNRMgNex/PI5SyMz0YNLamHEZ5TMySSQLVs5qtNMTmymDCNbuqZChRCz+XXXtJgLzplLSOSj6hDenIV7R5X84CzVNxv7P/wRo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1610051818249654.1605292216362; Thu, 7 Jan 2021 12:36:58 -0800 (PST) Received: from localhost ([::1]:53974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxc1g-0002m4-Vo for importer@patchew.org; Thu, 07 Jan 2021 15:36:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxbhR-0001VO-1z for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:16:02 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:44498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxbhE-0001gO-Re for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:15:54 -0500 Received: by mail-pl1-x62e.google.com with SMTP id r4so4140502pls.11 for ; Thu, 07 Jan 2021 12:15:46 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id v6sm6516265pfi.31.2021.01.07.12.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 12:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1C9DAauAp7ESr+w+Jngt35D1tFX2Zjw12yc74O3Eyt0=; b=JbL+zwzBpEjWHm+q88jSzggyZVvivBjFJ4/DPrh79pZb9YeyFjDH2fnWiHiihqYgT3 Grjye7O7ZEG9ofQh9kQvCK5DScFl2u5BNtDgfLfUkCQ63xVA+Uqc1Lcx62kuv0TLg4Uj Z2m9i7RKtHEkTPU2L5bTcIqabSr1PnmptOGt/fJQPDJyTxG5x3zvkDcdErCvvnSEddVu rLD3k8QooflCltJKbxIMDpx096bMi3FYdXuAxwZxR7lRlm0eLUDrfBOcnosmjFkNLOrA YmxYtuIEf2InBggn2lZ5yxjCxkDr6WeNVNzPQ0bqCIKnhQzdX2fL2wbdzMOhrkHzAXr0 /7UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1C9DAauAp7ESr+w+Jngt35D1tFX2Zjw12yc74O3Eyt0=; b=KzT/xrpHTDtdX5IbqkvfVQyKEm9VwQ8Fn6Egvk3UD1waNNe3we5f2Vic1QI4/Ks627 f7P+CHNKw6PAnuYLE84kbBLoOFV/2Q8f5CjoGsNu9N6j+9BnBN4xkVLXrcL7+pdvmJjF a2FLII6img21srlyCl+5Suh7IuEpk0aIljraeHCslkcCUTr1w65J8QsZREAsjJ55zDvm UmIiV0FgM82cSocK1Ov+UjvVgEsueIH7dUh+NK7/kgBi/CYZYztmIJj7Y56hA97B0Wsb biFlgv6GblPExZtuEbejA01jkzuHj9yBWtffmrEWXp9/44n7MnkqAvgDXtHQ1r2APFYz l5xA== X-Gm-Message-State: AOAM530Lfqi6SMQ5+2RhrMnBdC1l20DopNvM/xWaUKe88Mjh8CfuoOoF OML+wxcbXxA6tr7VUieEwwPQHMu1G7FcQQ== X-Google-Smtp-Source: ABdhPJwfb5u8UMtoi/pN5pEW32Yz4eLUqcN4JCZ8OQgzVEYnHmepQXrfKxFYZzDr63PwLRxu9FnVHw== X-Received: by 2002:a17:90a:bf05:: with SMTP id c5mr166021pjs.95.1610050544925; Thu, 07 Jan 2021 12:15:44 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 30/47] tcg: Introduce tcg_tbrel_diff Date: Thu, 7 Jan 2021 10:14:31 -1000 Message-Id: <20210107201448.1152301-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107201448.1152301-1-richard.henderson@linaro.org> References: <20210107201448.1152301-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index e744a1ce02..e6fce9a049 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1146,6 +1146,19 @@ static inline ptrdiff_t tcg_pcrel_diff(TCGContext *s= , const void *target) return tcg_ptr_byte_diff(target, tcg_splitwx_to_rx(s->code_ptr)); } =20 +/** + * tcg_tbrel_diff + * @s: the tcg context + * @target: address of the target + * + * Produce a difference, from the beginning of the current TB code + * to the destination address. + */ +static inline ptrdiff_t tcg_tbrel_diff(TCGContext *s, const void *target) +{ + return tcg_ptr_byte_diff(target, tcg_splitwx_to_rx(s->code_buf)); +} + /** * tcg_current_code_size * @s: the tcg context --=20 2.25.1