[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions |
Date: |
Tue, 12 May 2015 00:25:59 -0700 |
On Mon, May 11, 2015 at 3:39 AM, Paolo Bonzini <address@hidden> wrote:
>
>
> On 11/05/2015 12:36, Andreas Färber wrote:
>> > Right. My point was that these functions are not polymorphic. Each
>> > call to these should know exactly which function to call.
>> >
>> > cputlb.c, cpu-exec.c and parts of translate-all.c should be the moral
>> > equivalent of C++ templates. I wouldn't mind switching to C++, but if
>> > we want to make them polymorphic we should do it at compile time through
>> > multiple compilation and/or inclusion from target-*.
>>
>> I think we got more concrete than that, possibly on IRC only? I believe
>> #include'ing cputlb.c from some target-* file was one of your proposed
>> solutions?
>
> Yes (but Peter is making more functions virtual, so he'd have to do the
> same also for cpu-exec.c and parts of translate-all.c).
>
>> And splitting some of the inline functions that I was getting
>> rid of into some new (or existing?) file?
>
> If I remember correctly, another solution could be to keep the virtual
> functions, but ensure that all the hot paths were "devirtualizing" them
> and calling the CPU-specific function directly.
>
What does this mean exactly? Is there still a common code for cputlb.c
and friends?
Regards,
Peter
> Paolo
>
- [Qemu-devel] [RFC PATCH 10/34] HACK: microblaze: rename clz helper, (continued)
- [Qemu-devel] [RFC PATCH 10/34] HACK: microblaze: rename clz helper, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 05/34] mb: cpu: Delete MMAP_SHIFT definition, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 07/34] mb: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 03/34] target-multi: Add, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 01/34] cpu-all: Prototype cpu_exec and cpu_signal_handler, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions, Peter Crosthwaite, 2015/05/11
- Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions, Richard Henderson, 2015/05/11
- Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions, Peter Crosthwaite, 2015/05/12
- Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions, Richard Henderson, 2015/05/12
Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions, Peter Maydell, 2015/05/11
[Qemu-devel] [RFC PATCH 04/34] mb: Change target long to 64b, Peter Crosthwaite, 2015/05/11
Re: [Qemu-devel] [RFC PATCH 00/34] Multi Architecture System Emulation, Peter Maydell, 2015/05/11