# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 171
- 172
- 173
- 174
- 175
…
- 365
- 366

MPLAB
®
XC16 C COMPILER
USERS GUIDE
 2012-2013 Microchip Technology Inc. DS50002071C-page 173
Chapter 12. Register Usage
12.1 INTRODUCTION
Certain registers play import roles in the C runtime environment. Therefor creating
code concerning these registers requires knowledge about their use by the compiler.
 Register Variables
 Changing Register Contents
12.2 REGISTER VARIABLES
Register variables use one or more working registers, as shown in Table 12.1.
TABLE 12.1: REGISTER CONVENTIONS
Variable Working Register
char, signed char, unsigned char W0-W13, and W14 if not used as a Frame
Pointer.
short, signed short, unsigned
short
W0-W13, and W14 if not used as a Frame
Pointer.
int, signed int,unsigned int W0-W13, and W14 if not used as a Frame
Pointer.
void * (or any pointer) W0-W13, and W14 if not used as a Frame
Pointer.
long, signed long, unsigned long A pair of contiguous registers, the first of which
is a register from the set {W0, W2, W4, W6, W8,
W10, W12}.
long long, signed long long,
unsigned long long
A quadruplet of contiguous registers, the first of
which is a register from the set {W0, W4, W8}.
Successively higher-numbered registers con-
tain successively more significant bits.
float A pair of contiguous registers, the first of which
is a register from the set {W0, W2, W4, W6, W8,
W10, W12}.
double
1
A pair of contiguous registers, the first of which
is a register from the set {W0, W2, W4, W6, W8,
W10, W12}.
long double A quadruplet of contiguous registers, the first of
which is a register from the set {W0, W4, W8}.
structure 1 contiguous register per 2 bytes in the
structure.
_Fract
_Sat _Fract
W0-W13, and W14 if not used as a Frame
Pointer.
long _Fract
_Sat long _Fract
A pair of contiguous registers, the first of which
is a register from the set {W0, W2, W4, W6, W8,
W10, W12}.
_Accum
_Sat _Accum
Three contiguous registers where the first regis-
ter starts in the set {W0, W4, W8} and W12 if
W14 is not used as a frame pointer.
Note 1: double is equivalent to long double if -fno-short-double is used.

- 1
- 2
…
- 171
- 172
- 173
- 174
- 175
…
- 365
- 366