28.2.58 __builtin_sac
Description
Shifts a value by shift and returns the value. For example:
volatile register int16_t value asm("A");
int32_t result;
result = __builtin_sac(value,3);
Prototype
int32_t __builtin_sac(int16_t value, int16_t shift);
Arguments
value
– Integer number to be shifted.
shift
– Literal amount to shift between -8 and 7
Return Value
Returns the shifted result.
Machine Instruction
sac
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