Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
MPLAB
®
XC16 C COMPILER
USERS GUIDE
2012-2013 Microchip Technology Inc. DS50002071C-page 299
Appendix G. Built-in Functions
G.1 INTRODUCTION
This appendix lists the built-in functions that are specific to MPLAB XC16 C Compiler.
Built-in functions give the C programmer access to assembler operators or machine
instructions that are currently only accessible using inline assembly, but are sufficiently
useful that they are applicable to a broad range of applications. Built-in functions are
coded in C source files syntactically like function calls, but they are compiled to
assembly code that directly implements the function, and do not involve function calls
or library routines.
There are a number of reasons why providing built-in functions is preferable to
requiring programmers to use inline assembly. They include the following:
1. Providing built-in functions for specific purposes simplifies coding.
2. Certain optimizations are disabled when inline assembly is used. This is not the
case for built-in functions.
3. For machine instructions that use dedicated registers, coding inline assembly
while avoiding register allocation errors can require considerable care. The
built-in functions make this process simpler as you do not need to be concerned
with the particular register requirements for each individual machine instruction.
Protego_Release_01_05-Related-OEM-Documentation-MPLAB-XC16-C-Compiler.pdf