From nobody Tue Nov 11 05:03:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1561543766; cv=none; d=zoho.com; s=zohoarc; b=EycFEtBt6Gipqgdo6qLiNDStvtHlg9qzp7hBN241OnZoUIdWavoBGIFTL8tm/XR2HaL0g3W8uJC6Q5/TtwbvW8vSjHTOW+iWzNJA+Rq8R/WAY0CwY0N/chclGROS89yIn4x9+bdWu5eee1lQF+l/rcn8Ulg1kbrTxzbfK6GEUhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561543766; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=s2krsUDjz6tZkvpofzGFNSIHX4AVHoRQC9nnR34LtFA=; b=YjvgWjbahhs9XLjC9XCL1sMwYNHGrmjgTCRjjQeAYNE4jMyUkoGwDsnGDCtnwZqlFZD3CQWPWcKCUgi+LbHibki7DFNzk/CDKWHoee88Cw6WtuLAs9M8QliNnXtve5SQkMqFa3zvO2/t3JPk9mLQ9iH0Oa+87GpxVXXTyf8tkpI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156154376632991.49605296630546; Wed, 26 Jun 2019 03:09:26 -0700 (PDT) Received: from localhost ([::1]:38478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg4rl-0007ez-Ca for importer@patchew.org; Wed, 26 Jun 2019 06:09:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44806) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg4pp-00063w-GM for qemu-devel@nongnu.org; Wed, 26 Jun 2019 06:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hg4pn-0003P3-Vw for qemu-devel@nongnu.org; Wed, 26 Jun 2019 06:07:25 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:39496 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hg4pn-0003NS-Hr for qemu-devel@nongnu.org; Wed, 26 Jun 2019 06:07:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id EDCC61A21E9; Wed, 26 Jun 2019 12:07:20 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id BC78A1A2033; Wed, 26 Jun 2019 12:07:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 26 Jun 2019 12:07:09 +0200 Message-Id: <1561543629-20327-9-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561543629-20327-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1561543629-20327-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 8/8] target/mips: Fix big endian host behavior for interleave MSA instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Fix big endian host behavior for interleave MSA instructions. Previous fix used TARGET_WORDS_BIGENDIAN instead of HOST_WORDS_BIGENDIAN, which was a mistake. Signed-off-by: Aleksandar Markovic Reviewed-by: Aleksandar Rikalo --- target/mips/msa_helper.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 7a9bfb3..8bad636 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1737,7 +1737,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, =20 switch (df) { case DF_BYTE: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->b[8] =3D pws->b[9]; pwd->b[9] =3D pwt->b[9]; pwd->b[10] =3D pws->b[11]; @@ -1774,7 +1774,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, #endif break; case DF_HALF: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->h[4] =3D pws->h[5]; pwd->h[5] =3D pwt->h[5]; pwd->h[6] =3D pws->h[7]; @@ -1795,7 +1795,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, #endif break; case DF_WORD: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->w[2] =3D pws->w[3]; pwd->w[3] =3D pwt->w[3]; pwd->w[0] =3D pws->w[1]; @@ -1825,7 +1825,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, =20 switch (df) { case DF_BYTE: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->b[7] =3D pwt->b[6]; pwd->b[6] =3D pws->b[6]; pwd->b[5] =3D pwt->b[4]; @@ -1862,7 +1862,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, #endif break; case DF_HALF: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->h[3] =3D pwt->h[2]; pwd->h[2] =3D pws->h[2]; pwd->h[1] =3D pwt->h[0]; @@ -1883,7 +1883,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, #endif break; case DF_WORD: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->w[1] =3D pwt->w[0]; pwd->w[0] =3D pws->w[0]; pwd->w[3] =3D pwt->w[2]; @@ -1913,7 +1913,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, =20 switch (df) { case DF_BYTE: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->b[7] =3D pwt->b[15]; pwd->b[6] =3D pws->b[15]; pwd->b[5] =3D pwt->b[14]; @@ -1950,7 +1950,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, #endif break; case DF_HALF: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->h[3] =3D pwt->h[7]; pwd->h[2] =3D pws->h[7]; pwd->h[1] =3D pwt->h[6]; @@ -1971,7 +1971,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, #endif break; case DF_WORD: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->w[1] =3D pwt->w[3]; pwd->w[0] =3D pws->w[3]; pwd->w[3] =3D pwt->w[2]; @@ -2001,7 +2001,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, =20 switch (df) { case DF_BYTE: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->b[8] =3D pws->b[0]; pwd->b[9] =3D pwt->b[0]; pwd->b[10] =3D pws->b[1]; @@ -2038,7 +2038,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, #endif break; case DF_HALF: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->h[4] =3D pws->h[0]; pwd->h[5] =3D pwt->h[0]; pwd->h[6] =3D pws->h[1]; @@ -2059,7 +2059,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, #endif break; case DF_WORD: -#if defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) pwd->w[2] =3D pws->w[0]; pwd->w[3] =3D pwt->w[0]; pwd->w[0] =3D pws->w[1]; --=20 2.7.4