From nobody Wed Nov 19 00:14:00 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613080768; cv=none; d=zohomail.com; s=zohoarc; b=DfLt9BXjClbpHp6bmCIYmzXVCQ+9IOnmVtrKw2Kgil0RRhKwC/dzcESXkGy1GAb0n1iasQuKmzfhks6KO07He8Xi2bUvVToylVw+mkGatNqSkTIjCyPGbK61oEiDfmlAL7N0zfja4LWtVwy267iq0+CVD3TaHXwvyHL03Bn1TSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613080768; 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:Reply-To:References:Sender:Subject:To; bh=bBcCGiswERXa5Tk9w/hGfDdFM7clZn/Igf7apyC7TK0=; b=Qb5QPkvzPXhFVzB0TuZbnTsjGUHmCg9KMNJtssXbcnElgo/MZo6rMPwu/W9Q0wr7TnYfevrBIV4Nah3LMu2SUmBcjUq80LedELNvduRH/LVpNVSyxUisMDdYaDWRE8/Y7XsrATmk1NrToga4TEEcWH1M/3tZ7QFv8i2OvWX0+Ns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1613080768498800.8178019442205; Thu, 11 Feb 2021 13:59:28 -0800 (PST) Received: from localhost ([::1]:39756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAJzi-00069x-Cs for importer@patchew.org; Thu, 11 Feb 2021 16:59:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAJrt-0006Xp-Lf for qemu-devel@nongnu.org; Thu, 11 Feb 2021 16:51:21 -0500 Received: from rev.ng ([5.9.113.41]:46593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAJrg-00010X-ES for qemu-devel@nongnu.org; Thu, 11 Feb 2021 16:51:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bBcCGiswERXa5Tk9w/hGfDdFM7clZn/Igf7apyC7TK0=; b=BzkSXJf5an7j/5jDwUfQ/uDrkc hThNfIw9sOFhvVMPdmeJi6o+83QCGlShc8idgiIFprACm96J8sp9yVTFJQNUUxkGqh1SuPKiaM+9M t1K46vcRle4dI4X5X5DXvEwY7eq3Vvps6Dd0Ku9fPpkG1szzel9FgkI0kDeNXI9K4dC4=; To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, bcain@quicinc.com, babush@rev.ng, nizzo@rev.ng, Alessandro Di Federico Subject: [RFC PATCH 03/10] target/hexagon: make helper functions non-static Date: Thu, 11 Feb 2021 22:50:44 +0100 Message-Id: <20210211215051.2102435-4-ale.qemu@rev.ng> In-Reply-To: <20210211215051.2102435-1-ale.qemu@rev.ng> References: <20210211215051.2102435-1-ale.qemu@rev.ng> 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=5.9.113.41; envelope-from=ale@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Alessandro Di Federico From: Alessandro Di Federico via X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Paolo Montesel Move certain helper functions required by code generated by the idef-parser available outside genptr.c, moving them into macros.h. This patch also introduces the gen_cancel and gen_fbrev helper which will be used by idef-parser. Signed-off-by: Alessandro Di Federico Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/genptr.c | 13 ++++++++++--- target/hexagon/genptr.h | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index 7481f4c1dd..97de669f38 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -26,8 +26,15 @@ #include "translate.h" #include "macros.h" #include "gen_tcg.h" +#include "genptr.h" =20 -static inline TCGv gen_read_preg(TCGv pred, uint8_t num) +TCGv gen_read_reg(TCGv result, int num) +{ + tcg_gen_mov_tl(result, hex_gpr[num]); + return result; +} + +TCGv gen_read_preg(TCGv pred, uint8_t num) { tcg_gen_mov_tl(pred, hex_pred[num]); return pred; @@ -53,7 +60,7 @@ static inline void gen_log_predicated_reg_write(int rnum,= TCGv val, int slot) tcg_temp_free(slot_mask); } =20 -static inline void gen_log_reg_write(int rnum, TCGv val) +void gen_log_reg_write(int rnum, TCGv val) { tcg_gen_mov_tl(hex_new_value[rnum], val); #if HEX_DEBUG @@ -116,7 +123,7 @@ static void gen_log_reg_write_pair(int rnum, TCGv_i64 v= al) #endif } =20 -static inline void gen_log_pred_write(int pnum, TCGv val) +void gen_log_pred_write(int pnum, TCGv val) { TCGv zero =3D tcg_const_tl(0); TCGv base_val =3D tcg_temp_new(); diff --git a/target/hexagon/genptr.h b/target/hexagon/genptr.h index c158005d2a..0bfa99b463 100644 --- a/target/hexagon/genptr.h +++ b/target/hexagon/genptr.h @@ -19,7 +19,14 @@ #define HEXAGON_GENPTR_H =20 #include "insn.h" +#include "tcg/tcg.h" +#include "translate.h" =20 extern const SemanticInsn opcode_genptr[]; =20 +TCGv gen_read_reg(TCGv result, int num); +TCGv gen_read_preg(TCGv pred, uint8_t num); +void gen_log_reg_write(int rnum, TCGv val); +void gen_log_pred_write(int pnum, TCGv val); + #endif --=20 2.30.0