From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <rth@twiddle.net>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [RFC PATCH v3 0/6] translate: [tcg] Generic translation framework
Date: Tue, 27 Dec 2016 16:37:11 +0100 [thread overview]
Message-ID: <148285303159.12721.5833400768046299304.stgit@fimbulvetr.bsc.es> (raw)
This series proposes a generic (target-agnostic) instruction translation
framework.
It basically provides a generic main loop for instruction disassembly, which
calls target-specific functions when necessary. This generalization makes
inserting new code in the main loop easier, and helps in keeping all targets in
synch as to the contents of it.
This series also paves the way towards adding events to trace guest code
execution (BBLs and instructions).
I've ported i386/x86-64 and arm/aarch64 as an example to see how it fits in the
current organization, but will port the rest when this series gets merged.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
Changes in v3
=============
* Rebase on 0737f32daf.
Changes in v2
=============
* Port ARM and AARCH64 targets.
* Fold single-stepping checks into "max_insns" [Richard Henderson].
* Move instruction start marks to target code [Richard Henderson].
* Add target hook for TB start.
* Check for TCG temporary leaks.
* Move instruction disassembly into a target hook.
* Make breakpoint_hit() return an enum to accomodate target's needs (ARM).
Lluís Vilanova (6):
Pass generic CPUState to gen_intermediate_code()
queue: Add macro for incremental traversal
target: [tcg] Add generic translation framework
target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*)
target: [tcg,i386] Port to generic translation framework
target: [tcg,arm] Port to generic translation framework
include/exec/exec-all.h | 13 -
include/exec/gen-icount.h | 2
include/exec/translate-all_template.h | 76 +++
include/qemu/queue.h | 5
include/qom/cpu.h | 21 +
target-alpha/translate.c | 11 -
target-arm/translate-a64.c | 348 ++++++++--------
target-arm/translate.c | 718 +++++++++++++++++----------------
target-arm/translate.h | 41 +-
target-cris/translate.c | 20 -
target-i386/translate.c | 304 ++++++--------
target-lm32/translate.c | 22 +
target-m68k/translate.c | 18 -
target-microblaze/translate.c | 22 +
target-mips/translate.c | 15 -
target-moxie/translate.c | 14 -
target-openrisc/translate.c | 22 +
target-ppc/translate.c | 15 -
target-s390x/translate.c | 16 -
target-sh4/translate.c | 15 -
target-sparc/translate.c | 11 -
target-tilegx/translate.c | 7
target-tricore/translate.c | 9
target-unicore32/translate.c | 20 -
target-xtensa/translate.c | 13 -
translate-all.c | 2
translate-all_template.h | 202 +++++++++
27 files changed, 1128 insertions(+), 854 deletions(-)
create mode 100644 include/exec/translate-all_template.h
create mode 100644 translate-all_template.h
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
next reply other threads:[~2016-12-27 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 15:37 Lluís Vilanova [this message]
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 1/6] Pass generic CPUState to gen_intermediate_code() Lluís Vilanova
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 2/6] queue: Add macro for incremental traversal Lluís Vilanova
2016-12-27 15:53 ` Peter Maydell
2016-12-27 19:07 ` Lluís Vilanova
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 3/6] target: [tcg] Add generic translation framework Lluís Vilanova
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 4/6] target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*) Lluís Vilanova
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 5/6] target: [tcg, i386] Port to generic translation framework Lluís Vilanova
2016-12-27 15:37 ` [Qemu-devel] [PATCH v3 6/6] target: [tcg, arm] " Lluís Vilanova
2016-12-27 16:07 ` [Qemu-devel] [RFC PATCH v3 0/6] translate: [tcg] Generic " no-reply
2016-12-27 19:08 ` Lluís Vilanova
2016-12-27 16:10 ` no-reply
2016-12-27 19:09 ` Lluís Vilanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=148285303159.12721.5833400768046299304.stgit@fimbulvetr.bsc.es \
--to=vilanova@ac.upc.edu \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.