clean-ups?
Now when QEMU is getting more and more targets (x86, arm and soon PPC), isn't it maybe time to do some clean-ups of the code and maybe move target-specifics into subdirectories (/i386, /arm, /ppc, ...) and give the genric code some work to make it more target-independent?
I'm very pedantic when it comes to the look of the code, and I really don't like #ifdefs for targets in the generic code.
Fabrice, what do you say? Maybe QEMU has come to the phase where it is time to let go of the feature hunting for some minutes, and let the code mature? I would hate to see QEMU grow into a unmaintainable monster.
Signature · 4 lines
Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Queens of the Stone Age - regular john
Quoted 11 lines · Johan Rydberg
Now when QEMU is getting more and more targets (x86, arm and soon PPC),
isn't it maybe time to do some clean-ups of the code and maybe move target-specifics into subdirectories (/i386, /arm, /ppc, ...) and give the genric code some work to make it more target-independent?I'm very pedantic when it comes to the look of the code, and I really don't like #ifdefs for targets in the generic code.
Fabrice, what do you say? Maybe QEMU has come to the phase where it is time to let go of the feature hunting for some minutes, and let the code mature? I would hate to see QEMU grow into a unmaintainable monster.
Suppressing all #ifdefs (in particular in cpu-exec.c) will be impossible. But I agree that in many cases it is possible. An important point I want to solve is how to build for several target CPUs at once (it is very important for easier regression testing). My current idea is to build qemu several times and to output object files in separate directories (for example the target specifics ones you mention). Then you will have several executables: qemu-i386, qemu-arm, qemu-ppc in the main directory.
Fabrice.
Fabrice Bellard <[email protected]> wrote:
: Suppressing all #ifdefs (in particular in cpu-exec.c) will be : impossible.
I can not see why so much target-dependent function must be put in cpu-exec.c. I see, for example, no need for the cpu_x86_load_seg. That could as easily be put in a target-dependent file.
Almost everything target-dependent can be defined and put in a target header, in similar way that GCC, GDB and other GNU utils does it. And instead of testing for target, you may test for the perticular feature. The preprocessor is very handy, as I know you know.
: But I agree that in many cases it is possible. An important : point I want to solve is how to build for several target CPUs at once : (it is very important for easier regression testing). My current idea is : to build qemu several times and to output object files in separate : directories (for example the target specifics ones you mention). Then : you will have several executables: qemu-i386, qemu-arm, qemu-ppc in the : main directory.
I would like to see you crack that nut in a nice manner. :) Maybe it is just better to write some script that does several different builds and does the testing.
: Fabrice.
Signature · 4 lines
Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing The Supermen Lovers - Starlight