Wine Emulation: Swapping functions

Alexandre Julliard julliard at
Tue Aug 24 15:50:10 CDT 2004

"Pierre d'Herbemont" <stegefin at> writes:

> Hi Alexandre,
> This patch allows to load a PE exe to memory. You may notice that
> there is no "mass" byte swapping. The technics used here is a bit
> developer here:
> You might prefer a more conventional way of doing the byte swapping,
> in this case tell me. We might still need this approach since it could
> efficient for sharing data accross the LE exe and the BE winelib.

It doesn't seem very efficient to trap on every memory access...
Besides, I don't see how this can possibly work, there is no guarantee
that the compiler is going to generate accesses that always match the
size of the requested type, memcpy() being the obvious example.

I think you are going in the wrong direction with this; the right way
IMO is to compile Wine for x86 and run the whole Wine+app under the
CPU emulator. Otherwise you'll have to write wrappers for each of the
15,000 APIs.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list