Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2005-2011 Microchip Technology Inc. DS70157F-page 459
Section 6. Built-in Functions
Built-in Functions
6
__builtin_fbcl
Description:
Finds the first bit change from left in value. This is useful for dynamic scaling of fixed-point data.
For example:
int result, value;
result = _ _builtin_fbcl(value);
May generate:
fbcl w4, w5
Prototype:
int _ _builtin_fbcl(int value);
Argument:
value Integer number of first bit change.
Return Value:
Returns the shifted addition result to an accumulator.
Assembler Operator / Machine Instruction:
fbcl
Error Messages:
An error message appears if the result is not an accumulator register.
__builtin_lac
Description:
Shifts value by shift (a literal between -8 and 7) and returns the value to be stored into the
accumulator register. For example:
register int result asm("A");
int value;
result = _ _builtin_lac(value,3);
May generate:
lac w4, #3, A
Prototype:
int _ _builtin_lac(int value, int shift);
Argument:
value Integer number to be shifted.
shift Literal amount to shift.
Return Value:
Returns the shifted addition result to an accumulator.
Assembler Operator / Machine Instruction:
lac
Error Messages:
An error message appears if:
• the result is not an accumulator register
• the shift value is not a literal within range
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf