From nobody Tue Feb 10 19:49:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) client-ip=209.85.221.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1634511219; cv=none; d=zohomail.com; s=zohoarc; b=TUYiDA+bq3CmRqVGij6UxrEViSuRFv7/RoZoNRlqmwhwCQ4R4smdbnMasO7GgAXU9WBmflH91RpJaiWaqsFwsuRinSnOECY5LUwKr0sRJQThC7kkz+HaZ05Ec0GvLKTwtSm+BKtLWYIGw9rSyI+aEP6drXssImyuzIZwNifo++I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634511219; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=E7ZOWz1dqlyuDuaBH4MOae8nY6kvv2jHAcqCGnp8bCU=; b=IRXJE/7K4Lj7o55zT7/6HOWaCotAQYeDM3kT7y/VPKMTtS4J+OZNg3ky7Xt7RtpEvHcnHZL9MGPeMXBL57ZfZCokJotGhipNsk5I3OEwZnTrTlZ8scfPPSEiEPZ2A69SkPI3E6FwP6VH7qpDCnX1VKOkHk/zf7sOtD2RBbPgrXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.zohomail.com with SMTPS id 1634511219132238.73243600675994; Sun, 17 Oct 2021 15:53:39 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id r7so37874288wrc.10 for ; Sun, 17 Oct 2021 15:53:38 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (213.red-81-36-146.dynamicip.rima-tde.net. [81.36.146.213]) by smtp.gmail.com with ESMTPSA id v3sm11035849wrg.23.2021.10.17.15.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 15:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E7ZOWz1dqlyuDuaBH4MOae8nY6kvv2jHAcqCGnp8bCU=; b=GLkhx14j8yQC1rw4qmvomPHcyZ9v8dJ9LdsoupN8IXdIuxDPwF4l4CX/Nx1Mk2zmsH 150ygLCC/4be7CplfAyf+JbQ7IdYI4p44AEo8c7whH8onwvQjWSzkXh+E3vhigAhSqdO 2HrMEQ51UD3SE4F6vzyHFybtSemuYF8wjb9wh9vkvbtMsi/3bWCPOp0K5tV/HhEUZgbD nM/MSHPJFhq+4JYd2BNdDZ89CN78zA4PmZ22VdSOdKTVjii96Fv23Tcck3a5lH1Ecyx6 ht0grXQRf0LOXkMhUk5ErMuIkcAp4xh22ZdBrZgTYq8Asi/waqt7Q+sdgxd6lNRKr2jY xQTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=E7ZOWz1dqlyuDuaBH4MOae8nY6kvv2jHAcqCGnp8bCU=; b=XW7iKcQSUQGavnrc6sOr+XerdoAdoUBW+uKjxZlw7SiHvb5LV+Dkrwv/N6d+i0TP56 Of90sje4XLwL9pSyPXlr/pj0fo2FJsDgX/hry4CljKSYe5ezLDmwRSA1KGMyn5ve5LPp 5TWO55Bb2P51dcnkRVk2vggP6P8KkE9WHoTy80z/E9zUBxgMxYB0YPi27fy2tmeqwH5U 5fUFEDEW058MKJgrb8M/pks4hBe6S+LUuGFq0xo0W1cEW0blKx765ABjuBu1+x9nx47h g71dky3oSAkvTzLaZWV45aU4MwIkPf74f0HYxAe5oMPLxN/O9BDM73vtGTOM4WsFfdrZ eN2w== X-Gm-Message-State: AOAM532g1z8+Gde7K+bGh1jz5AqVV8+9koCnEIsH948P780ljkIcVOZs 5Gzc6eaT6h8hoblZbDhUshM= X-Google-Smtp-Source: ABdhPJzx9hldujAUa8dVJlq5IHwVOvAonR5lXX6CYHOs+rvgwYiYvuOrJTYHvyEYi9/X5c24WF36jg== X-Received: by 2002:adf:a455:: with SMTP id e21mr30657937wra.232.1634511217399; Sun, 17 Oct 2021 15:53:37 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paul Burton , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Huacai Chen , Jiaxun Yang , Richard Henderson Subject: [PULL 10/17] target/mips: Use explicit extract32() calls in gen_msa_i5() Date: Mon, 18 Oct 2021 00:52:38 +0200 Message-Id: <20211017225245.2618892-11-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211017225245.2618892-1-f4bug@amsat.org> References: <20211017225245.2618892-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) X-ZM-MESSAGEID: 1634511221217100001 We already use sextract32(), use extract32() for completeness instead of open-coding it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20211003175743.3738710-7-f4bug@amsat.org> --- target/mips/tcg/msa_translate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translat= e.c index e107cad57ee..3ef912da6b8 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c @@ -473,15 +473,12 @@ static void gen_msa_i8(DisasContext *ctx) static void gen_msa_i5(DisasContext *ctx) { #define MASK_MSA_I5(op) (MASK_MSA_MINOR(op) | (op & (0x7 << 23))) - uint8_t df =3D (ctx->opcode >> 21) & 0x3; int8_t s5 =3D (int8_t) sextract32(ctx->opcode, 16, 5); - uint8_t u5 =3D (ctx->opcode >> 16) & 0x1f; - uint8_t ws =3D (ctx->opcode >> 11) & 0x1f; - uint8_t wd =3D (ctx->opcode >> 6) & 0x1f; + uint8_t u5 =3D extract32(ctx->opcode, 16, 5); =20 - TCGv_i32 tdf =3D tcg_const_i32(df); - TCGv_i32 twd =3D tcg_const_i32(wd); - TCGv_i32 tws =3D tcg_const_i32(ws); + TCGv_i32 tdf =3D tcg_const_i32(extract32(ctx->opcode, 21, 2)); + TCGv_i32 twd =3D tcg_const_i32(extract32(ctx->opcode, 11, 5)); + TCGv_i32 tws =3D tcg_const_i32(extract32(ctx->opcode, 6, 5)); TCGv_i32 timm =3D tcg_temp_new_i32(); tcg_gen_movi_i32(timm, u5); =20 --=20 2.31.1