From patchwork Mon Jun 19 15:42:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 694059 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp2436084wru; Mon, 19 Jun 2023 08:44:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73gA3vwHqvfHGLJFLWfAmy3dpuzZB7Inb0XMb3h1v1vSXu+4r5dkAq8F4/2ptlxf6S1GHU X-Received: by 2002:a7b:c41a:0:b0:3f7:16ed:4cb2 with SMTP id k26-20020a7bc41a000000b003f716ed4cb2mr8374346wmi.13.1687189469613; Mon, 19 Jun 2023 08:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687189469; cv=none; d=google.com; s=arc-20160816; b=rjH+xiv3dwacNE3UeUGRS+COvDdWQ8MaMBAvlt7NN52ukvfYAbhtnLNH7RXvZsZdun DiufWHCbftXQ1UIvEt9gGE6C+qd8cG235N6EPg/fQV0sVpPX/Iuxr7WbtNN5UCCyB4S9 veCq1B+EtYyqpnhCVXpHlKpm8N81pm5xX3vQuXGmLMbt2QameqSrj0tqYTuh3mmfq9OX SbW7jMPRJ412stEXqUhUxbeJWcyS6/LmziZPIcLQIG204rDHy3wnBR7/MfWD6mMq5+En HThspOpJ2rBwnbKfg+3FuanTlhiCMIvucVcECScZ6VhJMhi0a/3pB8Mx9hTeo4zeMcCQ NadQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PL1Zih1O88caRvf7sSFHzFYcTBs6PNvq9qmGaaGGlCI=; b=FHClN3iSwOl2ksmLzhHNSrAIFxcJrlhXWwI73glLis+bCJIK4+yP4jtFL0sIrQrcYN Yzzp/Yabb6BRMWaVLezFFoGjefoJoUC6C9PYv6mX5n+JMZDsHPjFhzHjEp2iLY80aPr9 2EURi5pUMX7eseRaYwnedshN24zyfg53SCtiLT1uoE2QDMD/JTnDHosvxdYMlFoL2i8D db/uAGDAdQBxpaIiysHNi8r0Ipvag+1V/wx58Cln2xfOXdVO3tvn2mdLvHJbjIvLWqfZ J9TVML7KOax4+t6soAlLtavL9VgP4ufcIONvUJeh/pw2qkinO6wOSsB+1rB2uw0IVr99 B0oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F3p1GJvO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y16-20020adfee10000000b0031135a8f717si2230133wrn.770.2023.06.19.08.44.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2023 08:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F3p1GJvO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBH2w-0003ev-2w; Mon, 19 Jun 2023 11:44:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBH2u-0003Yx-Em for qemu-devel@nongnu.org; Mon, 19 Jun 2023 11:44:00 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBH2r-000180-Go for qemu-devel@nongnu.org; Mon, 19 Jun 2023 11:44:00 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-31109cd8d8cso3342367f8f.2 for ; Mon, 19 Jun 2023 08:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687189436; x=1689781436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PL1Zih1O88caRvf7sSFHzFYcTBs6PNvq9qmGaaGGlCI=; b=F3p1GJvOBzRYX+oQcB4KOcPwohuyiC/NwphpH6cw202L2pMbS/VpDmgY0p9ntiSoPm 7iBr5Yt/+X/1JTQxkgHktCCQIbvK9hDw756Z1mpFNWAaugidIedFX+LMI7XVNNwiJE8j UxjMYvKurjlVt+c62jImob2r2Y75v7hsUxFhKG8JF76gy4BTfO1POG+UIeBw7XoE/vA0 r24EhkVeS3tAZLRbIanQVylhuRfPoH0Vj3shMc8/sfRRf/gnBjf37QgWp2FbD7mTjjqM xe/hxAQheHw8wfNE/CwunRb0Mc5NxtT4ZPCn3UZvMsb/B9zVfRjzv8CNSHVBkdM6E5vC DHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687189436; x=1689781436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PL1Zih1O88caRvf7sSFHzFYcTBs6PNvq9qmGaaGGlCI=; b=fEOHxBcx7qNl2v/WcOeKMnHuKxArhyOE5QIPJILaBAueIPd/YTuZbW0WmFS+YAEPaM 7jRwz34zCQDEnO61V3OEdTHmFw91cieTF5KVpbFjIIUoyRW51CyJTEnMjX6Xrsoi+Hn6 iB2wQWvH/g7oOWN3AW43x35Gh9r7xdnY5EW8tTTUPqkLMwB2u2QEGhHlZrWs6K4H/Bsz aE0hW8S6m9ozQMtxybvcJyxMJDkXNnatbZGmU6qknQqGkee3AnxlB/lT3K6o2cNIjZNe ICzwN7a1x/G3Fo15FyN/25iXh2W+SixMYb1lwEETx4g366Fw3ofVyDR3BETHBAfSricT 745Q== X-Gm-Message-State: AC+VfDylZW6pS/qJqIpFOqSOW4aOVvpuW82UgTbZkXDHjsAEA4THDLYA 35TknebSDMOneO4SXbVw3Qtri12yyviUfRffQstgfQ== X-Received: by 2002:adf:f203:0:b0:30f:b65a:e5a1 with SMTP id p3-20020adff203000000b0030fb65ae5a1mr7603171wro.38.1687189435752; Mon, 19 Jun 2023 08:43:55 -0700 (PDT) Received: from m1x-phil.lan (sar95-h02-176-184-10-225.dsl.sta.abo.bbox.fr. [176.184.10.225]) by smtp.gmail.com with ESMTPSA id j3-20020a5d4643000000b0030fd23381ffsm12913966wrs.11.2023.06.19.08.43.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Jun 2023 08:43:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH v3 05/34] target/arm/tcg: Expose some iwmmxt methods in 'translate.h' Date: Mon, 19 Jun 2023 17:42:33 +0200 Message-Id: <20230619154302.80350-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230619154302.80350-1-philmd@linaro.org> References: <20230619154302.80350-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Expose a few methods and variables before extracting iwmmxt code from translate.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/tcg/translate.h | 6 ++++++ target/arm/tcg/translate.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h index d1cacff0b2..3d7c55d3b6 100644 --- a/target/arm/tcg/translate.h +++ b/target/arm/tcg/translate.h @@ -165,6 +165,7 @@ typedef struct DisasCompare { } DisasCompare; /* Share the TCG temporaries common between 32 and 64 bit modes. */ +extern TCGv_i32 cpu_R[16]; extern TCGv_i32 cpu_NF, cpu_ZF, cpu_CF, cpu_VF; extern TCGv_i64 cpu_exclusive_addr; extern TCGv_i64 cpu_exclusive_val; @@ -298,6 +299,11 @@ static inline int curr_insn_len(DisasContext *s) /* CPU state was modified dynamically; no need to exit, but do not chain. */ #define DISAS_UPDATE_NOCHAIN DISAS_TARGET_10 +/* These are TCG temporaries used only by the legacy iwMMXt decoder */ +extern TCGv_i64 cpu_V0, cpu_V1, cpu_M0; +int disas_iwmmxt_insn(DisasContext *s, uint32_t insn); +int disas_dsp_insn(DisasContext *s, uint32_t insn); + #ifdef TARGET_AARCH64 void a64_translate_init(void); void gen_a64_update_pc(DisasContext *s, target_long diff); diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index 3238463f13..aaa479521e 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -45,9 +45,9 @@ #define ENABLE_ARCH_8 arm_dc_feature(s, ARM_FEATURE_V8) /* These are TCG temporaries used only by the legacy iwMMXt decoder */ -static TCGv_i64 cpu_V0, cpu_V1, cpu_M0; +TCGv_i64 cpu_V0, cpu_V1, cpu_M0; /* These are TCG globals which alias CPUARMState fields */ -static TCGv_i32 cpu_R[16]; +TCGv_i32 cpu_R[16]; TCGv_i32 cpu_CF, cpu_NF, cpu_VF, cpu_ZF; TCGv_i64 cpu_exclusive_addr; TCGv_i64 cpu_exclusive_val; @@ -1490,7 +1490,7 @@ static inline int gen_iwmmxt_shift(uint32_t insn, uint32_t mask, TCGv_i32 dest) * Disassemble an iwMMXt instruction. * Returns nonzero if an error occurred (ie. an undefined instruction). */ -static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) +int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) { int rd, wrd; int rdhi, rdlo, rd0, rd1, i; @@ -2509,7 +2509,7 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) * Disassemble an XScale DSP instruction. * Returns nonzero if an error occurred (ie. an undefined instruction). */ -static int disas_dsp_insn(DisasContext *s, uint32_t insn) +int disas_dsp_insn(DisasContext *s, uint32_t insn) { int acc, rd0, rd1, rdhi, rdlo; TCGv_i32 tmp, tmp2;