From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525782722527.5121857610228; Mon, 25 Mar 2019 07:56:22 -0700 (PDT) Received: from localhost ([127.0.0.1]:43773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R1I-0006B8-FM for importer@patchew.org; Mon, 25 Mar 2019 10:56:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Qz9-0004qZ-DL for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qz8-0003vH-8E for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:59 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:47553 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 1h8Qz7-0003bU-RG for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id D97AC1A2078; Mon, 25 Mar 2019 15:52:54 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id B32F11A1F81; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:40 +0100 Message-Id: <1553525566-14913-2-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 1/7] target/mips: Fix . MSA instructions for MIPS big endian host X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic Load and store MSA instructions when executed on a MIPS big endian CPU, didn't change the endianness, and were behaving like on little endian. Signed-off-by: Mateja Marjanovic --- target/mips/op_helper.c | 79 ++++++++++++++++++++++++++++++++++-----------= ---- 1 file changed, 55 insertions(+), 24 deletions(-) diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c index 0f272a5..5441ab2 100644 --- a/target/mips/op_helper.c +++ b/target/mips/op_helper.c @@ -4371,18 +4371,37 @@ FOP_CONDN_S(sne, (float32_lt(fst1, fst0, &env->act= ive_fpu.fp_status) #define MEMOP_IDX(DF) #endif =20 -#define MSA_LD_DF(DF, TYPE, LD_INSN, ...) \ -void helper_msa_ld_ ## TYPE(CPUMIPSState *env, uint32_t wd, \ - target_ulong addr) \ -{ \ - wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ - wr_t wx; \ - int i; \ - MEMOP_IDX(DF) \ - for (i =3D 0; i < DF_ELEMENTS(DF); i++) { \ - wx.TYPE[i] =3D LD_INSN(env, addr + (i << DF), ##__VA_ARGS__); \ - } \ - memcpy(pwd, &wx, sizeof(wr_t)); \ +#if defined(HOST_WORDS_BIGENDIAN) + bool big_endian =3D 1; +#else + bool big_endian =3D 0; +#endif + +#define MSA_LD_DF(DF, TYPE, LD_INSN, ...) = \ +void helper_msa_ld_ ## TYPE(CPUMIPSState *env, uint32_t wd, = \ + target_ulong addr) = \ +{ = \ + wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); = \ + wr_t wx; = \ + int i, k; = \ + MEMOP_IDX(DF) = \ + if (!big_endian) { = \ + for (i =3D 0; i < DF_ELEMENTS(DF); i++) { = \ + wx.TYPE[i] =3D LD_INSN(env, addr + (i << DF), ##__VA_ARGS__); = \ + } = \ + } else { = \ + for (i =3D 0; i < DF_ELEMENTS(DF); i++) { = \ + if (i < DF_ELEMENTS(DF) / 2) { = \ + k =3D DF_ELEMENTS(DF) / 2 - i - 1; = \ + wx.TYPE[i] =3D LD_INSN(env, addr + (k << DF), ##__VA_ARGS_= _); \ + } else { = \ + k =3D 3 * DF_ELEMENTS(DF) / 2 - i - 1; = \ + wx.TYPE[i] =3D LD_INSN(env, addr + (k << DF), ##__VA_ARGS_= _); \ + } = \ + } = \ + } = \ + = \ + memcpy(pwd, &wx, sizeof(wr_t)); = \ } =20 #if !defined(CONFIG_USER_ONLY) @@ -4417,18 +4436,30 @@ static inline void ensure_writable_pages(CPUMIPSSta= te *env, #endif } =20 -#define MSA_ST_DF(DF, TYPE, ST_INSN, ...) \ -void helper_msa_st_ ## TYPE(CPUMIPSState *env, uint32_t wd, \ - target_ulong addr) \ -{ \ - wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ - int mmu_idx =3D cpu_mmu_index(env, false); \ - int i; \ - MEMOP_IDX(DF) \ - ensure_writable_pages(env, addr, mmu_idx, GETPC()); \ - for (i =3D 0; i < DF_ELEMENTS(DF); i++) { \ - ST_INSN(env, addr + (i << DF), pwd->TYPE[i], ##__VA_ARGS__); \ - } \ +#define MSA_ST_DF(DF, TYPE, ST_INSN, ...) = \ +void helper_msa_st_ ## TYPE(CPUMIPSState *env, uint32_t wd, = \ + target_ulong addr) = \ +{ = \ + wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); = \ + int mmu_idx =3D cpu_mmu_index(env, false); = \ + int i, k; = \ + MEMOP_IDX(DF) = \ + ensure_writable_pages(env, addr, mmu_idx, GETPC()); = \ + if (!big_endian) { = \ + for (i =3D 0; i < DF_ELEMENTS(DF); i++) { = \ + ST_INSN(env, addr + (i << DF), pwd->TYPE[i], ##__VA_ARGS__); = \ + } = \ + } else { = \ + for (i =3D 0; i < DF_ELEMENTS(DF); i++) { = \ + if (i < DF_ELEMENTS(DF) / 2) { = \ + k =3D DF_ELEMENTS(DF) / 2 - i - 1; = \ + ST_INSN(env, addr + (k << DF), pwd->TYPE[i], ##__VA_ARGS__= ); \ + } else { = \ + k =3D 3 * DF_ELEMENTS(DF) / 2 - i - 1; = \ + ST_INSN(env, addr + (k << DF), pwd->TYPE[i], ##__VA_ARGS__= ); \ + } = \ + } = \ + } = \ } =20 #if !defined(CONFIG_USER_ONLY) --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525783003947.0158754468915; Mon, 25 Mar 2019 07:56:23 -0700 (PDT) Received: from localhost ([127.0.0.1]:43775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R1K-0006Bs-Ri for importer@patchew.org; Mon, 25 Mar 2019 10:56:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Qz9-0004qX-4K for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qz8-0003v8-4R for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:59 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:47562 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 1h8Qz7-0003bV-Qy for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id E4C811A1F81; Mon, 25 Mar 2019 15:52:54 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id C6EA01A200A; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:41 +0100 Message-Id: <1553525566-14913-3-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 2/7] target/mips: Fix copy_s. for MIPS big endian host X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic Signed element copy from MSA registers to GPR when executed on a MIPS big endian CPU, didn't pick the right element, and was behaving like on little endian. Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 421dced..012f373 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1435,6 +1435,13 @@ void helper_msa_copy_s_df(CPUMIPSState *env, uint32_= t df, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D DF_ELEMENTS(df); +#if defined(HOST_WORDS_BIGENDIAN) + if (n < DF_ELEMENTS(df) / 2) { + n =3D DF_ELEMENTS(df) / 2 - n - 1; + } else { + n =3D 3 * DF_ELEMENTS(df) / 2 - n - 1; + } +#endif =20 switch (df) { case DF_BYTE: --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525952012847.0647793068379; Mon, 25 Mar 2019 07:59:12 -0700 (PDT) Received: from localhost ([127.0.0.1]:43801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R48-0000c8-Vn for importer@patchew.org; Mon, 25 Mar 2019 10:59:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8QzD-0004so-SR for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8QzD-0003xg-1O for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:03 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:47566 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 1h8QzC-0003ba-PY for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:02 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id F01981A20B6; Mon, 25 Mar 2019 15:52:54 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id CF7E81A200B; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:42 +0100 Message-Id: <1553525566-14913-4-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 3/7] target/mips: Fix copy_u. for MIPS big endian host X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic Unsigned element copy from MSA registers to GPR when executed on a MIPS big endian CPU, didn't pick the right element, and was behaving like on little endian. Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 012f373..8caf186 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1467,6 +1467,13 @@ void helper_msa_copy_u_df(CPUMIPSState *env, uint32_= t df, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D DF_ELEMENTS(df); +#if defined(HOST_WORDS_BIGENDIAN) + if (n < DF_ELEMENTS(df) / 2) { + n =3D DF_ELEMENTS(df) / 2 - n - 1; + } else { + n =3D 3 * DF_ELEMENTS(df) / 2 - n - 1; + } +#endif =20 switch (df) { case DF_BYTE: --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525776392542.3703755313849; Mon, 25 Mar 2019 07:56:16 -0700 (PDT) Received: from localhost ([127.0.0.1]:43770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R1C-00064l-1y for importer@patchew.org; Mon, 25 Mar 2019 10:56:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Qz9-0004qY-4i for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qz8-0003uw-2O for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:59 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:47570 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 1h8Qz7-0003bf-Pc for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 07C021A200A; Mon, 25 Mar 2019 15:52:55 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id D8ADA1A2067; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:43 +0100 Message-Id: <1553525566-14913-5-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 4/7] target/mips: Fix insert. for MIPS big endian host X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic Inserting from GPR to an element in a MSA register when executed on a MIPS big endian CPU, didn't pick the right element, and was behaving like on little endian. Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 8caf186..ac5d41e 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1500,6 +1500,13 @@ void helper_msa_insert_df(CPUMIPSState *env, uint32_= t df, uint32_t wd, { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); target_ulong rs =3D env->active_tc.gpr[rs_num]; +#if defined(HOST_WORDS_BIGENDIAN) + if (n < DF_ELEMENTS(df) / 2) { + n =3D DF_ELEMENTS(df) / 2 - n - 1; + } else { + n =3D 3 * DF_ELEMENTS(df) / 2 - n - 1; + } +#endif =20 switch (df) { case DF_BYTE: --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525947576898.227338454384; Mon, 25 Mar 2019 07:59:07 -0700 (PDT) Received: from localhost ([127.0.0.1]:43799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R42-0000WE-FZ for importer@patchew.org; Mon, 25 Mar 2019 10:59:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8QzA-0004qk-Am for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qz9-0003w0-BT for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:00 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:50305 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 1h8Qz9-0003vO-1s for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:59 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 175DD1A2067; Mon, 25 Mar 2019 15:52:55 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id E1A0C1A206F; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:44 +0100 Message-Id: <1553525566-14913-6-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 5/7] target/mips: Eliminate unreachable case for MSA instructions copy_u X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic The copy_u instruction doesn't support doublewords, and supports words only if the CPU is MIPS64 [1] (page 138), for MIPS32 it supports only byte and halfword [2] (page 138). [1] MIPS Architecture for Programmers Volume IV-j: The MIPS64 SIMD Architecture Module [2] MIPS Architecture for Programmers Volume IV-j: The MIPS32 SIMD Architecture Module Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index ac5d41e..f368f79 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1482,13 +1482,10 @@ void helper_msa_copy_u_df(CPUMIPSState *env, uint32= _t df, uint32_t rd, case DF_HALF: env->active_tc.gpr[rd] =3D (uint16_t)env->active_fpu.fpr[ws].wr.h[= n]; break; +#ifdef TARGET_MIPS64 case DF_WORD: env->active_tc.gpr[rd] =3D (uint32_t)env->active_fpu.fpr[ws].wr.w[= n]; break; -#ifdef TARGET_MIPS64 - case DF_DOUBLE: - env->active_tc.gpr[rd] =3D (uint64_t)env->active_fpu.fpr[ws].wr.d[= n]; - break; #endif default: assert(0); --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525781482991.3031592652521; Mon, 25 Mar 2019 07:56:21 -0700 (PDT) Received: from localhost ([127.0.0.1]:43777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R1L-0006Ct-Om for importer@patchew.org; Mon, 25 Mar 2019 10:56:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8QzA-0004qj-7o for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qz9-0003vs-8u for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:00 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:50303 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 1h8Qz9-0003vM-0j for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:53:59 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 17CA31A20C6; Mon, 25 Mar 2019 15:52:55 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id EA9251A20A4; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:45 +0100 Message-Id: <1553525566-14913-7-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 6/7] target/mips: Eliminate unreachable case for MSA instructions insert X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic The insert instruction doesn't support doublewords for MIPS32 [2] (page 223), but MIPS64 supports doubleword [1] (page 224). [1] MIPS Architecture for Programmers Volume IV-j: The MIPS64 SIMD Architecture Module [2] MIPS Architecture for Programmers Volume IV-j: The MIPS32 SIMD Architecture Module Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index f368f79..5aea675 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1515,9 +1515,11 @@ void helper_msa_insert_df(CPUMIPSState *env, uint32_= t df, uint32_t wd, case DF_WORD: pwd->w[n] =3D (int32_t)rs; break; +#ifdef TARGET_MIPS64 case DF_DOUBLE: pwd->d[n] =3D (int64_t)rs; break; +#endif default: assert(0); } --=20 2.7.4 From nobody Tue May 21 02:12:56 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553525952723110.25349159920108; Mon, 25 Mar 2019 07:59:12 -0700 (PDT) Received: from localhost ([127.0.0.1]:43803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8R49-0000d2-OY for importer@patchew.org; Mon, 25 Mar 2019 10:59:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8QzF-0004u1-6K for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8QzE-0003yJ-Al for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:05 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:50463 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 1h8QzE-0003xo-2K for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:54:04 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 203B21A206F; Mon, 25 Mar 2019 15:52:55 +0100 (CET) Received: from rtrkw310-lin.domain.local (rtrkw310-lin.domain.local [10.10.13.97]) by mail.rt-rk.com (Postfix) with ESMTPSA id 00EEB1A20CB; Mon, 25 Mar 2019 15:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Mateja Marjanovic To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 15:52:46 +0100 Message-Id: <1553525566-14913-8-git-send-email-mateja.marjanovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553525566-14913-1-git-send-email-mateja.marjanovic@rt-rk.com> References: <1553525566-14913-1-git-send-email-mateja.marjanovic@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 v2 7/7] target/mips: Eliminate unreachable case for MSA instructions fill X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Mateja Marjanovic The fill instruction doesn't support doublewords for MIPS32 [2] (page 178), but MIPS64 supports doubleword [1] (page 179). [1] MIPS Architecture for Programmers Volume IV-j: The MIPS64 SIMD Architecture Module [2] MIPS Architecture for Programmers Volume IV-j: The MIPS32 SIMD Architecture Module Signed-off-by: Mateja Marjanovic --- target/mips/msa_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 5aea675..655148d 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -1649,11 +1649,13 @@ void helper_msa_fill_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, pwd->w[i] =3D (int32_t)env->active_tc.gpr[rs]; } break; +#ifdef TARGET_MIPS64 case DF_DOUBLE: for (i =3D 0; i < DF_ELEMENTS(DF_DOUBLE); i++) { pwd->d[i] =3D (int64_t)env->active_tc.gpr[rs]; } break; +#endif default: assert(0); } --=20 2.7.4