常用ARM汇编指令:STM/LDMLDMIA R7!, {R0-R3, R5} ; Load R0 to R3-R5 from R7, add 20 to R7LDMIB R7!, {R0-R3, R5} ; Load R0 to R3-R5 from memory(R7 + 4), add 20 to R7STMIA R0!, {R3, R4, R5}; Store R3-R5 to R0: add 12 to R0STMIB R0!, {R3, R4, R5}; Store R3-R5 to memory(R0 + 4): add 12 to R0LDR:目标为register/STR:目 Read More
posted @ 2012-10-22 16:05
West Hu
Views(284)
Comments(0)
Diggs(0)
1. ARM不同模式使用不同的堆栈ARM处理器在不用模式下使用不同的SP(R13),lr(R14),SPSR,假如ARM从user mode切换到irq mode,响应的堆栈指针SP也会发生响应的变换在系统初始化时需要设置各个模式的SP异常、中断模式的SP设置: 1 void cpu_init(void) 2 { 3 unsigned int cpu = smp_processor_id(); 4 struct stack *stk = &stacks[cpu]; 5 6 if (cpu >= NR_CPUS) { 7 printk(KERN_CRIT "CPU%u: Read More
posted @ 2012-10-22 15:53
West Hu
Views(861)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号