STMDB and LDMIA are not popping and pushing correctly hence my program
execution crashes at this instruction
.
I am using GCC 4.3.2 tools to make an elf file for an Arm9
"arm926ej-s"(at91sam9261) the example Disassemble is as listed below
<OSMutexAccept+0xb0>
4378: e5931000 ldr r1, [r3]
437c: e5d12036 ldrb r2, [r1, #54]
4380: e3cc30ff bic r3, ip, #255 ; 0xff
4384: e152042c cmp r2, ip, lsr #8
.
.This Code left for as its not neccessary
.
43b8: e8bd8070 pop {r4, r5, r6, pc}
43bc: ebfff066 bl 55c <OS_CPU_SR_Restore>
43c0: e5c56000 strb r6, [r5]
43c4: e3a00001 mov r0, #1 ; 0x1
43c8: e8bd8070 pop {r4, r5, r6, pc}
43cc: 000219e4 .word 0x000219e4
43d0: 000219e8 .word 0x000219e
When I debug the image on an ARM at91Sam The program loses control at
instruction 43c8(pop {r4, pc}, In the debugger this instruction is
dissassembled to:
LDMIA R13!, {R4, PC}
Which is a thumb instruction, how can i enforce that this is not used if
it is the source of my problems