28.2.38 __builtin_lacd
Description
Shifts a value by shift
and returns the value to be
stored into the accumulator register. For example:
volatile register int16_t result asm("A");
int32_t value;
result = __builtin_lacd(value,3);
Prototype
int16_t __builtin_lacd(int32_t value, uint16_t shift);
Arguments
value
– Long integer number to be shifted.
shift
– Literal amount to shift between -16 and 15.
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