ARM汇编和x86组件之间的差异 [英] Differences Between ARM Assembly and x86 Assembly

查看:243
本文介绍了ARM汇编和x86组件之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在要学习ARM汇编,制定我的Windows Mobile 5的iPAQ,但我有一些问题:

I'm now going to learn ARM Assembly, to develop for my Windows Mobile 5 iPAQ, but I have some questions:


  • 什么是ARM汇编和x86组件之间的主要区别?

    • 是任何差异将在中断(新类型)?

      • 这是他们的,什么是他们的意义?

      推荐答案

      主要区别:


      • ARM是一个RISC风格的建筑 - 指令有一个正常大小(32位为标准的ARM和Thumb模式16位,但拇指有一些指示,嚼起来2个指令'槽')

      • ARM is a RISC style architecture - instructions have a regular size (32-bit for standard ARM and 16-bits for Thumb mode, though Thumb has some instructions that chew up 2 instruction 'slots')

      向上穿过至少ARM V5架构(我不知道V6做什么),ARM的中断模型比英特尔很大的不同 - 而不是推寄存器到堆栈中,ARM交换到不同设置寄存器这'影子'正常集。处理器的模式确定哪些寄存器堆是可见的(而不是所有的寄存器都必然阴影)。这是一个pretty复杂的安排。较新的ARM架构(V7反正)都有中断模型更接近英特尔的在那里寄存器在发生中断时压入堆栈。

      up through at least ARM v5 architecture (I'm not sure what v6 does), the interrupt model on ARM is vastly different than on Intel - instead of pushing registers onto the stack, the ARM swaps to a different set of registers which 'shadow' the normal set. The mode of the processor determines which register file is visible (and not all registers are necessarily shadowed). it's a pretty complex arrangement. Newer ARM Architectures (v7 anyway) have an interrupt model that's closer to Intel's where registers are pushed on to the stack when an interrupt occurs.

      ARM指令有一些有趣的功能是无法在英特尔的:

      Arm instruction have some interesting features that aren't in Intel's:


      • 的说明已经建立了有条件的标志 - 所以每个指令可以作为NOP执行,如果指定的条件标志不会在当前状态寄存器船旗国匹配(这可以用来避免围绕一个或两个指令所有这些跳跃,你经常看到Intel汇编)。

      • 的ARM已经转移,可以嵌入指令的一部分逻辑。因此,使用一个寄存器作为源操作数的时候,你可以移动它作为指令的内在组成部分。这有助于建立索引的阵列,有时算术。

      在另一侧时,ARM不能做与存储器直接除从加载和存储它。 Intel汇编可以直接在内存中执行多个操作。

      On the other side, the ARM can't do much with memory directly except load from and store to it. Intel assembly can perform more operations directly on memory.

      需要注意的是ARM架构的版本不直接对应到实际的ARM处理器版本 - 例如,如果我没记错的ARM7是一个架构V5处理器。就个人而言,我觉得这更令人困惑的比它应该是。

      Note that the ARM architecture version doesn't correspond directly to the actual ARM processor versions - for example, if I remember right the ARM7 is a architecture v5 processor. Personally, I find this far more confusing than it should be.

      ARM体系结构的引用自由地从 http://www.arm.com 下载。我也建议得到的Hitex指南的副本,以各种ARM微控制器的一良好的起点。

      The ARM Architecture references are freely downloadable from http://www.arm.com. I also suggest getting copies of Hitex's guides to various ARM microcontrollers for a good starting point.

      有过关于指针开始使用ARM几个问题#1。回顾他们会给你很多好的地方开始:

      There have been several Stackoverflow questions regarding pointers to getting started with ARM. Reviewing them will give you a lot of good places to start:

      这篇关于ARM汇编和x86组件之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆