From nobody Wed Nov 19 03:02:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) client-ip=209.85.128.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1614193073; cv=none; d=zohomail.com; s=zohoarc; b=Zw0caU8uyycu/hZqcgVvf0pBk4CinUWwPvXKo3Q4abUkoClM85ajWKdYggx6BvyE2OW88/1acGcqPj6gblTQ8DrreVcmHTFzvNFdVYJpU1+0Z+EZ5RPZABxWCczXteFEuqpt7cqBh/WJBA5jnNXgGrd0U6mrKl4I/f4Pt73ggmI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614193073; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3wgVFWl1ooSOtrFHyjc6vBbkl1t0wg7aCFfvYF/8BTs=; b=Ejm/i9GPlRuFEo9BxScfeVE2CbwVCMf6kh02dzvdm3XYNCZOq/h6g03r/nStyUuLsmpDb0W6uZ9ukzWCou5e4bCbXXwb4FRZ9dDjgd6/AAouMMSmF9/3IRDPSRrvldbt/a82ghhFoKVQd6MQS53ON8G9Bu5I0suOlilIXO+Knk8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.zohomail.com with SMTPS id 1614193073186515.5037857909366; Wed, 24 Feb 2021 10:57:53 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id p3so2690910wmc.2 for ; Wed, 24 Feb 2021 10:57:52 -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 7sm5047264wmi.27.2021.02.24.10.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 10:57:50 -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=n0pfoac3jhd1Eg9gbHd1mY14EfdI4Jd3eX8unnWoKg6rs9RYvzQCnG4EShgftX0KEQ pShWMmrO6NqAw3CBlAw+Yic0Z9sckfXuTw81msET/dZySpFj94SBs1f/QEh4EDc9EruB f3lHh2cALbeV3pLMfO/rtMaCY/Qqnqsflmxvv0b6+ImjL6rpNdI3/BQu/G8WEsQxZrUI NySYcTcDF0h7tc4rNLXMisP74ZJmOSFPOXqseP6bGXqacNo88uJmv7oXcq6M+7MZR60z S5WgOoRQls1no/JI/csUXPLzsCOJXR/pzdYKBmkutjhmgnu0eBq0qYYJ8zD/XCsdatpT XVng== 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=azzZp7y6WqHVrjMssATHuU16Zhz+2dYiirz35HxQarZqDrFMHr0raJbl8kqSqaIWp+ xsoaaNgyfNFi/IIkQJohEvRZYF15/XWVq+BFFzRE+we1gctAUCU3Gk15kX1fGUssD4eW HC6okZO6VdtgdeJGHR6p4dbbeyAdGsMHjE5IyjyVLuyj39GrgeLuKFdXXG+vawWPULAr s9J+7LXyZ2KNa3DCF4K7pMvFxOy/zu9c3uDgOAjR2ixM3sqPOAmjOz6JQG1OuZohUGDb NOsNhUkL8OCd9cfoBEpXALvQcO8dDnZR4ivYzx4VzYH9wRHQVPy4BFs4TJkIk/1HmT3b 5dMg== X-Gm-Message-State: AOAM531SZVjpEnAkt20a3kQg4hR4ZAycq8gn3qlhCcxDSuAAWlSy5BBa 6KSSy7lUCJ1dXCdNum8CrqQPTPzQQMk= X-Google-Smtp-Source: ABdhPJwpMR7nagoOry6ZjipA1XQPe/awsiedqf+Z13FhYzClm6XhqOcB+u+3TApFJDVu4BxN2DNb2w== X-Received: by 2002:a1c:b604:: with SMTP id g4mr4929090wmf.145.1614193071318; Wed, 24 Feb 2021 10:57:51 -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: Craig Janeczek , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Richard Henderson , Aurelien Jarno Subject: [PATCH v4 06/12] target/mips: Pass instruction opcode to decode_opc_mxu() Date: Wed, 24 Feb 2021 19:57:00 +0100 Message-Id: <20210224185706.3293058-7-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210224185706.3293058-1-f4bug@amsat.org> References: <20210224185706.3293058-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