ARM汇编和x86汇编之间的区别 [英] Differences Between ARM Assembly and x86 Assembly

查看:2319
本文介绍了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 Assembly和x86 Assembly之间的主要区别是什么?


    • 中断(新类型)有任何差异吗?


      • 他们是谁,他们的意思是什么?

      推荐答案

      主要区别:


      • ARM是一种RISC风格的架构 - 指令具有常规大小(标准ARM为32位,Thumb模式为16位,尽管Thumb有一些指示,嚼了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将交换到一组不同的寄存器,寄生正常集。处理器的模式确定哪个寄存器文件是可见的(并不是所有寄存器都必须是阴影的)。这是一个非常复杂的安排。较新的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 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的指针有几个Stackoverflow问题。审查他们将给你很多好的开始的地方:

      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:

      • Suggested resources for newbie ARM programmer?
      • https://stackoverflow.com/questions/270078/resources-for-learning-arm-assembly
      • How to start off with ARM processors?

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

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