qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 0/9] tcg: improve size changing ops
@ 2015-07-15 11:03 Aurelien Jarno
  2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 1/9] tcg: rename trunc_shr_i32 into trunc_shr_i64_i32 Aurelien Jarno
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Aurelien Jarno @ 2015-07-15 11:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Aurelien Jarno, Richard Henderson

This patch set tries to improve the size changing ops in TCG, so that we
have a clean interface and a better view of how 32-bit and 64-bit values
are handled. I believe part of the code we have now are more band aid
than real fixes. The idea behind this patchset is that size changing ops
should be real ops and not implemented as mov or casting types, so that
we can distinguish them in the register allocator and the optimizer. It
however allow targets to override that and replace them by a mov in case
the target CPU already maintain values zero/sign extended.

It is currently only correct on x86, for other targets we have to review
and decide how to handle things (or be conservative and implement the 3
size changing ops). For x86 I have made the choice to implement
ext_i32_i64 and extu_i32_i64 as real ops and trunc_shr_i64_i32 as a mov
as it doesn't change the generated code. I believe it is also possible
to implement ext_i32_i64 and trunc_shr_i64_i32 as real ops and
extu_i32_i64 as a mov.

Note that it doesn't fix the qemu_ld/st issue reported by Leon Alrae.
Also note that this is definitely not 2.4 material, but I post it now
in the hope it helps to have a better view about how things are
currently handled.

Aurelien Jarno (9):
  tcg: rename trunc_shr_i32 into trunc_shr_i64_i32
  tcg: don't abuse TCG type in tcg_gen_trunc_shr_i64_i32
  tcg: implement real ext_i32_i64 and extu_i32_i64 ops
  tcg/optimize: add optimizations for ext_i32_i64 and extu_i32_i64 ops
  tcg/i386: implement ext_i32_i64 and extu_i32_i64 ops
  tcg/i386: document the way 32/64-bit conversions are handled
  tcg: replace ext/u_i32_i64 by a mov when not implemented
  tcg/optimize: do not simplify size changing moves
  tcg: update README about size changing ops

 tcg/README               | 17 ++++++++++++++---
 tcg/aarch64/tcg-target.h |  6 +++++-
 tcg/i386/tcg-target.c    |  5 +++++
 tcg/i386/tcg-target.h    | 11 ++++++++++-
 tcg/ia64/tcg-target.h    |  6 +++++-
 tcg/optimize.c           | 44 +++++++++++++++++++-------------------------
 tcg/ppc/tcg-target.h     |  7 ++++++-
 tcg/s390/tcg-target.h    |  6 +++++-
 tcg/sparc/tcg-target.c   |  4 ++--
 tcg/sparc/tcg-target.h   |  6 +++++-
 tcg/tcg-op.c             | 16 +++++++++++-----
 tcg/tcg-opc.h            |  7 +++++--
 tcg/tcg.h                |  2 +-
 tcg/tci/tcg-target.h     |  7 ++++++-
 14 files changed, 99 insertions(+), 45 deletions(-)

-- 
2.1.4

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

end of thread, other threads:[~2015-07-18 21:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 11:03 [Qemu-devel] [PATCH RFC 0/9] tcg: improve size changing ops Aurelien Jarno
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 1/9] tcg: rename trunc_shr_i32 into trunc_shr_i64_i32 Aurelien Jarno
2015-07-17  6:14   ` Richard Henderson
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 2/9] tcg: don't abuse TCG type in tcg_gen_trunc_shr_i64_i32 Aurelien Jarno
2015-07-17  6:14   ` Richard Henderson
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 3/9] tcg: implement real ext_i32_i64 and extu_i32_i64 ops Aurelien Jarno
2015-07-17  6:19   ` Richard Henderson
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 4/9] tcg/optimize: add optimizations for " Aurelien Jarno
2015-07-17  6:23   ` Richard Henderson
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 5/9] tcg/i386: implement " Aurelien Jarno
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 6/9] tcg/i386: document the way 32/64-bit conversions are handled Aurelien Jarno
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 7/9] tcg: replace ext/u_i32_i64 by a mov when not implemented Aurelien Jarno
2015-07-17  6:30   ` Richard Henderson
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 8/9] tcg/optimize: do not simplify size changing moves Aurelien Jarno
2015-07-17  6:38   ` Richard Henderson
2015-07-17 10:33     ` Aurelien Jarno
2015-07-18  7:24       ` Richard Henderson
2015-07-18 21:19         ` Aurelien Jarno
2015-07-15 11:03 ` [Qemu-devel] [PATCH RFC 9/9] tcg: update README about size changing ops Aurelien Jarno
2015-07-17  6:42   ` Richard Henderson

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).