http://bugs.winehq.org/show_bug.cgi?id=33349
--- Comment #4 from André H. nerv@dawncrow.de 2013-04-14 14:59:16 CDT --- (In reply to comment #3)
Hello André,
--- quote --- That's one of those things -mthumb-interwork is for and it doesn't increase the size of the binaries, so to be sure i'd rather use it. --- quote ---
Adding "-mthumb-interwork" to CFLAGS (CFLAGS="$CFLAGS -mthumb -mthumb-interwork") doesn't change anything (clean rebuild), there is no veneer inserted to switch to arm mode.
Oh, you're right. i guess it's more for veneers between object files? anyway, that doesn't help us here.
--- quote --- Further RtlCaptureContext needs to be ARM or Thumb-2 because of the instructions used, but as long as possible i also want to support older ARM chips at least for winelib. So i choose to use ARM assembler for such functions (same for relay logging, which actually only works with -marm) --- quote ---
Exactly, older pre-ARMv7 (not counting ARMv6-T2) will only run winelib apps. No Win32 ARM PE applications created by Microsoft compilers will ever run on these (ARMv7 + Thumb-2 is minimum profile for target). Well, maybe if mingw-w64-arm catches up someday and open source applications are recompiled to arm code - though the usefulness remains doubtful.
I don't see a problem here with RtlCaptureContext() being Thumb-2. The assembly instructions you used are valid for Thumb-2.
Removing ".arm" directive results in following Thumb-2 code:
Sure, but it can't be compiled on e.g. ARMv5 anymore, i really want to avoid loosing support for older chips, of course wihtout putting too much work into it. I don't see a problem compiling it as ARM even when Wine will be compiled for Thumb, we would just need our own veneer or something.
The bigger problem atm is relay tracing and such. I'd need to rewrite nearly every assembler bit in winebuild to use Thumb(1). Again, i really would like to switch to Thumb1, when the compiler chooses Thumb2 on appropriate platforms, fine. atm there are nearly as many valid uses of winelib as of native binaries i guess, so it's worth the work for me.