From nobody Mon Feb 9 13:24:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) client-ip=209.85.221.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1633220705; cv=none; d=zohomail.com; s=zohoarc; b=d+Uqa68ZH/siCnS5yRz2SRnyXjGs2n9XMKMdB7LgtnB1KQlcLs0M9m4LS4TUPQ4+U0h5y25MduOG3aeG6V+s+3d9woyEx6dyxfAfhdDwd15s/Nt7bXA93WmfhcArWq2VlB7YQrJMdZBQ2y4ayYVKpM8dU7Ev4zf0XVlWEvK4JkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633220705; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=bHLBIM+b4jIVlcHZ7FsZZyBCDk6uMDEA7gC0gz8KNOE=; b=Ydug62rEaEvd+5ra5pl4knlJkpOUA4bcSqnd5nYyzulbmzr0zmlIDiEsreK/3ArjQ8sYBs7yjeTSYGh31AU9OhcJbGByn8fWoTMGoBUzaO1blvtqbDfMlvWPrKgRxfBl7N3RehENLtRRuzOubCQ/P0aIsP+KKsP6pu3+zYBze48= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.zohomail.com with SMTPS id 1633220705856185.63994278035534; Sat, 2 Oct 2021 17:25:05 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id w29so22299667wra.8 for ; Sat, 02 Oct 2021 17:25:05 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id k26sm13314798wms.39.2021.10.02.17.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 17:25:03 -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:mime-version :content-transfer-encoding; bh=bHLBIM+b4jIVlcHZ7FsZZyBCDk6uMDEA7gC0gz8KNOE=; b=Fn7YeSQ/btjWYO+iTZl/cGY8udemiufA7WWgfQ+Z1Lcw6UyD7eHcwRe10yT0k4bhQE n0jtK3AnLqojdZh9Y2HylzPnhK0PYEfU821PhD2vrEyvEeWV84ojbxTtnqCHK2hNKS7R e85jKRIhg4E1OTrBYsEpUwBe6sQc1OI05TKJnbfPGWrU+gU9N07MwLnkVyk7VD/z66MW JPpMgOvOhZC9yGf39ZCMtJ7XpafCRNPmyNRP7Yd/Kmwiv7Qkjv8774KXUJQee5qgg5iU R9TPwlzPk0xdrjrXmYGqxbA/3QPOtTlj69TqwEPQ1qMGG7rsdeuvnzEu+yfH6ea8F55B vi+w== 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 :mime-version:content-transfer-encoding; bh=bHLBIM+b4jIVlcHZ7FsZZyBCDk6uMDEA7gC0gz8KNOE=; b=4mHWvVd8PbCh95bpbyVS1BXjpaMQw0AF70miXxX9VHx/uDwFszAg4iS0h42sqPH40x uig1pKGVcSv6oEK8lJ2twSk6osGl5fr1bJN8LBuPt1T3fxzlbLSSvs2xd2HFljNW/D8I 2JxfTbV/+4Qt6CCuGdWxGrReMbFhLJQLsAH2Eumz6G1c97CsYJtq4LMi+MVi5oDViw1Z 4kXUgLgGdsaRe35yZhumq/8uLGlG2YAfHqEdZ3kCxE7Ez1Dwy+wOAzBTVXVCCiku4ZBX KUdsKwzhWxmMF2nW7NmOG3V9h7vA48FHoVEb+Ll5EySDI1uq4y228BLwZPFfwDo1oAxU AikQ== X-Gm-Message-State: AOAM530tzoGYvugxv0+B8zCSaWWEU4cVUf/tslmE/AKGbD0ac2c2H0Hd eXPWaaEo0APSlRHYZvZyxY8= X-Google-Smtp-Source: ABdhPJwmuzQx4aa4AOv3ZEUmVGhra2cm6HWRWgd8VRIYDNsNw8BY/dI7+GwYYLDwPTkzScMdxLgtAQ== X-Received: by 2002:adf:e0cc:: with SMTP id m12mr5771100wri.62.1633220704111; Sat, 02 Oct 2021 17:25:04 -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: Jiaxun Yang , Aurelien Jarno , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] target/mips: Remove unused register from MSA 2R/2RF instruction format Date: Sun, 3 Oct 2021 02:25:01 +0200 Message-Id: <20211003002501.3598540-1-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 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: 1633220708600100001 MSA 2R/2RF instructions don't use any target vector register. Remove the unused TCG temporaries. Fixes: cbe50b9a8e7 ("target-mips: add MSA VEC/2R format instructions") Fixes: 3bdeb68866e ("target-mips: add MSA 2RF format instructions") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/tcg/msa_translate.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translat= e.c index 8170a8df26b..ee6424126f7 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c @@ -1942,13 +1942,11 @@ static void gen_msa_2r(DisasContext *ctx) { #define MASK_MSA_2R(op) (MASK_MSA_MINOR(op) | (op & (0x1f << 21)) | \ (op & (0x7 << 18))) - uint8_t wt =3D (ctx->opcode >> 16) & 0x1f; uint8_t ws =3D (ctx->opcode >> 11) & 0x1f; uint8_t wd =3D (ctx->opcode >> 6) & 0x1f; uint8_t df =3D (ctx->opcode >> 16) & 0x3; TCGv_i32 twd =3D tcg_const_i32(wd); TCGv_i32 tws =3D tcg_const_i32(ws); - TCGv_i32 twt =3D tcg_const_i32(wt); TCGv_i32 tdf =3D tcg_const_i32(df); =20 switch (MASK_MSA_2R(ctx->opcode)) { @@ -2018,7 +2016,6 @@ static void gen_msa_2r(DisasContext *ctx) =20 tcg_temp_free_i32(twd); tcg_temp_free_i32(tws); - tcg_temp_free_i32(twt); tcg_temp_free_i32(tdf); } =20 @@ -2026,13 +2023,11 @@ static void gen_msa_2rf(DisasContext *ctx) { #define MASK_MSA_2RF(op) (MASK_MSA_MINOR(op) | (op & (0x1f << 21)) | \ (op & (0xf << 17))) - uint8_t wt =3D (ctx->opcode >> 16) & 0x1f; uint8_t ws =3D (ctx->opcode >> 11) & 0x1f; uint8_t wd =3D (ctx->opcode >> 6) & 0x1f; uint8_t df =3D (ctx->opcode >> 16) & 0x1; TCGv_i32 twd =3D tcg_const_i32(wd); TCGv_i32 tws =3D tcg_const_i32(ws); - TCGv_i32 twt =3D tcg_const_i32(wt); /* adjust df value for floating-point instruction */ TCGv_i32 tdf =3D tcg_const_i32(df + 2); =20 @@ -2089,7 +2084,6 @@ static void gen_msa_2rf(DisasContext *ctx) =20 tcg_temp_free_i32(twd); tcg_temp_free_i32(tws); - tcg_temp_free_i32(twt); tcg_temp_free_i32(tdf); } =20 --=20 2.31.1