code-red: disassembler mnemonics

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

code-red: disassembler mnemonics

419 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by caprock on Fri Apr 16 09:06:27 MST 2010
Using the code-red with lpcxpresso and 1343 I cannot find the reference for the source disassembler mnemonics that are displayed for the code red. So far, checking the ARM & thumb-2 reference manuals, and the gcc assembler manuals has not provided the clues.

Can someone please direct me to the assembler mnemonic tables that are used here? Where is the reference manual located?

For example, this is the main entry for Blinky. The instructions seem to be displayed as pseudo code? [I]movt, movw, mov.w[/I]?

[SIZE=2]0x0000015c <main+56>: ldr r2, [r2, #120]
[LEFT]0x0000015e <main+58>: movw r3, #0 ; 0x0
0x00000162 <main+62>: movt r3, #4096 ; 0x1000
0x00000166 <main+66>: ldr r1, [r3, #0]
0x00000168 <main+68>: udiv r1, r1, r2
0x0000016c <main+72>: movw r3, #34079 ; 0x851f
0x00000170 <main+76>: movt r3, #20971 ; 0x51eb
0x00000174 <main+80>: umull r2, r1, r3, r1
0x00000178 <main+84>: mov.w r1, r1, lsr #5
0x0000017c <main+88>: mov.w r0, #0 ; 0x0
0x00000180 <main+92>: add.w r1, r1, #4294967295 ; 0xffffffff
0x00000184 <main+96>: bl 0x52c <init_timer16>[/LEFT]
[/SIZE]

Original Attachment has been moved to: 1100308_main.zip

0 Kudos
2 Replies

313 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by caprock on Fri Apr 16 10:13:39 MST 2010
Thank you!
0 Kudos

313 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Fri Apr 16 10:04:12 MST 2010
Those are Thumb-2 (ARMv7M) instructions. You can find the descriptions in the ARMv7 reference manual (either v7M or v7A&R versions). In short:
MOVW is a variation of MOV (immediate) which can load an arbitrary 16-bit immediate into the register. MOVT is "Move Top", doing the same but for the top 16 bits of the register. Together, they allow to load any 32-bit immediate into the register without having to use the literal pool, which would incur additional delays because of memory bus access.
The .w suffix denotes that the instruction is 32-bit (used to distinguish from 16-bit istructions with the same mnemonic).
0 Kudos