SW006012 Microchip Technology, SW006012 Datasheet - Page 142

C COMPILER FOR DSPIC30F FAMILY

SW006012

Manufacturer Part Number
SW006012
Description
C COMPILER FOR DSPIC30F FAMILY
Manufacturer
Microchip Technology
Type
MPLAB® C30 Compilerr
Series
PIC24 & DsPICr
Datasheets

Specifications of SW006012

Supported Families
PIC24, DsPIC30F And DsPIC33F
Core Architecture
PIC, DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Tool Type
Compiler
Processor Series
PIC24, dsPIC
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
dsPIC30F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
MPLAB
DS51284F-page 136
®
C30 User’s Guide
__
Assembler Opera-
tor / Machine
Instruction:
Error Messages
__
Description:
Prototype:
builtin_clr (Continued)
builtin_clr_prefetch
clr
An error message will be displayed if the result is not an accumulator
register.
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:
might generate:
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
int __builtin_clr_prefetch(
next mac operation
register int result asm("A");
int x_memory_buffer[256]
int y_memory_buffer[256]
int *xmemory;
int *ymemory;
int awb;
int xVal, yVal;
xmemory = x_memory_buffer;
ymemory = y_memory_buffer;
result = __builtin_clr(&xmemory, &xVal, 2,
clr A, [w8]+=2, w4, [w10]+=2, w5, w13
int **xptr, int *xval, int xincr,
int **yptr, int *yval, int yincr, int *AWB);
__attribute__((space(xmemory)));
__attribute__((space(ymemory)));
&ymemory, &yVal, 2, &awb);
© 2007 Microchip Technology Inc.

Related parts for SW006012