From nobody Sat Nov 23 21:17:55 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=1731432120; cv=none; d=zohomail.com; s=zohoarc; b=Fxh9mnWWBoYrrK56PRTsOMwOiG07wrciXdzE7GHPnqLVaky6FT4MJAvhwxj1rtAgDAbwKo/9oBv+jV0IzJcCPjYo9mDJFrTjW5cvyYTri0n9biRA/yrhhviDvZWUp9BJ/fSDbE2b1Bv+5Dk9BMNHEbfoJ5Ou2omDS24pOwCAn2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731432120; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kDP/lIwlRm+EPmYlmR49NSb6qEjZ/RID3Kmdg460Duk=; b=iiQiGZBVDrNm3YQBackGUbc5YDk3iCR4ZihA/h7iJpMVUBz2XlLUq59GyIcR6SPNM/6QRoRR+0Qjyy/JMxuWlZIKdNsJLoBm9RlCRgIX4B5rwzmirPH7/XM4uCb1zEAGf9O7MsVm2X42VD3lz1ObMUz7tGYUXlxwgE6vgltTlCI= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 173143212095291.88385049881356; Tue, 12 Nov 2024 09:22:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAua8-0003nG-1U; Tue, 12 Nov 2024 12:21:37 -0500 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 1tAuZb-0003Jl-0i for qemu-devel@nongnu.org; Tue, 12 Nov 2024 12:21:03 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAuZY-0003kM-Rs for qemu-devel@nongnu.org; Tue, 12 Nov 2024 12:21:02 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43162cf1eaaso74894095e9.0 for ; Tue, 12 Nov 2024 09:21:00 -0800 (PST) Received: from localhost.localdomain (cnf78-h01-176-184-27-250.dsl.sta.abo.bbox.fr. [176.184.27.250]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381eda04ad0sm15834386f8f.100.2024.11.12.09.20.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Nov 2024 09:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731432059; x=1732036859; darn=nongnu.org; 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=kDP/lIwlRm+EPmYlmR49NSb6qEjZ/RID3Kmdg460Duk=; b=FtrsSTMm0VjDLU1peflxDKOXKoVhh34tq8OqMOVl2kk8kW45Ih0WzeeGfoHHNBhW7O T/a4iwJD8PHpTOEA56NpJdhM6eJSPw+SO5xY+LDPwMxIZYo6xkHBta2qcWQkYaR4iNl2 u8PscAxUjdNI9SxVJ147XnS2SHamxLKkIRdz0p/jXcNmVVVa7X5ru2iVT3a2f7t5FC0Y vPruH0EfNP6shBPIjJjJdJvYIWcQ+6OBGnesWzVoJYTdB0fPrljDWI4KKJ/Df20gxcJW ChisNYy3OleDnQKOimXcU9Rm4jkE1vsFD893oqT8H0dSUnXsjXWJl2a5OFHKhriAXIJu evAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731432059; x=1732036859; 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=kDP/lIwlRm+EPmYlmR49NSb6qEjZ/RID3Kmdg460Duk=; b=IW0wyTSALAvTCDgVDTiwst/vtBED08TLrd+AZqC3ruc9VmsDiRJANvT8lJ/eFj19// VqNDp7ROOks4Ml8J70sRN7FUGZEEAQhRy5sZ/eJeQgLGOYgSuzWsMgVb5wlCK2ZoX3ow 3EeSBwC3PTNraHR0brKtJFVIeW0VtPA+g1uFyRLWjeBVuAV1BHLu4yCcF/7pc3bbD1C2 tJG0BnuY+nhamdN3yFveRljyHzafE9wDlV3xIh6o2BuhSnWKOH6y6LM7MBh8Kyc9JyZ3 Kxtcz9uFKU9i5mlglLstjQPxCkA9JZfhYDbEeb0mBLrOkJHCoWl2l2hP9Yz8slMVHO3A Bfww== X-Gm-Message-State: AOJu0Yz7sSWObZ5HnwX/chnLLqYr4jwgxmB+r6tGrKO3DHJbgGu4yEqx zK4o0Ib7sSJE61V1VVcm+3d3jlrr8z7o/8UMraVUElrPrGZdMoQB8fGUmsZJYBNvjpzyFKIVPMl t X-Google-Smtp-Source: AGHT+IG0yx6oy4jTEJyjt349X7gFgH3zWoCWXVedC3njOhbNOi3Td84JaejW2E1ypzcFz0A/Tkh5+Q== X-Received: by 2002:a05:600c:1c9b:b0:431:5c7b:e939 with SMTP id 5b1f17b1804b1-432b750b52amr202064115e9.18.1731432058977; Tue, 12 Nov 2024 09:20:58 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 6/6] target/mips: Convert nanoMIPS LSA opcode to decodetree Date: Tue, 12 Nov 2024 18:20:22 +0100 Message-ID: <20241112172022.88348-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112172022.88348-1-philmd@linaro.org> References: <20241112172022.88348-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1731432121983116600 From: Philippe Mathieu-Daud=C3=A9 Simply call the generic gen_lsa() helper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/tcg/nanomips32.decode | 6 ++++++ target/mips/tcg/nanomips_translate.c | 7 +++++++ target/mips/tcg/nanomips_translate.c.inc | 4 ---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/target/mips/tcg/nanomips32.decode b/target/mips/tcg/nanomips32= .decode index 9cecf1e13d..96d2299bfb 100644 --- a/target/mips/tcg/nanomips32.decode +++ b/target/mips/tcg/nanomips32.decode @@ -6,3 +6,9 @@ # # Reference: nanoMIPS32 Instruction Set Technical Reference Manual # (Document Number: MD01247) + +&r rs rt rd sa + +@lsa ...... rt:5 rs:5 rd:5 sa:2 --- ... ... &r + +LSA 001000 ..... ..... ..... .. ... 001 111 @lsa diff --git a/target/mips/tcg/nanomips_translate.c b/target/mips/tcg/nanomip= s_translate.c index c148c13ed9..43a934d857 100644 --- a/target/mips/tcg/nanomips_translate.c +++ b/target/mips/tcg/nanomips_translate.c @@ -12,3 +12,10 @@ /* Include the auto-generated decoders. */ #include "decode-nanomips16.c.inc" #include "decode-nanomips32.c.inc" + +static bool trans_LSA(DisasContext *ctx, arg_r *a) +{ + gen_lsa(ctx, a->rd, a->rt, a->rs, a->sa); + + return true; +} diff --git a/target/mips/tcg/nanomips_translate.c.inc b/target/mips/tcg/nan= omips_translate.c.inc index e118013edc..0e012ab3d0 100644 --- a/target/mips/tcg/nanomips_translate.c.inc +++ b/target/mips/tcg/nanomips_translate.c.inc @@ -399,7 +399,6 @@ enum { /* POOL32A7 instruction pool */ enum { NM_P_LSX =3D 0x00, - NM_LSA =3D 0x01, NM_EXTW =3D 0x03, NM_POOL32AXF =3D 0x07, }; @@ -3625,9 +3624,6 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *en= v, DisasContext *ctx) case NM_P_LSX: gen_p_lsx(ctx, rd, rs, rt); break; - case NM_LSA: - gen_lsa(ctx, rd, rt, rs, extract32(ctx->opcode, 9, 2)); - break; case NM_EXTW: gen_ext(ctx, 32, rd, rs, rt, extract32(ctx->opcode, 6, 5)); break; --=20 2.45.2