# Vault 7: Projects

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

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 308
- 309
- 310
- 311
- 312
…
- 365
- 366

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 310  2012-2013 Microchip Technology Inc.
__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);
might generate:
fbcl w4, w5
Prototype: int __builtin_fbcl(int value);
Argument: value Integer number to check for change.
Return Value: Returns a literal value sign extended to represent the number of bits to shift left.
Assembler Operator/
Machine Instruction:
fbcl
Error Messages None.
__builtin_get_isr_state
Description: Determine the current CPU interrupt state.
Prototype: unsigned int __builtin_get_isr_state(void);
Argument: None.
Return Value: Returns an integer value specifying the current CPU interrupt state.
Assembler Operator/
Machine Instruction:
get_isr_state
Error Messages None.
__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:
volatile register int result asm("A");
int value;
result = __builtin_lac(value,3);
Might 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 will be displayed if:
 the result is not an accumulator register
 the shift value is not a literal within range

- 1
- 2
…
- 308
- 309
- 310
- 311
- 312
…
- 365
- 366