SLAU132Y September 2004 – June 2021
The compiler recognizes a number of intrinsic operators. Intrinsics are used like functions and produce assembly language statements that would otherwise be inexpressible in C/C++. You can use C/C++ variables with these intrinsics, just as you would with any normal function. The intrinsics are specified with a double leading underscore, and are accessed by calling them as you do a function. (Both single and double leading underscores can be used with intrinsics, but a double underscore is preferred. For example:
short state;
:
state = __get_SR_register();
No declaration of the intrinsic functions is necessary.