[PATCH 1/2] msvcrt: Back up and restore the FPU state in setjmp/longjmp on arm

Martin Storsjö martin at martin.st
Fri Sep 8 13:56:31 CDT 2017


On Fri, 8 Sep 2017, Alexandre Julliard wrote:

> Martin Storsjö <martin at martin.st> writes:
>
>> FWIW, such a build without support for the VFP registers isn't ABI
>> compatible with modern armv7 windows, since modern armv7 windows is
>> hardfloat (passes float arguments in FPU registers). But I guess it's
>> useful as a winelib build anyway.
>
> We'd definitely want to support running Windows binaries. It sounds like
> this would require a function attribute to specify the calling
> convention.

Yes - __attribute__((pcs("aapcs-vfp"))) seems to be what would be 
required. I've only tested wine in hardfloat linux environments, which is 
why I haven't thought about the issue until now.

However, in the build configuration you're running, where VFP instructions 
aren't allowed at all, this wouldn't work. You'd need to build with at 
least -mfloat-abi=softfp, which keeps the same softfloat ABI as default, 
but allows using floating point instructions within functions, and also 
allows switching to hardfloat ABI selectively per function.

Doing that, your build effectively targets/requires armeabi-v7a, in 
android NDK terms. You can't support the windows ABI within a plain armv5 
armeabi build.

// Martin


More information about the wine-devel mailing list