All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/14] tcg/sparc v8plus code generation
@ 2014-03-17 18:37 Richard Henderson
  2014-03-17 18:37 ` [Qemu-devel] [PATCH 01/14] tcg: Fix missed pointer size != TCG_TARGET_REG_BITS changes Richard Henderson
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Richard Henderson @ 2014-03-17 18:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, aurelien

Our 32-bit build for sparc has been requiring a 64-bit capable chip
for about 2 years now, by way of requiring move-conditional and LE
memory instructions.  But we've mostly been generating 32-bit code
otherwise.

This patch set changes things so that we make full use of the cpu.

The sparcv8plus code model requires that 64-bit data be kept only
in the %g and %o registers.  These are saved by the kernel in full
64-bit slots somewhere.  Whereas the %i and %l registers are saved
via the register window mechanism, and as part of the 32-bit ABI
we've only allocated 32-bits of stack for storing these.  Since the
register window can roll at any time, due to signals and interrupts,
we must consider the high bits of %i and %l to be garbage.

This implies that we must treat 32-bit and 64-bit quantities differently.
For the most part, TCG is good with that.  The one case where that falls
down, however, is when we frob data between widths.  Thus the addition
of the trunc_i32 opcode.

This new opcode, or something like it, would have been required if
we ever got around to supporting MIPS64 code generation, where 32-bit
quantities must remain sign-extended in the 64-bit register at all times.

In the case of sparcv8plus, we can get what we need out of the opcode
merely by setting its register constraints properly.


r~


Richard Henderson (14):
  tcg: Fix missed pointer size != TCG_TARGET_REG_BITS changes
  tcg: Add INDEX_op_trunc_i32
  tcg-sparc: Remove most uses of TCG_TARGET_REG_BITS
  tcg-sparc: Support trunc_i32
  tcg-sparc: Use 64-bit registers with sparcv8plus
  tcg-sparc: Use the RETURN instruction
  tcg-sparc: Implement muls2_i32
  tcg-sparc: Tidy check_fit_* tests
  tcg-sparc: Don't handle mov/movi in tcg_out_op
  tcg-sparc: Hoist common argument loads in tcg_out_op
  tcg-sparc: Fixup function argument types
  tcg-sparc: Fix small 32-bit movi
  tcg-sparc: Fix 32-bit constant arguments tests
  tcg-sparc: Accept stores of zero

 include/exec/def-helper.h |   2 +-
 tcg/README                |   5 +
 tcg/aarch64/tcg-target.h  |   1 +
 tcg/i386/tcg-target.h     |   1 +
 tcg/ia64/tcg-target.h     |   1 +
 tcg/optimize.c            |  16 +
 tcg/ppc64/tcg-target.h    |   1 +
 tcg/s390/tcg-target.h     |   1 +
 tcg/sparc/tcg-target.c    | 903 ++++++++++++++++++++--------------------------
 tcg/sparc/tcg-target.h    |  21 +-
 tcg/tcg-op.h              |  54 ++-
 tcg/tcg-opc.h             |   4 +
 tcg/tcg.c                 |  45 ++-
 tcg/tcg.h                 |   1 +
 tcg/tci/tcg-target.h      |   1 +
 15 files changed, 503 insertions(+), 554 deletions(-)

-- 
1.8.5.3

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

end of thread, other threads:[~2014-03-22 17:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 18:37 [Qemu-devel] [PATCH 00/14] tcg/sparc v8plus code generation Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 01/14] tcg: Fix missed pointer size != TCG_TARGET_REG_BITS changes Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 02/14] tcg: Add INDEX_op_trunc_i32 Richard Henderson
2014-03-21 23:35   ` Stuart Brady
2014-03-21 23:39     ` Stuart Brady
2014-03-17 18:37 ` [Qemu-devel] [PATCH 03/14] tcg-sparc: Remove most uses of TCG_TARGET_REG_BITS Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 04/14] tcg-sparc: Support trunc_i32 Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 05/14] tcg-sparc: Use 64-bit registers with sparcv8plus Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 06/14] tcg-sparc: Use the RETURN instruction Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 07/14] tcg-sparc: Implement muls2_i32 Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 08/14] tcg-sparc: Tidy check_fit_* tests Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 09/14] tcg-sparc: Don't handle mov/movi in tcg_out_op Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 10/14] tcg-sparc: Hoist common argument loads " Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 11/14] tcg-sparc: Fixup function argument types Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 12/14] tcg-sparc: Fix small 32-bit movi Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 13/14] tcg-sparc: Fix 32-bit constant arguments tests Richard Henderson
2014-03-22  9:48   ` Stuart Brady
2014-03-22 17:08     ` Richard Henderson
2014-03-17 18:37 ` [Qemu-devel] [PATCH 14/14] tcg-sparc: Accept stores of zero Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.