From nobody Tue Feb 10 05:46:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) client-ip=209.85.218.51; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f51.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1614331906; cv=none; d=zohomail.com; s=zohoarc; b=m9CEnFU8DZmDY4xyIeBEy7oHe19RVsmvpmDZ1XkK0yPiM5z20VQQzH7ICMcEWsoT2db+rwxIAXmA1BjDRKDqh8WUOOwzK1RljZrbXY6FidwTc35QSImB2J2A1BRqlZ+U64FXiPVzNcfoHyjSfX0zPeMjqZ0bzRjQABoCWpCan7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614331906; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3wgVFWl1ooSOtrFHyjc6vBbkl1t0wg7aCFfvYF/8BTs=; b=mJsRul2ly4DGeDpULnpVHIOn1yO8O8kwUQVMsGouBmmurxVPnmZk/aU8Cljy4/Zzjipw6MpAyx3OA1fmKiGf+BD9Mlmft8yjWKxtZYan0Tct/Jg6mNbFpF6AuuPt63nOLmfPYOs08TtGubTrx1jZ2wsLWebZ1RoHwqDxVnvfAQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.zohomail.com with SMTPS id 1614331906518809.8687927352452; Fri, 26 Feb 2021 01:31:46 -0800 (PST) Received: by mail-ej1-f51.google.com with SMTP id g5so13671155ejt.2 for ; Fri, 26 Feb 2021 01:31:45 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id y8sm4964046edd.97.2021.02.26.01.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 01:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3wgVFWl1ooSOtrFHyjc6vBbkl1t0wg7aCFfvYF/8BTs=; b=suANzPieQMU2MYZRZXrnxZQSGRDwqJFW9HyCDRw+Ehxl0CnbLkAtVaVg+8MiSI+cs0 npRxMTFW0AG8dRKZaEFsmINN+Plrqea77IClgk08g6acCa4NkU2Vb3+r1zL+M5IQaI2G pMeGjI2WeqKQFeWchVB9Q03ZFp6iOpmJ1mjBYD+HyQ8d/owMxVpObT1HfM7qvyDTzRSR Y3i2a0CNlbFe53zgtr0YcT8WMz0ggP3WeCF6ju6QtM/VbNwl6Z4seL5DupqiF1ryw0VF ovptH3PJO4tEs17Ys6rSyTQUupVm6JV4xQY34Yit42tj5iQEaQXgUpIdVxEtQNQp4sjM isHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3wgVFWl1ooSOtrFHyjc6vBbkl1t0wg7aCFfvYF/8BTs=; b=uQIeDxXpKTa9gIl2BGbW0WOosYV8N6YlTCBTP/dgI6XNktArPtA5N7BqxC3Ll7UTuM 2aF84w7bEiXJ22Dhnaq9mm1KxAKP/xOiHk2RrSLHcH4AmkfST4/PkPKEx+MMjdUpMkeP HqdsJUwjaQYis1UMnYxE7TpQ2KlQsitJH1dipTOHlwGl3c8zwhtN5haKzOw/hsX9QPpB IJ2o6QoHs4qJOf7fUjeO+P6Yn214FQs8mV39/8f8TjjoJUdYyVXLPfwTase035sb6nAb bkVl6tswSpzdMTITssKBkWBCCkNi5UI3MKovPBwOgMcCA3nwE8FcB2m3anKL70nueU2q yDUw== X-Gm-Message-State: AOAM533pjvfmzWRR9zO1jMPgGtSK0SH8CIyyyKGrSpUKfsX1ytjGwD0P c7C5BtA140gnIgJYFHEeIN4= X-Google-Smtp-Source: ABdhPJxYp5wVgJtcpO8f/TU5Tt/jEW0EY2SBnyJTSNL9MaJPZT3grd5TFaxoRv2X+RH3z2BI8aQ8XA== X-Received: by 2002:a17:906:184e:: with SMTP id w14mr2426127eje.56.1614331904771; Fri, 26 Feb 2021 01:31:44 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aleksandar Rikalo , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Richard Henderson Subject: [PATCH v5 06/13] target/mips: Pass instruction opcode to decode_opc_mxu() Date: Fri, 26 Feb 2021 10:31:03 +0100 Message-Id: <20210226093111.3865906-7-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210226093111.3865906-1-f4bug@amsat.org> References: <20210226093111.3865906-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) In the next commit we'll make decode_opc_mxu() match decodetree prototype by returning a boolean. First pass ctx->opcode as an argument. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/translate.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 6f5ccd667da..9e875fa4a25 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -25780,17 +25780,17 @@ static void decode_opc_mxu__pool19(DisasContext *= ctx) /* * Main MXU decoding function */ -static void decode_opc_mxu(DisasContext *ctx) +static void decode_opc_mxu(DisasContext *ctx, uint32_t insn) { - uint32_t opcode =3D extract32(ctx->opcode, 0, 6); + uint32_t opcode =3D extract32(insn, 0, 6); =20 if (opcode =3D=3D OPC__MXU_MUL) { uint32_t rs, rt, rd, op1; =20 - rs =3D extract32(ctx->opcode, 21, 5); - rt =3D extract32(ctx->opcode, 16, 5); - rd =3D extract32(ctx->opcode, 11, 5); - op1 =3D MASK_SPECIAL2(ctx->opcode); + rs =3D extract32(insn, 21, 5); + rt =3D extract32(insn, 16, 5); + rd =3D extract32(insn, 11, 5); + op1 =3D MASK_SPECIAL2(insn); =20 gen_arith(ctx, op1, rd, rs, rt); =20 @@ -26995,7 +26995,7 @@ static bool decode_opc_legacy(CPUMIPSState *env, Di= sasContext *ctx) #endif #if !defined(TARGET_MIPS64) if (ctx->insn_flags & ASE_MXU) { - decode_opc_mxu(ctx); + decode_opc_mxu(ctx, ctx->opcode); break; } #endif --=20 2.26.2