All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: jhoger@pobox.com, qemu-devel@nongnu.org
Subject: Re: Removing GCC dependency, was Re: [Qemu-devel] get_func() hangs with gcc 3.4.2 on MinGW and WinXP host
Date: Tue, 21 Dec 2004 00:30:08 +0100	[thread overview]
Message-ID: <41C76080.3000707@bellard.org> (raw)
In-Reply-To: <1103565756.18531.838.camel@aragorn>

John R. Hogerhuis wrote:
> On Mon, 2004-12-20 at 07:16, Johannes Schindelin wrote:
> 
>>Hi,
>>
>>Wow, that was a detailed explanation. I do understand your points now. I
>>guess that the path QEmu takes will be the path that the first one writing
>>a proof-of-concept takes...
> 
> 
> Well I thought I'd put the idea out there for discussion. The path QEMU
> takes will be whichever one Fabrice decides is best, of course.

I made tests with QEMU and gcc 3.4.2 and I saw no problems (the macro 
FORCE_RET() in op.c is there to ensure that gcc does not generate ret 
inside a micro op. Moreover, -fno-reorder-blocks is used). Can someone 
give precise examples of bugs with gcc 3.4.2 ?

If we really cannot find a way to trick the next gcc versions, then 
progressively switching to a hand coded code generator is the solution I 
suggest. Using '.s' sources will be more complicated.

I always thought the current 'dyngen' solution as a temporary one 
because it enabled a fast developpement of QEMU as the expense of 
performance (this is relative of course, QEMU is already quite fast and 
usable). But if we want better performances and better... portability 
(in the sense that we are not tied to a specific GCC version), then a 
hand coded code generator is the only way to go.

The priority for the hand coded code generation should be:

1) helper calls with constant parameters or temporary parameters. It is 
very important to get better performances because on some archs (e.g. 
ppc), the current scheme is not efficient at all.

2) conditionnal jumps. These are the points that newer gccs may not 
compile correctly.

3) constant loads.

4) simple operations (all arithmetic and logic between temporaries)

5) memory accesses.

Those points are easy to implement and would give a good speed up. The 
important point is that such a transition can be made progressively by 
using specific micro operations indexes.

Fabrice.

  reply	other threads:[~2004-12-20 23:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 13:47 [Qemu-devel] get_func() hangs with gcc 3.4.2 on MinGW and WinXP host tomba
2004-12-15 14:18 ` Johannes Schindelin
2004-12-15 14:59   ` tomba
2004-12-15 23:45     ` Jim C. Brown
2004-12-15 23:52       ` Johannes Schindelin
2004-12-17 18:56         ` Juergen Lock
2004-12-18  0:09           ` Johannes Schindelin
2004-12-18  4:04             ` Jim C. Brown
2004-12-18 14:59               ` Johannes Schindelin
2004-12-18 15:50                 ` Jim C. Brown
2004-12-19 14:25                   ` Johannes Schindelin
2004-12-19 22:57                     ` Jim C. Brown
2004-12-18 21:07                 ` John R. Hogerhuis
2004-12-18 21:59                   ` Jim C. Brown
2004-12-19 14:45                   ` Johannes Schindelin
2004-12-20  6:26                     ` John R. Hogerhuis
2004-12-20 15:16                       ` Removing GCC dependency, was " Johannes Schindelin
2004-12-20 18:02                         ` John R. Hogerhuis
2004-12-20 23:30                           ` Fabrice Bellard [this message]
2004-12-21 14:36                             ` [Qemu-devel] Testing with Win2k SP3 and Win2kSP4 Elefterios Stamatogiannakis
2004-12-21 15:23                             ` [Qemu-devel] Re: Removing GCC dependency Paul Brook
2004-12-21 15:36                               ` Herbert Poetzl
2004-12-19 22:13           ` [Qemu-devel] get_func() hangs with gcc 3.4.2 on MinGW and WinXP host Fabrice Bellard
2004-12-19 22:29             ` Johannes Schindelin
2004-12-20  3:31               ` Rob Browning
2004-12-20 18:57                 ` John R. Hogerhuis
2005-01-17 14:16                   ` CMinusMins, was " Johannes Schindelin
2005-01-17 15:36                     ` malc
2005-01-17 15:53                       ` Jim C. Brown
2005-01-17 16:13                         ` OCAML, was " Mark A. Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41C76080.3000707@bellard.org \
    --to=fabrice@bellard.org \
    --cc=jhoger@pobox.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.