Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-11 Thread Lluís Vilanova
Claudio Fontana writes: > Clearly late to the party, > On 08.04.2016 22:14, Paolo Bonzini wrote: >> >> On 08/04/2016 15:15, Markus Armbruster wrote: On the other hand, minimal usage of templates instead of some of the preprocessor gunk we have would be a very good thing IMNSHO. I am

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-10 Thread Claudio Fontana
Clearly late to the party, On 08.04.2016 22:14, Paolo Bonzini wrote: > > On 08/04/2016 15:15, Markus Armbruster wrote: >>> On the other hand, minimal usage of templates instead of some of the >>> preprocessor gunk we have would be a very good thing IMNSHO. I am >>> referring to the multiply

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-08 Thread Paolo Bonzini
On 08/04/2016 15:15, Markus Armbruster wrote: > > On the other hand, minimal usage of templates instead of some of the > > preprocessor gunk we have would be a very good thing IMNSHO. I am > > referring to the multiply included header files and to the macros with > > type arguments (mostly QOM

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-08 Thread Markus Armbruster
Paolo Bonzini writes: > On 07/04/2016 16:49, Peter Maydell wrote: >> > QOM to C++ classes >> I suspect if you looked at this you'd find that the QOM semantics >> for various things don't map onto C++ (ie that we have more runtime >> flexibility than C++ does). > > True, but

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-07 Thread Paolo Bonzini
On 07/04/2016 16:49, Peter Maydell wrote: > > QOM to C++ classes > I suspect if you looked at this you'd find that the QOM semantics > for various things don't map onto C++ (ie that we have more runtime > flexibility than C++ does). True, but you don't have to use it. :) If your code is

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-07 Thread Peter Maydell
On 3 April 2016 at 14:05, Lluís Vilanova wrote: > QOM to C++ classes I suspect if you looked at this you'd find that the QOM semantics for various things don't map onto C++ (ie that we have more runtime flexibility than C++ does). This is just vaguely remembered from

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-07 Thread Markus Armbruster
Lluís Vilanova writes: > Markus Armbruster writes: > >> Peter Maydell writes: >> [...] >>> if we move away from C I'd rather >>> it to be a language that's nicer than C rather than one that's >>> uglier and larger and still retains all of C's

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-03 Thread Lluís Vilanova
Markus Armbruster writes: > Peter Maydell writes: > [...] >> if we move away from C I'd rather >> it to be a language that's nicer than C rather than one that's >> uglier and larger and still retains all of C's flaws. > Seconded strongly. Just curious. Do we agree

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-14 Thread Lluís Vilanova
KONRAD Frederic writes: > 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

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 13:23, KONRAD Frederic wrote: >> 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

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-14 Thread KONRAD Frederic
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

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-14 Thread Lluís Vilanova
Markus Armbruster writes: > Peter Maydell writes: > [...] >> if we move away from C I'd rather >> it to be a language that's nicer than C rather than one that's >> uglier and larger and still retains all of C's flaws. > Seconded strongly. I don't feel like that about

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-14 Thread Markus Armbruster
Peter Maydell writes: [...] > if we move away from C I'd rather > it to be a language that's nicer than C rather than one that's > uglier and larger and still retains all of C's flaws. Seconded strongly.

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-13 Thread Peter Maydell
On 13 March 2016 at 13:16, Lluís Vilanova wrote: > Peter Maydell writes: >> I would be more interested in a proposal to move parts of QEMU >> to Rust, or just about anything else except C++... > > QEMU is pretty low-level, so I'm not sure other languages will fit the bill as

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-13 Thread Lluís Vilanova
Peter Maydell writes: > On 10 March 2016 at 05:29, Lluís Vilanova wrote: >> Richard Henderson writes: >>> Alternately... can we broach the subject of C++? Honestly, it >>> seems we work too hard sometimes to re-implement templates and >>> classes in C. >> >> Whooo, I'd

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Peter Maydell
On 10 March 2016 at 05:29, Lluís Vilanova wrote: > Richard Henderson writes: >> Alternately... can we broach the subject of C++? Honestly, it >> seems we work too hard sometimes to re-implement templates and >> classes in C. > > Whooo, I'd really *love* to switch to C++ just

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Lluís Vilanova
Richard Henderson writes: > On 03/09/2016 01:16 PM, Lluís Vilanova wrote: >> Richard Henderson writes: >> >>> 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

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Richard Henderson
On 03/09/2016 01:16 PM, Lluís Vilanova wrote: Richard Henderson writes: 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

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Lluís Vilanova
Richard Henderson writes: > 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 >>

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Richard Henderson
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

[Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-03-09 Thread Lluís Vilanova
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