Martin Storsjo martin@martin.st writes:
Signed-off-by: Martin Storsjo martin@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' {standard input}:46: Error: selected processor does not support ARM mode `vstr d8,[r0,#0x30]' {standard input}:47: Error: selected processor does not support ARM mode `vstr d9,[r0,#0x38]' {standard input}:48: Error: selected processor does not support ARM mode `vstr d10,[r0,#0x40]' {standard input}:49: Error: selected processor does not support ARM mode `vstr d11,[r0,#0x48]' {standard input}:50: Error: selected processor does not support ARM mode `vstr d12,[r0,#0x50]' {standard input}:51: Error: selected processor does not support ARM mode `vstr d13,[r0,#0x58]' {standard input}:52: Error: selected processor does not support ARM mode `vstr d14,[r0,#0x60]' {standard input}:53: Error: selected processor does not support ARM mode `vstr d15,[r0,#0x68]' {standard input}:75: Error: selected processor does not support ARM mode `vmsr fpscr,r3' {standard input}:76: Error: selected processor does not support ARM mode `vldr d8,[r0,#0x30]' {standard input}:77: Error: selected processor does not support ARM mode `vldr d9,[r0,#0x38]' {standard input}:78: Error: selected processor does not support ARM mode `vldr d10,[r0,#0x40]' {standard input}:79: Error: selected processor does not support ARM mode `vldr d11,[r0,#0x48]' {standard input}:80: Error: selected processor does not support ARM mode `vldr d12,[r0,#0x50]' {standard input}:81: Error: selected processor does not support ARM mode `vldr d13,[r0,#0x58]' {standard input}:82: Error: selected processor does not support ARM mode `vldr d14,[r0,#0x60]' {standard input}:83: Error: selected processor does not support ARM mode `vldr d15,[r0,#0x68]' Makefile:311: recipe for target 'except_arm.o' failed
On Fri, 8 Sep 2017, Alexandre Julliard wrote:
Martin Storsjo martin@martin.st writes:
Signed-off-by: Martin Storsjo martin@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
Martin Storsjö martin@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.
On Fri, 8 Sep 2017, Alexandre Julliard wrote:
Martin Storsjö martin@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
Martin Storsjö martin@martin.st writes:
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.
Indeed, that looks like what we need.
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.
Yes, the intent is to use armeabi-v7a on Android. I haven't quite figured out how to make my toolchain default to that yet...