常用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)
作用:输出感兴趣的列,并对相应关键字进行排序 1 #!/usr/bin/env python 2 # coding=utf-8 3 import string 4 import os 5 6 class MEM: 7 def __init__(self, size, name): 8 self.size = size 9 self.name = name10 def printf(self):11 print "%8dK %s" %(self.size, self.name)12 13 output=[]14... Read More
posted @ 2012-10-10 14:47 West Hu Views(318) Comments(0) Diggs(0)
Ashmem使用实例:http://www.androidenea.com/2010/03/share-memory-using-ashmem-and-binder-in.html1.IEneaBuffer.h 1 /* 2 * IEneabuffer.h 3 * Created on: 19 mars 2010 Author: Zingo Andersen 4 * License: Public Domain (steal and use what you like) 5 * 6 * Buffer classes to handle the binder communicat... Read More
posted @ 2012-10-10 14:40 West Hu Views(734) Comments(0) Diggs(0)