qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "K. Richard Pixley" <rich.pixley@palmsource.com>
To: Martin Guy <martinwguy@yahoo.it>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu vs gcc4
Date: Mon, 23 Oct 2006 10:41:44 -0700	[thread overview]
Message-ID: <453CFED8.2020402@palmsource.com> (raw)
In-Reply-To: <56d259a00610230116p33e13e32i9b82f1e8f0871f27@mail.gmail.com>

Martin Guy wrote:
>> Now, gcc4 can produce code with several return instructions (with no
>> option to turn that of, as far as I understand). You cannot cut them 
>> out,
>> and therefore you cannot chain the simple functions.
>
> ...unless you also map return instructions within the generated
> functions into branches to the soon-to-be-dropped final "return"? Not
> that I know anything about qemu internals mind u... 
Seems to me one could also map them into jumps to a null function.

Although, all told, it would seem to me that what might be called for 
here is a new gcc target.  A gcc target specifically for generating qemu 
code.  That would just simply generate whatever qemu wanted for function 
postamble.

It would probably mean separating out the code intended to run as native 
code from the code intended to run on behalf of the emulated target, and 
it would mean that you'd need a "gcc-qemu" to build the latter, but it 
would solve the problem permanently.  It could also then be done in a 
cpu independent fashion such that any gcc target port might be converted 
trivially into a gcc target-for-qemu port.  This should also make the 
chaining task much simpler and since that would seem to need to be done 
at run time, this could easily be a performance enhancement as well.

I see two real downsides to this approach.  The first is that qemu 
becomes wed to gcc.  That seems to be a defacto requirement now, but 
using a custom gcc target would make that marriage pretty permanent.  
Creating qemu targets for other compilers would be near impossible, 
although if the code were properly separated, you could still use a 
non-gcc target for the intended-for-host instructions.

The second downside is that some of the qemu support stuff would no 
longer be in the qemu code distribution.  Instead, it would be in gcc.  
This opens the possiblity for version slew problems and authority over 
maintenance issues in the long term.  Administratively, it'd be an 
additional load.

--rich

  parent reply	other threads:[~2006-10-23 17:42 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-20 18:53 [Qemu-devel] qemu vs gcc4 K. Richard Pixley
2006-10-22 22:06 ` Johannes Schindelin
2006-10-23  8:16   ` Martin Guy
2006-10-23 12:20     ` Paul Brook
2006-10-23 13:59       ` Avi Kivity
2006-10-23 14:10         ` Paul Brook
2006-10-23 14:28           ` Avi Kivity
2006-10-23 14:31             ` Paul Brook
2006-10-23 14:35               ` Avi Kivity
2006-10-23 17:41     ` K. Richard Pixley [this message]
2006-10-23 17:58       ` Paul Brook
2006-10-23 18:04         ` K. Richard Pixley
2006-10-23 18:20           ` Laurent Desnogues
2006-10-23 18:37           ` Paul Brook
2006-10-24 23:39             ` Rob Landley
2006-10-25  0:24               ` Paul Brook
2006-10-25 19:39                 ` Rob Landley
2006-10-26 18:09                   ` Daniel Jacobowitz
2006-10-31 16:53             ` Rob Landley
2006-10-31 19:02               ` Paul Brook
2006-10-31 20:41                 ` Rob Landley
2006-10-31 22:08                   ` Paul Brook
2006-10-31 22:31                     ` Laurent Desnogues
2006-10-31 23:00                       ` Paul Brook
2006-11-01  0:00                     ` Rob Landley
2006-11-01  0:29                       ` Paul Brook
2006-11-01  1:51                         ` Rob Landley
2006-11-01  3:22                           ` Paul Brook
2006-11-01 16:34                             ` Rob Landley
2006-11-01 17:01                               ` Paul Brook
2006-10-31 23:17                 ` Rob Landley
2006-11-01  0:01                   ` Paul Brook
2006-10-30  4:35         ` Rob Landley
2006-10-30 14:56           ` Paul Brook
2006-10-30 16:31             ` Rob Landley
2006-10-30 16:50               ` Paul Brook
2006-10-30 22:54                 ` Stephen Torri
2006-10-30 23:13                   ` Paul Brook
2006-10-23  1:27 ` Rob Landley
2006-10-23  1:44   ` Paul Brook
2006-10-23  1:45   ` Johannes Schindelin
2006-10-23 17:53     ` K. Richard Pixley
2006-10-23 18:08     ` Rob Landley

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=453CFED8.2020402@palmsource.com \
    --to=rich.pixley@palmsource.com \
    --cc=martinwguy@yahoo.it \
    --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 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).