All of lore.kernel.org
 help / color / mirror / Atom feed
From: KONRAD Frederic <fred.konrad@greensocs.com>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)
Date: Mon, 14 Mar 2016 13:23:07 +0100	[thread overview]
Message-ID: <56E6AD2B.7060304@greensocs.com> (raw)
In-Reply-To: <56E046D3.2080709@twiddle.net>

Hi,

Le 09/03/2016 16:52, Richard Henderson a écrit :
> On 03/09/2016 09:38 AM, Lluís Vilanova wrote:
>> Hi,
>>
>> NOTE: I won't be throwing patches anytime soon, I just want to know 
>> if there's
>>        interest in this for the future.
>>
>> While adding events for tracing guest instructions, I've found that the
>> per-target "gen_intermediate_code()" function is very similar but not 
>> exactly
>> the same for each of the targets. This makes architecture-agnostic 
>> features
>> harder to maintain across targets, specially when it comes to their 
>> relative
>> order.
>>
>> So, would it be worth it if I generalized part of that code into an
>> architecture-agnostic function that calls into target-specific hooks 
>> wherever it
>> needs extending? There are many ways to do it that we can discuss later.
>
> It's worth talking about, since I do believe it would make long-term 
> maintenance across the targets easier.
>
> These "target-specific hooks" probably ought not be "hooks" in the
> traditional sense of attaching them to CPUState.  I'd be more 
> comfortable with a refactoring that used include files -- maybe .h or 
> maybe .inc.c.  If we do the normal sort of hook, then we've got to 
> either expose DisasContext in places we shouldn't, or dynamically 
> allocate it.  Neither seems particularly appealing.
>
>
> r~
>

On the other side I think attaching them to CPUState would make 
heterogenous system emulation easier?

Fred

  parent reply	other threads:[~2016-03-14 12:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 14:38 [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code) Lluís Vilanova
2016-03-09 15:52 ` Richard Henderson
2016-03-09 18:16   ` Lluís Vilanova
2016-03-09 18:54     ` Richard Henderson
2016-03-09 22:29       ` Lluís Vilanova
2016-03-09 23:27         ` Peter Maydell
2016-03-13 13:16           ` Lluís Vilanova
2016-03-13 16:25             ` Peter Maydell
2016-03-14  7:06               ` Markus Armbruster
2016-03-14 11:13                 ` Lluís Vilanova
2016-04-03 13:05                 ` Lluís Vilanova
2016-04-07 14:27                   ` Markus Armbruster
2016-04-07 14:49                   ` Peter Maydell
2016-04-07 15:01                     ` Paolo Bonzini
2016-04-08 13:15                       ` Markus Armbruster
2016-04-08 14:14                         ` Paolo Bonzini
2016-04-11  5:50                           ` Claudio Fontana
2016-04-11 13:11                             ` Lluís Vilanova
2016-03-14 12:23   ` KONRAD Frederic [this message]
2016-03-14 14:14     ` Paolo Bonzini
2016-03-14 14:26     ` 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=56E6AD2B.7060304@greensocs.com \
    --to=fred.konrad@greensocs.com \
    --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.