[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 06:13:56 CDT 2017
On Fri, 8 Sep 2017, Alexandre Julliard wrote:
> Martin Storsjo <martin at martin.st> writes:
>
>> Signed-off-by: Martin Storsjo <martin at martin.st>
>> ---
>> dlls/msvcrt/except_arm.c | 22 ++++++++++++++++++++--
>> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> This doesn't build here with the Android NDK:
>
> arm-linux-androideabi-gcc -c -o except_arm.o ../../../wine/dlls/msvcrt/except_arm.c -I. -I../../../wine/dlls/msvcrt \
> -I../../include -I../../../wine/include -D__WINESRC__ -D_MT -D_MSVCR_VER=0 -D_REENTRANT -fPIC \
> -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \
> -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \
> -Wlogical-op -gdwarf-2 -gstrict-dwarf -g -O2 -fno-diagnostics-show-caret -D__ANDROID_API__=26 -marm
> {standard input}: Assembler messages:
> {standard input}:44: Error: selected processor does not support ARM mode `vmrs r2,fpscr'
Ok, that explains why this was left out so far.
Perhaps this should go within some ifdef, if I could just figure out the
right one. When testing with the NDK gcc, I seem to be able to assemble
this kind of instructions once I add -mfloat-abi=softfp, and when checking
the defines, the main difference seems to be that the __SOFTFP__ define
disappears. So within #ifndef __SOFTFP__, your build would still work.
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.
// Martin
More information about the wine-devel
mailing list