You copied the Doc URL to your clipboard.

SVC

Supervisor Call causes a Supervisor Call exception. For more information, see Supervisor Call (SVC) exception.

SVC was previously called SWI, Software Interrupt, and this name is still found in some documentation.

Software can use this instruction as a call to an operating system to provide a service.

In the following cases, the Supervisor Call exception generated by the SVC instruction is taken to Hyp mode:

In these cases, the HSR, Hyp Syndrome Register identifies that the exception entry was caused by a Supervisor Call exception, EC value 0x11, see Use of the HSR. The immediate field in the HSR:

  • If the SVC is unconditional:
    • For the T32 instruction, is the zero-extended value of the imm8 field.
    • For the A32 instruction, is the least-significant 16 bits the imm24 field.
  • If the SVC is conditional, is unknown.

It has encodings from the following instruction sets: A32 ( A1 ) and T32 ( T1 ) .

A1

313029282726252423222120191817161514131211109876543210
!= 11111111imm24
cond

A1

SVC{<c>}{<q>} {#}<imm>

imm32 = ZeroExtend(imm24, 32);

T1

1514131211109876543210
11011111imm8

T1

SVC{<c>}{<q>} {#}<imm>

imm32 = ZeroExtend(imm8, 32);

Assembler Symbols

<c>

See Standard assembler syntax fields.

<q>

See Standard assembler syntax fields.

<imm>

For encoding A1: is a 24-bit unsigned immediate, in the range 0 to 16777215, encoded in the "imm24" field. This value is for assembly and disassembly only. SVC handlers in some systems interpret imm24 in software, for example to determine the required service.

For encoding T1: is a 8-bit unsigned immediate, in the range 0 to 255, encoded in the "imm8" field. This value is for assembly and disassembly only. SVC handlers in some systems interpret imm8 in software, for example to determine the required service.

Operation

if ConditionPassed() then
    EncodingSpecificOperations();
    AArch32.CallSupervisor(imm32<15:0>);
Was this page helpful? Yes No