qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 01/11] Move user emulator stuff from cpu-exec.c to user-exec.c
Date: Tue, 17 May 2011 22:46:21 +0300	[thread overview]
Message-ID: <BANLkTikE4giYMpLz+kVX4t8buUCVEekRwg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikWkPu8NBEUAAjtyw33G8RyJuwKKw@mail.gmail.com>

On Tue, May 17, 2011 at 5:52 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 14 May 2011 20:36, Blue Swirl <blauwirbel@gmail.com> wrote:
>
>> +#if defined(__i386__)
>
>> +#elif defined(__x86_64__)
>
>> +#elif defined(_ARCH_PPC)
>
>> +#elif defined(__alpha__)
>
>> +#elif defined(__sparc__)
>
>> +#elif defined(__arm__)
>
>> +#elif defined(__mc68000)
>
>> +#elif defined(__ia64)
>
>> +#elif defined(__s390__)
>
>> +#elif defined(__mips__)
>
>> +#elif defined(__hppa__)
>
> ...if we're moving this code about anyway would it be possible
> to split the per-host-arch specific code out into separate files?
> I find these source files with enormous ifdef ladders pretty hard
> to read.

There are two problems which the #ifdeffery tackles: how to get PC
from signal state (OS dependent, also arch dependent) and how to
determine whether the access was a write (arch dependent).

Splitting by arch would not help much, but would it make sense to
split by OS and push the pieces to each user emulator? The arch
dependent but OS independent stuff for is_write could be moved to some
common .h file.

      reply	other threads:[~2011-05-17 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14 19:36 [Qemu-devel] [PATCH 01/11] Move user emulator stuff from cpu-exec.c to user-exec.c Blue Swirl
2011-05-17 14:40 ` Richard Henderson
2011-05-17 14:52 ` Peter Maydell
2011-05-17 19:46   ` Blue Swirl [this message]

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=BANLkTikE4giYMpLz+kVX4t8buUCVEekRwg@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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).