Received: from eggs.gnu.org ([209.51.188.92]:46008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBJhQ-0007MN-JZ for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:43:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBJhO-0006zW-PE for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:43:35 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:33588 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 1hBJhO-0006wZ-70 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:43:34 -0400 From: Mateja Marjanovic Date: Tue, 2 Apr 2019 15:43:20 +0200 Message-Id: <1554212605-16457-1-git-send-email-mateja.marjanovic@rt-rk.com> Subject: [Qemu-devel] [PATCH v4 0/5] target/mips: Fix support for MSA instructions on a big endian host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net, amarkovic@wavecomp.com, arikalo@wavecomp.com From: Mateja Marjanovic Fix support for MSA instructions while executing QEMU on a machine that uses big endian MIPS CPU. This is achieved by changing the implementation of helpers for MSA instructions ST., LD., INSERT. (and D on MIPS64), COPY_S. (and D on MIPS64) and COPY_U. (and W on MIPS64). Instead of using a switch in a helper, which is called many times, put a switch in translate.c file, which is called only a few times and change the value of the index if a host is a big endian machine. v4: - Change the alignment, so it looks cleaner. - Change the commit messages and cover letter, so they are more understandable. v3: - Unroll loops in ST. and LD. instructions. - Eliminate macro that generates the helpers for the ST. and LD. instructions, and add four helpers for each (for byte, halfword, word and doubleword). - Eliminate the helpers for INSERT., COPY_S. and COPY_U. and add four (three in case of COPY_U) helpers for each one. v2: - Eliminate unreachable code in COPY_U. - Add preprocessing conditionals (if host is MIPS64, check that case) in COPY_U., INSERT.. Mateja Marjanovic (5): target/mips: Fix MSA instructions LD. on big endian host target/mips: Fix MSA instructions ST. on big endian host target/mips: Refactor and fix COPY_S. instructions target/mips: Refactor and fix COPY_U. instructions target/mips: Refactor and fix INSERT. instructions target/mips/helper.h | 16 +- target/mips/msa_helper.c | 182 ++++++++++++++++------- target/mips/op_helper.c | 376 ++++++++++++++++++++++++++++++++++++++++++----- target/mips/translate.c | 59 +++++++- 4 files changed, 533 insertions(+), 100 deletions(-) -- 2.7.4