The ARM Architecture defines a User mode that has 15 generalpurpose registers, a pc, and a CPSR. In addition to this mode thereare five privileged processor modes, each of which have an SPSRand a number of registers that replace some of the 15 User mode generalpurpose registers. Note This section o. Read More
posted @ 2013-04-23 17:00 moon_cat Views(275) Comments(0) Diggs(0) Edit
You will get a error as follows when you're trying to use "mov r2,sp_svc" in your asm file (GNU ARM-LINUX-GCC)error: immediate expression requires a # prefix -- `mov r2,sp_svc' "why ?: it doesn't understand sp_svc, so it thinks you're trying to do an immediate mov, whi Read More
posted @ 2013-04-23 16:04 moon_cat Views(546) Comments(0) Diggs(0) Edit
Table of Contents 1. Overview1.1 Structure of this Manual1.2 The GNU Assembler1.3 Object File Formats1.4 Command Line1.5 Input Files1.6 Output (Object) File1.7 Error and Warning Messages2. Command-Line Options2.1 Enable Listings:`-a[cdhlns]'2.2`-D'2.3 Work Faster:`-f'2.4 .include search Read More
posted @ 2013-04-23 14:34 moon_cat Views(386) Comments(0) Diggs(0) Edit
对IA32(X86)而言,当发现异常时,CPU硬件做了很多事情,比如切换 SP,CR3,CS等等(读取TSS),而对于ARM来说,处理的流程如下CPU 硬件: : 将发生异常的下一条指令保存至 LR_xxx :备份当前 CPSR 到该模式的 SPSR_xxx :重置修改 CPSR,强制进入 相应的模式,强制进入ARM模式,关闭 FIQ/IRQ 响应 : 修改PC = (reset = 0/0xFFFF0000,undef = 4/0xFFFF0004...... )OS(软件) :切换 sp :保存上下文 {r0-r12,sp} : 执行处理函数 : 执行函数返回 : 恢复上下文{r0-r12 Read More
posted @ 2013-04-23 14:32 moon_cat Views(252) Comments(0) Diggs(0) Edit