On Mon, Feb 13, 2012 at 23:41, Richard Henderson <r...@twiddle.net> wrote: > On 02/13/2012 12:13 PM, Blue Swirl wrote: >> Blue Swirl (6): >> TCG: split i386 and x86_64 >> TCG: clean up i386 and x86_64 > > I object to these. I do NOT think splitting these makes the code base > as a whole any cleaner.
Currently there is a lot of #ifdeffery and conditional code with if (TCG_TARGET_LONG_BITS == 64) etc., these would be avoided. The "EAX equals RAX" magic is not so nice either. I think the end result for individual files is much cleaner than original. I see your global code base view though. Maybe it would be better to introduce a shared file like x86_common.c, #included by both i386 and x86_64. > Is this really just about the differences wrt the softmmu templates? > Surely that can be handled without duping the entire host port... Splitting is not really needed from the AREG0 point of view. It was more useful when I was still trying with the regparm(3) approach, then the #ifdef/if() jungle become a confusing mess during my attempts. With the standard stack based approach for i386, the code paths are more separated. By the way, it could be possible to extract and extend the regparm(3) change and switch to always using the stack based calling convention (eliminate REGPARM), before AREG0 patches. Then the performance effect could be measured for just this change.