From patchwork Mon Nov 7 23:58:11 2022 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: 622254 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2556514pvb; Mon, 7 Nov 2022 15:59:45 -0800 (PST) X-Google-Smtp-Source: AMsMyM7KqvhPMR4EseteXfCr1bygyvNJ72P/gFWOm5LFV/3RnygxG5Hx7T9eeXQKuqxzpWCOYh35 X-Received: by 2002:ac8:41c3:0:b0:3a5:528b:65b1 with SMTP id o3-20020ac841c3000000b003a5528b65b1mr19303683qtm.539.1667865585711; Mon, 07 Nov 2022 15:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667865585; cv=none; d=google.com; s=arc-20160816; b=a/Xnhbjy9vyea0FCsuwaxz/pf9xvwR6mB3NA7o4O7924Xud4M4Q15t9LXRwVVTFIfv tYlCCpQXxI88aBGJ+f0DScEY+ni8v85LeD484SxuVaureRFnwOuutFij1eX7oJB6k5bk hxtgGiQfbEy2isex1oKn+2IB3z0aInr8dXucBzyVIlJ0ylsNb1o6Tvj4tpUjoiAmYTG6 u/vWBNMzbrBd97iN/bb51gNfPwZwHZuKFUc7hu/AfT9sn4MlpZ+FtsUMFnOilMNuKNlV KiUvYeWU9+kW2WkI3wbk/CxNn+dfztxsLF4wcSwSMsssxIS5hk7xyIAIcyYKsiT+4f2m xxJw== 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=CT2Moauv807B/rlILDZo2huTDc6KLxUQ9xta6J885G0=; b=JUxR1J8i2X9KF+EfHyoaN471JOFoRtuQjFLyeelzcHRo7FKBHe1Y9OodjaXOljSQsR BEnqZ3DA1Vty0AnRVFAi7kMxskJ5+nVfxq6sUAsp590QiSXc4w4DQe+pHsjVuYmB4hd1 36+/y3UokytyLTWV7cfnSsvF11iIXKNey9DfTidT+TIyfdCAaHzS1Man0RZIF3QQR0j/ M/iqhfHwJgJ4R464cA0P+VjQT1ae43ArsZyBkfjqop0f8GR719EQ522rCICGibpHG/KN piq6l5UnZm0jhe9HSsJbAKHBRLMDzL+w0wb802SEuhKxyScZZ/543JFzxSOASAMC+px+ 6FOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zcb9Hdcy; 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 d22-20020ac85456000000b00342f62eebe1si5286579qtq.421.2022.11.07.15.59.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Nov 2022 15:59:45 -0800 (PST) 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=Zcb9Hdcy; 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 1osC0r-0004CQ-RS; Mon, 07 Nov 2022 18:58:45 -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 1osC0q-0004BB-5P for qemu-devel@nongnu.org; Mon, 07 Nov 2022 18:58:44 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osC0m-0000mJ-Aq for qemu-devel@nongnu.org; Mon, 07 Nov 2022 18:58:43 -0500 Received: by mail-wr1-x434.google.com with SMTP id o4so18533850wrq.6 for ; Mon, 07 Nov 2022 15:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=CT2Moauv807B/rlILDZo2huTDc6KLxUQ9xta6J885G0=; b=Zcb9HdcyiWBeCWUgtNHb4+0RfE8ypTlGOHYuB7Qb/j2WYR7YcmPtvCHwSqEZweTbzb Ifr3+KPYHtwH9Nvf0TL8iprZV+MKhb3DkTY6t67ddBzPXn+QMGnEagcWsuGly6wUFSsE xZhZmhA7rAcwXJkODG+3x2MduIuF6vT1lT5DfHgGKvMS1nQWbK4ArD2llN0z2KRo5wW0 Jyo4NT+TfYwHnCOJ3LpAIa1jQt+8unkAjGmCi0am+dN5KDuFgegoTtDgpVTheiegBPjl o5q9Ut8aYQBzDsJmFDBfKrfUhSorlFzzXo8qwz+JqIJHZvATWtvGAn3sM1RFjVr8aX1y HH0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=CT2Moauv807B/rlILDZo2huTDc6KLxUQ9xta6J885G0=; b=q1rE6+VM89KeK+SeiQ3hRMfXCJEVFVI2Fhyr3omU67U3SP10UbKS+ZKSutDEYffeVf ZvcUZTxX/QFtxEf3c4S45ulaAN9t2x62S4/0TCQTXojZ2PHryfrDMJ8CrFkn+F+5xcEU BbrRpMTFeqggUlVjobg6mxl5CkDf/rpWmrZMcKLPD00QYiiQdrosJ7JWVIrMlHUfgMNt eVRSbaNXAFSGqL/JZqOrl/glyhDt95d1V8m7txPSglH4+/IosA8jr0xo36pw5BRjvOlc Zn+s+33qR/ADLly+f/05ActfFLsyLyWxKi+tCwg+V358bV+FTfE2+OnA1awT7YF/FXdJ vXIg== X-Gm-Message-State: ACrzQf3O4dgYR4sPfIjs+rkiIRMrdRWcU0qImxvvaNm9ryObPcCNXYU8 7mCLo2MKiP+sOBQyhrCy+54Q0bjTs+VVTQ== X-Received: by 2002:a05:6000:15cd:b0:236:9701:7939 with SMTP id y13-20020a05600015cd00b0023697017939mr32789939wry.248.1667865518724; Mon, 07 Nov 2022 15:58:38 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id g12-20020adffc8c000000b0022cd96b3ba6sm9826641wrr.90.2022.11.07.15.58.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Nov 2022 15:58:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Pavel Dovgalyuk , Pavel Dovgalyuk Subject: [PULL 03/14] target/mips: Enable LBX/LWX/* instructions for Octeon Date: Tue, 8 Nov 2022 00:58:11 +0100 Message-Id: <20221107235822.71458-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107235822.71458-1-philmd@linaro.org> References: <20221107235822.71458-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pavel Dovgalyuk This patch changes condition and function name for enabling indexed load instructions for Octeon vCPUs. Octeons do not have DSP extension, but implement LBX-and-others. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Message-Id: <166728058455.229236.13834649461181619195.stgit@pasha-ThinkPad-X280> Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 2f2d707a12..4c4bd0823d 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -12173,12 +12173,16 @@ enum { #include "nanomips_translate.c.inc" /* MIPSDSP functions. */ -static void gen_mipsdsp_ld(DisasContext *ctx, uint32_t opc, - int rd, int base, int offset) + +/* Indexed load is not for DSP only */ +static void gen_mips_lx(DisasContext *ctx, uint32_t opc, + int rd, int base, int offset) { TCGv t0; - check_dsp(ctx); + if (!(ctx->insn_flags & INSN_OCTEON)) { + check_dsp(ctx); + } t0 = tcg_temp_new(); if (base == 0) { @@ -14523,7 +14527,7 @@ static void decode_opc_special3_legacy(CPUMIPSState *env, DisasContext *ctx) case OPC_LBUX: case OPC_LHX: case OPC_LWX: - gen_mipsdsp_ld(ctx, op2, rd, rs, rt); + gen_mips_lx(ctx, op2, rd, rs, rt); break; default: /* Invalid */ MIPS_INVAL("MASK LX");