You copied the Doc URL to your clipboard.


The __smc keyword declares an SMC (Secure Monitor Call) function. A call to the SMC function inserts an SMC instruction into the instruction stream generated by the compiler at the point of function invocation.


The SMC instruction replaces the SMI instruction used in previous versions of the ARM assembly language.

__smc is a function qualifier. It affects the type of a function.


__smc(int smc_num) return-type function-name([argument-list]);



Is a 4-bit immediate value used in the SMC instruction.

The value of smc_num is ignored by the ARM processor, but can be used by the SMC exception handler to determine what service is being requested.


The SMC instruction is available for selected ARM architecture-based processors, if they have the Security Extensions. See SMC in the Assembler Reference for more information.

The compiler generates an error if you compile source code containing the __smc keyword for an architecture that does not support the SMC instruction.


__smc(5) void mycall(void); /* declare a name by which SMC #5 can be called */
mycall();                   /* invoke the function */

See also