ARM: bugfix for "movt" disassembly
authorDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 12 Jan 2010 20:40:39 +0000 (12:40 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 12 Jan 2010 20:40:39 +0000 (12:40 -0800)
Use the correct bitfield to specify the register whose
top halfword gets replaced.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/arm_disassembler.c

index 912e37cf80dd8aa0e40dc57e72fa1f0e03c82b83..587131bcc6200a5fc7d53389a0a51a4faece115b 100644 (file)
@@ -3247,7 +3247,7 @@ static int t2ev_data_immed(uint32_t opcode, uint32_t address,
        case 0x0c:
                /* move constant to top 16 bits of register */
                immed |= (opcode >> 4) & 0xf000;
-               sprintf(cp, "MOVT\tr%d, #%d\t; %#4.4x", rn, immed, immed);
+               sprintf(cp, "MOVT\tr%d, #%d\t; %#4.4x", rd, immed, immed);
                return ERROR_OK;
        case 0x10:
        case 0x12: