# Vault 7: Projects

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

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 449
- 450
- 451
- 452
- 453
…
- 501
- 502

© 2005-2011 Microchip Technology Inc. DS70157F-page 451
Section 6. Built-in Functions
Built-in Functions
6
__builtin_clr_prefetch
Description:
Clear an accumulator and prefetch data ready for a future MAC operation.
xptr may be null to signify no X prefetch to be performed, in which case the values of xincr
and xval are ignored, but required.
yptr may be null to signify no Y prefetch to be performed, in which case the values of yincr
and yval are ignored, but required.
xval and yval nominate the address of a C variable where the prefetched value will be stored.
xincr and yincr may be the literal values: -6, -4, -2, 0, 2, 4, 6 or an integer value.
If AWB is non null, the other accumulator will be written back into the referenced variable.
For example:
register int result asm("A");
register int B asm("B");
int x_memory_buffer[256]
_ _attribute_ _((space(xmemory)));
int y_memory_buffer[256]
_ _attribute_ _((space(ymemory)));
int *xmemory;
int *ymemory;
int awb;
int xVal, yVal;
xmemory = x_memory_buffer;
ymemory = y_memory_buffer;
result = _ _builtin_clr(&xmemory, &xVal, 2,
&ymemory, &yVal, 2, &awb, B);
May generate:
clr A, [w8]+=2, w4, [w10]+=2, w5, w13
The compiler may need to spill w13 to ensure that it is available for the write-back. It may be
recommended to users that the register be claimed for this purpose.
After this instruction:
• result will be cleared
• xVal will contain x_memory_buffer[0]
• yVal will contain y_memory_buffer[0]
• xmemory and ymemory will be incremented by 2, ready for the next mac operation
Prototype:
int _ _builtin_clr_prefetch(
int **xptr, int *xval, int xincr,
int **yptr, int *yval, int yincr, int *AWB,
int AWB_accum);

- 1
- 2
…
- 449
- 450
- 451
- 452
- 453
…
- 501
- 502