From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhbZo-0001Dz-Gk for qemu-devel@nongnu.org; Thu, 01 Oct 2015 06:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhbZl-0005MP-Ah for qemu-devel@nongnu.org; Thu, 01 Oct 2015 06:59:04 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:33040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhbZl-0005M7-4Q for qemu-devel@nongnu.org; Thu, 01 Oct 2015 06:59:01 -0400 From: James Hogan Date: Thu, 1 Oct 2015 11:58:44 +0100 Message-ID: <1443697130-21431-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 0/6] tcg/mips: Minimal R6 support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: James Hogan , Leon Alrae , Aurelien Jarno , Richard Henderson This patchset adds minimal MIPS r6 host support to TCG. The first two patches are things I've noticed along the way, and are independent of the other patches. Patches 3-6 add R6 awareness to the most important operations, such that instructions removed in R6 don't get emitted. This seems to be enough to get a MIPS Linux guest booting on a MIPSr6 host (such as QEMU or I6400). There are no doubt other improvements that could be made to better utilise new R6 instruction encodings, but that can wait until a later patchset. The R6 changes are basically: - Patch 4: Don't use the MIPSr5 JR encoding (r6 uses JALR with rd=zero). - Patch 5: Don't use LO/HI registers, instead using the new multiply/divide encodings, which map nicely to TCG ops anyway. - Patch 6: Don't use MOVN/MOVZ instructions. Instead use SELEQZ/SELNEZ. Changes in v2: - Patch 4: Turn #define into enum (Richard). - Patch 5: Use a common OPC_MUL definition. use_mips32_instructions will always be 1 for MIPS r6 builds (Richard) - Combine with patch 6 & 7 from v1, and drop functional changes to movcond implementation pre-r6. We now provide different constraints for movcond depending on presence of r6. (thanks Richard for feedback). - Add Richard's Reviewed-by to patches 1, 3, 4. James Hogan (6): tcg-opc.h: Simplify debug_insn_start def disas/mips: Add R6 jr/jr.hb to disassembler tcg/mips: Add use_mips32r6_instructions definition tcg/mips: Support r6 JR encoding tcg/mips: Support r6 multiply/divide encodings tcg/mips: Support r6 SEL{NE,EQ}Z instead of MOVN/MOVZ disas/mips.c | 2 ++ tcg/mips/tcg-target.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++----- tcg/mips/tcg-target.h | 11 +++++-- tcg/tcg-opc.h | 12 +++---- 4 files changed, 94 insertions(+), 18 deletions(-) Cc: Aurelien Jarno Cc: Richard Henderson Cc: Leon Alrae -- 2.4.9