qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] AREG0 patches v5
@ 2012-02-13 20:13 Blue Swirl
  2012-02-13 23:41 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2012-02-13 20:13 UTC (permalink / raw)
  To: qemu-devel, Aurelien Jarno

Hello,

In this version I used a different approach to x86. Splitting TCG i386
and x86_64 makes the code much cleaner. Then instead of regparm(3)
calling convention with register passing, I use standard stack based
version.

Both i386 and x86_64 hosts work with both Sparc32 and Sparc64 guests.

I haven't made performance tests yet, I need to find a setup with
better S/N. Test reports welcome.

Patches 1 and 2 could be committed separately if there are no objections.

URL	git://repo.or.cz/qemu/blueswirl.git
	http://repo.or.cz/r/qemu/blueswirl.git

Blue Swirl (6):
  TCG: split i386 and x86_64
  TCG: clean up i386 and x86_64
  softmmu templates: optionally pass CPUState to memory access
    functions
  TCG: add 5 arg helpers to def-helper.h
  Sparc: avoid AREG0 for memory access helpers
  Sparc: avoid AREG0 wrappers for memory access helpers

 MAINTAINERS                |    5 +
 Makefile.target            |   12 +-
 configure                  |    9 +-
 cpu-all.h                  |    9 +
 def-helper.h               |   26 +
 exec-all.h                 |    2 +
 exec.c                     |    4 +
 osdep.h                    |    2 +-
 softmmu_defs.h             |   28 +
 softmmu_header.h           |   60 ++-
 softmmu_template.h         |   82 ++-
 target-sparc/cpu.h         |    3 +-
 target-sparc/helper.h      |   20 +-
 target-sparc/ldst_helper.c |  415 ++++++-----
 target-sparc/op_helper.c   |   74 --
 target-sparc/translate.c   |   62 +-
 tcg/arm/tcg-target.c       |   53 ++
 tcg/hppa/tcg-target.c      |   44 ++
 tcg/i386/tcg-target.c      |  757 ++++++---------------
 tcg/i386/tcg-target.h      |   52 +--
 tcg/ia64/tcg-target.c      |   46 ++
 tcg/mips/tcg-target.c      |   44 ++
 tcg/ppc/tcg-target.c       |   45 ++
 tcg/ppc64/tcg-target.c     |   44 ++
 tcg/s390/tcg-target.c      |   44 ++
 tcg/sparc/tcg-target.c     |   50 ++-
 tcg/tci/tcg-target.c       |    6 +
 tcg/x86_64/tcg-target.c    | 1651 ++++++++++++++++++++++++++++++++++++++++++++
 tcg/x86_64/tcg-target.h    |  107 +++
 29 files changed, 2813 insertions(+), 943 deletions(-)
 delete mode 100644 target-sparc/op_helper.c
 create mode 100644 tcg/x86_64/tcg-target.c
 create mode 100644 tcg/x86_64/tcg-target.h

-- 
1.7.9

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] AREG0 patches v5
  2012-02-13 20:13 [Qemu-devel] [PATCH 0/6] AREG0 patches v5 Blue Swirl
@ 2012-02-13 23:41 ` Richard Henderson
  2012-02-14 11:38   ` Andreas Färber
  2012-02-14 18:54   ` Blue Swirl
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Henderson @ 2012-02-13 23:41 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Aurelien Jarno

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.

Is this really just about the differences wrt the softmmu templates?
Surely that can be handled without duping the entire host port...


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] AREG0 patches v5
  2012-02-13 23:41 ` Richard Henderson
@ 2012-02-14 11:38   ` Andreas Färber
  2012-02-14 17:01     ` Richard Henderson
  2012-02-14 18:54   ` Blue Swirl
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2012-02-14 11:38 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Blue Swirl, qemu-devel, Aurelien Jarno

Am 14.02.2012 00:41, schrieb Richard Henderson:
> 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.
> 
> Is this really just about the differences wrt the softmmu templates?
> Surely that can be handled without duping the entire host port...

FWIW ppc and ppc64 use different directories, too.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] AREG0 patches v5
  2012-02-14 11:38   ` Andreas Färber
@ 2012-02-14 17:01     ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2012-02-14 17:01 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Blue Swirl, qemu-devel, Aurelien Jarno

On 02/14/2012 03:38 AM, Andreas Färber wrote:
> Am 14.02.2012 00:41, schrieb Richard Henderson:
>> 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.
>>
>> Is this really just about the differences wrt the softmmu templates?
>> Surely that can be handled without duping the entire host port...
> 
> FWIW ppc and ppc64 use different directories, too.

I know.  I've offered to clean those up for malc too, but he declined.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] AREG0 patches v5
  2012-02-13 23:41 ` Richard Henderson
  2012-02-14 11:38   ` Andreas Färber
@ 2012-02-14 18:54   ` Blue Swirl
  2012-02-14 19:39     ` Richard Henderson
  1 sibling, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2012-02-14 18:54 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, Aurelien Jarno

On Mon, Feb 13, 2012 at 23:41, Richard Henderson <rth@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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] AREG0 patches v5
  2012-02-14 18:54   ` Blue Swirl
@ 2012-02-14 19:39     ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2012-02-14 19:39 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Aurelien Jarno

On 02/14/2012 10:54 AM, Blue Swirl wrote:
> 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.

That sounds like a worthwhile split.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-14 19:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 20:13 [Qemu-devel] [PATCH 0/6] AREG0 patches v5 Blue Swirl
2012-02-13 23:41 ` Richard Henderson
2012-02-14 11:38   ` Andreas Färber
2012-02-14 17:01     ` Richard Henderson
2012-02-14 18:54   ` Blue Swirl
2012-02-14 19:39     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).