28.2.37 __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 int16_t result asm("A");
int16_t value;
result = __builtin_lac(value,3);
Prototype
int16_t __builtin_lac(int16_t value, int16_t shift);
Arguments
value
– Integer number to be shifted.
shift
– Literal amount to shift.
Return Value
Returns the shifted result to an accumulator.
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