movw raises undefined instruction exception on ARMv7-A

Viewed 74

I have an ARM v7a Cortex A9 processor and ran into a undefined instruction. I set a breakpoint on 0x04 to be able to look at the the register contents. However, I dont know what is wrong with the instruction. My R14_undef has the value 0x1003d368 and the disassembly shows:

1003d360:       e3a02048        mov     r2, #72 ; 0x48
1003d364:       e30e1024        movw    r1, #57380      ; 0xe024
1003d368:       e3411003        movt    r1, #4099       ; 0x1003
1003d36c:       e1a00003        mov     r0, r3
1003d370:       ebff5401        bl      1001237c <__wrap_memcpy>

According to websites such as Arm Reference Manual I have to substract -4 from the LR value to find the violating exception, i.e. 1003d364.

But what can be wrong with 1003d364: e30e1024 movw r1, #57380?

The contents of the registers are:

r0             0x3  3
r1             0x1  1
r2             0x48 72
r3             0x30480000   810024960
r4             0xaaaaaaaa   2863311530
r5             0x10000000   268435456
r6             0x1807fcb8   403176632
r7             0x3  3
r8             0x18082180   403186048
r9             0x1  1
r10            0x1807fcb8   403176632
r11            0x100034c4   268448964
r12            0x1003d314   268686100
sp             0x11008000   0x11008000
lr             0x1003d368   268686184
pc             0x4  0x4
cpsr           0xa00001db   2684355035

0 Answers
Related