qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/6] tcg/mips: Minimal R6 support
@ 2015-10-02 12:24 James Hogan
  2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 1/6] tcg-opc.h: Simplify debug_insn_start def James Hogan
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: James Hogan @ 2015-10-02 12:24 UTC (permalink / raw)
  To: qemu-devel; +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 v3:
- Patch 2: Whoops. Fix jr.hb r6 encoding (Leon)
- Patch 6: Switch to using bool eqz to indicate whether to use SELEQZ /
  MOVZ instead of SELNEZ / MOVN (Richard).
- Patch 6: Add tcg_debug_assert(v2 == ret) for pre-r6 case with comment
  to remind reader that it should be guaranteed via constraints
  (Richard).
- Add Richard's Reviewed-by to patch 2, 5, and Leon's to patch 2

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 | 90 ++++++++++++++++++++++++++++++++++++++++++++++-----
 tcg/mips/tcg-target.h | 11 +++++--
 tcg/tcg-opc.h         | 12 +++----
 4 files changed, 97 insertions(+), 18 deletions(-)

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
-- 
2.4.9

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-10-09 21:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 12:24 [Qemu-devel] [PATCH v3 0/6] tcg/mips: Minimal R6 support James Hogan
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 1/6] tcg-opc.h: Simplify debug_insn_start def James Hogan
2015-10-08 16:12   ` Aurelien Jarno
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 2/6] disas/mips: Add R6 jr/jr.hb to disassembler James Hogan
2015-10-08 16:12   ` Aurelien Jarno
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 3/6] tcg/mips: Add use_mips32r6_instructions definition James Hogan
2015-10-08 16:12   ` Aurelien Jarno
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 4/6] tcg/mips: Support r6 JR encoding James Hogan
2015-10-08 16:15   ` Aurelien Jarno
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 5/6] tcg/mips: Support r6 multiply/divide encodings James Hogan
2015-10-08 16:19   ` Aurelien Jarno
2015-10-02 12:24 ` [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ James Hogan
2015-10-07  9:46   ` Richard Henderson
2015-10-07 10:34     ` James Hogan
2015-10-07 19:54       ` Richard Henderson
2015-10-07 11:47     ` Leon Alrae
2015-10-08 16:32       ` Aurelien Jarno
2015-10-08 16:31   ` Aurelien Jarno
2015-10-09 21:26     ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).