ARM 指令 SWI 和 SVC 完全一样吗? [英] Are ARM instructuons SWI and SVC exactly same thing?

查看:79
本文介绍了ARM 指令 SWI 和 SVC 完全一样吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ARM 程序集具有进入主管模式"的 SWI 和 SVC 指令.

ARM assembly has SWI and SVC instructions for entering into 'supervisor mode'.

让我困惑的是,为什么有两个?这里 据说SVC以前是西威.这是否意味着他们基本上改变了助记符?它们是一样的吗?我可以互换使用它们吗?其中一个存在于架构之前,另一个存在于架构之后吗?

What confuses me is, why there are two of them? Here it is said that SVC was formerly SWI. Does it mean that basically they changed the mnemonic? Are they the same thing? Can I use them interchangeably? Does one of them exist before an architecture, and other after?

推荐答案

是的,SWI 和 SVC 是一回事,只是改名而已.以前,SVC 指令称为 SWI,即软件中断.

Yes, SWI and SVC are same thing, it is just a name change. Previously, the SVC instruction was called SWI, Software Interrupt.

SVC(和 SWI)的操作码部分是用户定义的(位 0-23 是用户定义的,就像 SVC 处理程序的参数).第 24-27 位是 b1111,这 4 位使 CPU 意识到操作码是 SVC(或 SWI).请参阅 ARM 信息中心了解更多详情.

The opcode for SVC (and SWI) is partially user defined (bit 0-23 is user defined and is like a parameter to SVC handler). Bits 24-27 are b1111 and these 4 bits makes CPU to realize that the opcode is SVC (or SWI). see ARM Information Center for more details.

这篇关于ARM 指令 SWI 和 SVC 完全一样吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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