Hi, folks:

A CS7500 board was booted by Linux ARM kernel successfully. I put my cross compiled 
application into mounted NFS folder. I've tried some other applications. Everything 
seems Ok. But to my application, it's reported that there is an illegal instruction at 
PC=XXXXXXXX. I disassembled the binary and addressed error line. This error exists in 
a pthread function, I think. Following is the snippet:

022869b4 <__pthread_compare_and_swap>:
 22869b4:       e1a0c00d        mov     r12, sp
 22869b8:       e92dd8f0        stmdb   sp!, {r4, r5, r6, r7, r11, r12, lr, pc}
 22869bc:       e24cb004        sub     r11, r12, #4    ; 0x4
 22869c0:       e1a05000        mov     r5, r0
 22869c4:       e1a06001        mov     r6, r1
 22869c8:       e1a07002        mov     r7, r2
 22869cc:       e1a04003        mov     r4, r3
 22869d0:       e3a03001        mov     r3, #1  ; 0x1
 22869d4:       e1043093        swp     r3, r3, [r4] ;=======================>>>>>>> 
ERROR LINE: illegal instruction
 22869d8:       e3530000        cmp     r3, #0  ; 0x0
 22869dc:       0a000001        beq     22869e8 <__pthread_compare_and_swap+0x34>
 22869e0:       e1a00004        mov     r0, r4
 22869e4:       eb000007        bl      2286a08 <__pthread_acquire>
 22869e8:       e5953000        ldr     r3, [r5]
 22869ec:       e1530006        cmp     r3, r6
 22869f0:       05857000        streq   r7, [r5]
 22869f4:       03a00001        moveq   r0, #1  ; 0x1
 22869f8:       13a00000        movne   r0, #0  ; 0x0
 22869fc:       e3a03000        mov     r3, #0  ; 0x0
 2286a00:       e5843000        str     r3, [r4]
 2286a04:       e91ba8f0        ldmdb   r11, {r4, r5, r6, r7, r11, sp, pc}

According to ARM instruction set, this 'swp r3, r3, [r4]' instruction is proper. So I 
wonder what originates 'illegal instruction'.

Thanks in advance,

Yu Xuanwei
m����+-���)�Ɗ�O�j)fj��b��?�)�Ū�>W����+m�曢��u�޲��)ߢ���*'�{a��b�

Reply via email to