anssi.hannula at gmail.com
Sun Apr 27 15:02:41 CDT 2008
Roderick Colenbrander wrote:
> Maarten wrote:
>> A lot of the lowest level stuff is currently missing. If you don't
>> mind x64 assembly it's not impossible to do. We would need support
>> from gcc for the windows calling convention, and making it possible to
>> mix linux calling convention with windows calling convention. If you
>> are up to it just make it ignore the error for now, even if it causes
>> errors. A proof of concept "Hello, world!" would be a great
>> accomplishment at this point.
> These days there is a 64bit version of mingw (mingw64 or so it is called).
> They must have patches to add the calling convention to gcc now. I'm not
> sure what the status is on merging the changes back but I think nothing
> forbids you from building gcc from their sources. I have no idea whether
> having the calling convention is enough for Wine.
The changes have been applied to gcc trunk, about a year ago IIRC.
Regarding mixing conventions, I had the following discussion with the
developer who implemented the convention in gcc (I didn't pursue the
matter further, though):
Kai Tietz wrote:
> Anssi Hannula <anssi.hannula at gmail.com> wrote on 26.05.2007 13:03:38:
>> However, as the Wine project needs to support running win64 binaries on
>> x86_64 Linux platforms, we need to able to specify MS ABI in
>> per-function basis as we call linux functions as well.
>> I.e. we'd need something like __attribute__(__msvccall__) to specify the
>> functions that need to have MS ABI calling convention, even when the gcc
>> target is not x86_64 mingw.
>> Do you think this is possible and/or if it would hard to implement?
> This shouldn't be very hard to do. In i386.c, where the ABI specific
> calling conventions are done, it can be introduced easily by using an
> attribute modifier to choose between the different calling conventions
More information about the wine-devel