Tuesday, 20 August 2013

Is ARM supported on WinPhone8 at all?

Is ARM supported on WinPhone8 at all?

I'm facing a weird issue, somewhat similar to this. I have a Windows Phone
8 native DLL project, mostly C++ but with an ARM assembly source in it.
The source is in ARM mode (i. e. not Thumb). C++ is compiled to Thumb.
The app crashes when C++ tries to call into an assembly routine. The call
command in the disassembly is BLX with an immediate offset - it's supposed
to switch mode back to ARM, unconditionally, but somehow it doesn't.
I have the details of the exception. The exception code is 0xc000001d
(invalid operation), and the value of the PC in the crash context struct
is 0x696d5985. That's impossible in either mode - it's misaligned, bit
zero is one. The BLX instruction goes 1b f0 0c eb - if you decipher,
that's a two-part Thumb-style BLX all right, with a 4-aligned
displacement. The T flag in the crash context is SET (CPSR=0x60000010).
I don't have a device, but the crash log from a beta tester is pretty
conclusive. I have a debug log record right before the call into assembly.
Then the crash.

No comments:

Post a Comment