Are ARM instructuons SWI and SVC exactly same thing?

前端 未结 2 890
南方客
南方客 2020-12-11 01:00

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 formerl

2条回答
  •  無奈伤痛
    2020-12-11 01:27

    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.

提交回复
热议问题