Is ARM (not Thumb) supported on WinPhone8 at all?

前端 未结 3 1575
灰色年华
灰色年华 2020-12-22 12:09

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

3条回答
  •  暖寄归人
    2020-12-22 12:42

    A gentleman called Michael Schnell suggested elsewhere that the interrupt handler in Windows Phone 8 doesn't restore the Thumb flag, instead hard-codes it to 1. Testing seems to confirm that theory. The following snippet:

        THUMB
    ASMTest
        mov r12, lr
        blx a
        mov lr, r12
        bx lr
    
        ALIGN 4
        ARM
    a
        bx lr
    

    consistently crashes under a debugger, but runs as expected when debuggerless (i. e. no interrupts while in ARM mode). When I inserted an empty loop with 0x10000 iterations in ARM mode, it ran on a few tries, then crashed.

提交回复
热议问题