Microchip Technology SW006022-2N Data Sheet
MPLAB
®
XC16 C COMPILER
USER’S GUIDE
2012 Microchip Technology Inc.
DS52071B-page 17
Chapter 1. Compiler Overview
1.1
INTRODUCTION
The MPLAB XC16 C compiler is defined and described in the following topics:
1.2
DEVICE DESCRIPTION
The MPLAB XC16 C compiler fully supports all Microchip 16-bit devices:
• The dsPIC
®
family of digital signal controllers combines the high performance
required in digital signal processor (DSP) applications with standard microcon-
troller (MCU) features needed for embedded applications.
troller (MCU) features needed for embedded applications.
• The PIC24 family of MCUs are identical to the dsPIC DSCs with the exception that
they do not have the digital signal controller module or that subset of instructions.
They are a subset, and are high-performance MCUs intended for applications that
do not require the power of the DSC capabilities.
They are a subset, and are high-performance MCUs intended for applications that
do not require the power of the DSC capabilities.
1.3
COMPILER DESCRIPTION AND DOCUMENTATION
The MPLAB XC16 C compiler is a full-featured, optimizing compiler that translates
standard ANSI C programs into 16-bit device assembly language source. The compiler
also supports many command-line options and language extensions that allow full
access to the 16-bit device hardware capabilities, and affords fine control of the com-
piler code generator.
standard ANSI C programs into 16-bit device assembly language source. The compiler
also supports many command-line options and language extensions that allow full
access to the 16-bit device hardware capabilities, and affords fine control of the com-
piler code generator.
The compiler is a port of the GNU Compiler Collection (GCC) compiler from the Free
Software Foundation
Software Foundation
This key features of the compiler are discussed in the following sections.
1.3.1
ANSI C Standard
The compiler is a fully validated compiler that conforms to the ANSI C standard as
defined by the ANSI specification (ANSI x3.159-1989) and described in Kernighan and
Ritchie’s The C Programming Language (second edition). The ANSI standard includes
extensions to the original C definition that are now standard features of the language.
These extensions enhance portability and offer increased capability. In addition,
language extensions for dsPIC DSC embedded-control applications are included.
defined by the ANSI specification (ANSI x3.159-1989) and described in Kernighan and
Ritchie’s The C Programming Language (second edition). The ANSI standard includes
extensions to the original C definition that are now standard features of the language.
These extensions enhance portability and offer increased capability. In addition,
language extensions for dsPIC DSC embedded-control applications are included.
1.3.2
Optimization
The compiler uses a set of sophisticated optimization passes that employ many
advanced techniques for generating efficient, compact code from C source. The
optimization passes include high-level optimizations that are applicable to any C code,
as well as 16-bit device-specific optimizations that take advantage of the particular
features of the device architecture.
advanced techniques for generating efficient, compact code from C source. The
optimization passes include high-level optimizations that are applicable to any C code,
as well as 16-bit device-specific optimizations that take advantage of the particular
features of the device architecture.
For more on optimizations, see Chapter 15. “Optimizations”.