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

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

问题描述



什么让我感到困惑的是,为什么会有两个? 这里据说SVC以前是SWI。这是否意味着基本上他们改变了助记符?他们是同一件事吗?我可以互换使用吗?其中一个存在于架构之前,还有其他的存在?

解决方案

是的,SWI和SVC是一样的,它只是一个名字改变。以前,SVC指令被称为SWI,软件中断。



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


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

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?

解决方案

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

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天全站免登陆