qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/11] Move user emulator stuff from cpu-exec.c


From: Blue Swirl
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

On Tue, May 17, 2011 at 5:52 PM, Peter Maydell <address@hidden> wrote:
> On 14 May 2011 20:36, Blue Swirl <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]