arm反汇编指令看程序跳转stcmi 0, cr0, , {20}有大虾懂么
时间:10-02
整理:3721RD
点击:
用arm-linux-objdump反汇编的代码,reset中断后执行设置设置栈,关看门狗,初始化时钟,这里遇到问题,即下面程序
3000009c: e59f304c ldr r3, [pc, #76] ; 300000f0 <clock_init+0x54>后应该跳到
300000f0: 4c000014 stcmi 0, cr0, [r0], {20}处,这句话看不懂高手指点完整代码:
timer_elf: file format elf32-littlearm
Disassembly of section .text:
30000000 <_start>:
30000000: ea000006 b 30000020 <Reset>
30000004 <HandleUndef>:
30000004: eafffffe b 30000004 <HandleUndef>
30000008 <HandleSWI>:
30000008: eafffffe b 30000008 <HandleSWI>
3000000c <HandlePrefetchAbort>:
3000000c: eafffffe b 3000000c <HandlePrefetchAbort>
30000010 <HandleDataAbort>:
30000010: eafffffe b 30000010 <HandleDataAbort>
30000014 <HandleNotUsed>:
30000014: eafffffe b 30000014 <HandleNotUsed>
30000018: ea000011 b 30000064 <HandleIRQ>
3000001c <HandleFIQ>:
3000001c: eafffffe b 3000001c <HandleFIQ>
30000020 <Reset>:
30000020: e3a0da01 mov sp, #4096 ; 0x1000
30000024: eb000018 bl 3000008c <disable_watch_dog>
30000028: eb00001b bl 3000009c <clock_init>
3000002c: eb000036 bl 3000010c <memsetup>
30000030: eb00004d bl 3000016c <copy_steppingstone_to_sdram>
30000034: e59ff03c ldr pc, [pc, #60] ; 30000078 <int_return+0x4>
30000038 <on_sdram>:
30000038: e321f0d2 msr CPSR_c, #210 ; 0xd2
3000003c: e3a0da01 mov sp, #4096 ; 0x1000
30000040: e321f0df msr CPSR_c, #223 ; 0xdf
30000044: e3a0d30d mov sp, #872415232 ; 0x34000000
30000048: eb000050 bl 30000190 <init_led>
3000004c: eb000054 bl 300001a4 <timer0_init>
30000050: eb000067 bl 300001f4 <init_irq>
30000054: e321f05f msr CPSR_c, #95 ; 0x5f
30000058: e59fe01c ldr lr, [pc, #28] ; 3000007c <int_return+0x8>
3000005c: e59ff01c ldr pc, [pc, #28] ; 30000080 <int_return+0xc>
30000060 <halt_loop>:
30000060: eafffffe b 30000060 <halt_loop>
30000064 <HandleIRQ>:
30000064: e24ee004 sub lr, lr, #4 ; 0x4
30000068: e92d5fff s>真美妙b sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
3000006c: e59fe010 ldr lr, [pc, #16] ; 30000084 <int_return+0x10>
30000070: e59ff010 ldr pc, [pc, #16] ; 30000088 <int_return+0x14>
30000074 <int_return>:
30000074: e8fd9fff ldmia sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, pc}^
30000078: 30000038 andcc r0, r0, r8, lsr r0
3000007c: 30000060 andcc r0, r0, r0, rrx
30000080: 3000025c andcc r0, r0, ip, asr r2
30000084: 30000074 andcc r0, r0, r4, ror r0
30000088: 3000020c andcc r0, r0, ip, lsl #4
3000008c <disable_watch_dog>:
3000008c: e3a02000 mov r2, #0 ; 0x0
30000090: e3a03453 mov r3, #1392508928 ; 0x53000000
30000094: e5832000 str r2, [r3]
30000098: e1a0f00e mov pc, lr
3000009c <clock_init>:
3000009c: e59f304c ldr r3, [pc, #76] ; 300000f0 <clock_init+0x54>
300000a0: e3a02003 mov r2, #3 ; 0x3
300000a4: e5832000 str r2, [r3]
300000a8: ee111f10 mrc 15, 0, r1, cr1, cr0, {0}
300000ac: e3811103 orr r1, r1, #-1073741824 ; 0xc0000000
300000b0: ee011f10 mcr 15, 0, r1, cr1, cr0, {0}
300000b4: e59f1038 ldr r1, [pc, #56] ; 300000f4 <clock_init+0x58>
300000b8: e59f3038 ldr r3, [pc, #56] ; 300000f8 <clock_init+0x5c>
300000bc: e5912000 ldr r2, [r1]
300000c0: e1520003 cmp r2, r3
300000c4: 0a000007 beq 300000e8 <clock_init+0x4c>
300000c8: e5912000 ldr r2, [r1]
300000cc: e59f3028 ldr r3, [pc, #40] ; 300000fc <clock_init+0x60>
300000d0: e1520003 cmp r2, r3
300000d4: 159f2024 ldrne r2, [pc, #36] ; 30000100 <clock_init+0x64>
300000d8: 0a000002 beq 300000e8 <clock_init+0x4c>
300000dc: e59f3020 ldr r3, [pc, #32] ; 30000104 <clock_init+0x68>
300000e0: e5832000 str r2, [r3]
300000e4: e1a0f00e mov pc, lr
300000e8: e59f2018 ldr r2, [pc, #24] ; 30000108 <clock_init+0x6c>
300000ec: eafffffa b 300000dc <clock_init+0x40>
300000f0: 4c000014 stcmi 0, cr0, [r0], {20}
300000f4: 560000b0 undefined
300000f8: 32410000 subcc r0, r1, #0 ; 0x0
300000fc: 32410002 subcc r0, r1, #2 ; 0x2
30000100: 0005c012 andeq ip, r5, r2, lsl r0
30000104: 4c000004 stcmi 0, cr0, [r0], {4}
30000108: 0005c040 andeq ip, r5, r0, asr #32
3000010c <memsetup>:
3000010c: e59f204c ldr r2, [pc, #76] ; 30000160 <memsetup+0x54>
30000110: e3a03312 mov r3, #1207959552 ; 0x48000000
30000114: e5832000 str r2, [r3]
30000118: e3a01c07 mov r1, #1792 ; 0x700
3000011c: e59f0040 ldr r0, [pc, #64] ; 30000164 <memsetup+0x58>
30000120: e59f2040 ldr r2, [pc, #64] ; 30000168 <memsetup+0x5c>
30000124: e5831004 str r1, [r3, #4]
30000128: e3a0c030 mov ip, #48 ; 0x30
3000012c: e5831008 str r1, [r3, #8]
30000130: e583100c str r1, [r3, #12]
30000134: e5831010 str r1, [r3, #16]
30000138: e5831014 str r1, [r3, #20]
3000013c: e5831018 str r1, [r3, #24]
30000140: e3a010b1 mov r1, #177 ; 0xb1
30000144: e583001c str r0, [r3, #28]
30000148: e5830020 str r0, [r3, #32]
3000014c: e5832024 str r2, [r3, #36]
30000150: e5831028 str r1, [r3, #40]
30000154: e583c02c str ip, [r3, #44]
30000158: e583c030 str ip, [r3, #48]
3000015c: e1a0f00e mov pc, lr
30000160: 22011110 andcs r1, r1, #4 ; 0x4
30000164: 00018005 andeq r8, r1, r5
30000168: 008c04f4 streqd r0, [ip], r4
3000016c <copy_steppingstone_to_sdram>:
3000016c: e59f0018 ldr r0, [pc, #24] ; 3000018c <copy_steppingstone_to_sdram+0x20>
30000170: e3a02000 mov r2, #0 ; 0x0
30000174: e3a01203 mov r1, #805306368 ; 0x30000000
30000178: e4923004 ldr r3, [r2], #4
3000017c: e1520000 cmp r2, r0
30000180: e4813004 str r3, [r1], #4
30000184: 9afffffb bls 30000178 <copy_steppingstone_to_sdram+0xc>
30000188: e1a0f00e mov pc, lr
3000018c: 00000fff streqd r0, [r0], -pc
30000190 <init_led>:
30000190: e59f3008 ldr r3, [pc, #8] ; 300001a0 <init_led+0x10>
30000194: e3a02b55 mov r2, #87040 ; 0x15400
30000198: e5832000 str r2, [r3]
3000019c: e1a0f00e mov pc, lr
300001a0: 56000010 undefined
300001a4 <timer0_init>:
300001a4: e3a02063 mov r2, #99 ; 0x63
300001a8: e3a03451 mov r3, #1358954496 ; 0x51000000
300001ac: e5832000 str r2, [r3]
300001b0: e59f002c ldr r0, [pc, #44] ; 300001e4 <timer0_init+0x40>
300001b4: e59f302c ldr r3, [pc, #44] ; 300001e8 <timer0_init+0x44>
300001b8: e59f202c ldr r2, [pc, #44] ; 300001ec <timer0_init+0x48>
300001bc: e59fc02c ldr ip, [pc, #44] ; 300001f0 <timer0_init+0x4c>
300001c0: e3a01003 mov r1, #3 ; 0x3
300001c4: e5831000 str r1, [r3]
300001c8: e5820000 str r0, [r2]
300001cc: e59c3000 ldr r3, [ip]
300001d0: e3a02009 mov r2, #9 ; 0x9
300001d4: e3833002 orr r3, r3, #2 ; 0x2
300001d8: e58c3000 str r3, [ip]
300001dc: e58c2000 str r2, [ip]
300001e0: e1a0f00e mov pc, lr
300001e4: 00007a12 andeq r7, r0, r2, lsl sl
300001e8: 51000004 tstpl r0, r4
300001ec: 5100000c tstpl r0, ip
300001f0: 51000008 tstpl r0, r8
300001f4 <init_irq>:
300001f4: e59f200c ldr r2, [pc, #12] ; 30000208 <init_irq+0x14>
300001f8: e5923000 ldr r3, [r2]
300001fc: e3c33b01 bic r3, r3, #1024 ; 0x400
30000200: e5823000 str r3, [r2]
30000204: e1a0f00e mov pc, lr
30000208: 4a000008 bmi 30000230 <Timer0_Handle+0x24>
3000020c <Timer0_Handle>:
3000020c: e59f103c ldr r1, [pc, #60] ; 30000250 <Timer0_Handle+0x44>
30000210: e59f203c ldr r2, [pc, #60] ; 30000254 <Timer0_Handle+0x48>
30000214: e5913000 ldr r3, [r1]
30000218: e59f0038 ldr r0, [pc, #56] ; 30000258 <Timer0_Handle+0x4c>
3000021c: e353000a cmp r3, #10 ; 0xa
30000220: 05923000 ldreq r3, [r2]
30000224: 02033e1e andeq r3, r3, #480 ; 0x1e0
30000228: 01e03003 mvneq r3, r3
3000022c: 05823000 streq r3, [r2]
30000230: e5911000 ldr r1, [r1]
30000234: e3a03001 mov r3, #1 ; 0x1
30000238: e1a03113 mov r3, r3, lsl r1
3000023c: e3a0244a mov r2, #1241513984 ; 0x4a000000
30000240: e5823000 str r3, [r2]
30000244: e5901000 ldr r1, [r0]
30000248: e5801000 str r1, [r0]
3000024c: e1a0f00e mov pc, lr
30000250: 4a000014 bmi 300002a8 <main+0x4c>
30000254: 56000014 undefined
30000258: 4a000010 bmi 300002a0 <main+0x44>
3000025c <main>:
3000025c: eafffffe b 3000025c <main>
Disassembly of section .comment:
00000000 <.comment>:
0: 43434700 cmpmi r3, #0 ; 0x0
4: 4728203a undefined
8: 2029554e eorcs r5, r9, lr, asr #10
c: 2e332e33 mrccs 14, 1, r2, cr3, cr3, {1}
10: 47000032 undefined
14: 203a4343 eorcss r4, sl, r3, asr #6
18: 554e4728 strplb r4, [lr, -#1832]
1c: 2e332029 cdpcs 0, 3, cr2, cr3, cr9, {1}
20: 00322e33 eoreqs r2, r2, r3, lsr lr
24: 43434700 cmpmi r3, #0 ; 0x0
28: 4728203a undefined
2c: 2029554e eorcs r5, r9, lr, asr #10
30: 2e332e33 mrccs 14, 1, r2, cr3, cr3, {1}
34: Address 0x34 is out of bounds.
时钟 相关文章: