hello,

linux-2.6$ arm-linux-objdump -D .vmlinux | egrep -2 c0023a70:
c0023a68:       e595601c        ldr     r6, [r5, #28]
c0023a6c:       e3560000        cmp     r6, #0  ; 0x0
c0023a70:       116f5f16        clzne   r5, r6
c0023a74:       10400005        subne   r0, r0, r5
c0023a78:       11a0100d        movne   r1, sp
linux-2.6$

as see above, clz instruction is at 0xc0023a70 but, OpenOCD says,

> armv4_5 disassemble 0xc0023a68 5
0xc0023a68      0xe595601c      LDR r6, [r5, #0x1c]
0xc0023a6c      0xe3560000      CMP r6, #0x0

0xc0023a74      0x10400005      SUBNE r0, r0, r5
0xc0023a78      0x11a0100d      MOVNE r1, r13

> targets
    CmdName    Type       Endian     AbsChainPos Name          State     
--  ---------- ---------- ---------- ----------- ------------- ----------
 0: mp201.cpu  arm926ejs  little              0      mp201.cpu halted

> 

----------------------------------------------------------------------
with attached patch,
> armv4_5 disassemble 0xc0023a68 5
0xc0023a68      0xe595601c      LDR r6, [r5, #0x1c]
0xc0023a6c      0xe3560000      CMP r6, #0x0
0xc0023a70      0x116f5f16      CLZNE r5, r6
0xc0023a74      0x10400005      SUBNE r0, r0, r5
0xc0023a78      0x11a0100d      MOVNE r1, r13

> 

Orignal src has 9 digits constant. it shold be worng.
so, I change BLX(2) instruction too, but I did not tested.

can anybody test it?

--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255  FAX +81-3-5294-7256

Index: src/target/arm_disassembler.c
===================================================================
--- src/target/arm_disassembler.c       (revision 1427)
+++ src/target/arm_disassembler.c       (working copy)
@@ -818,7 +818,7 @@
        }
        
        /* CLZ */
-       if ((opcode & 0x0060000f0) == 0x00300010)
+       if ((opcode & 0x006000f0) == 0x00600010)
        {
                u8 Rm, Rd;
                instruction->type = ARM_CLZ;
@@ -829,8 +829,8 @@
                                 address, opcode, COND(opcode), Rd, Rm);
        }
        
-       /* BLX */
-       if ((opcode & 0x0060000f0) == 0x00200030)
+       /* BLX(2) */
+       if ((opcode & 0x006000f0) == 0x00200030)
        {
                u8 Rm;
                instruction->type = ARM_BLX;
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to