28.2.1 __builtin_ACCL, __builtin_ACCH, __builtin_ACCU
Description
This function can be used to gain access to the low, high, or upper portion of an accumulator value. For example:
volatile register int value asm(“A”);
int16_t result = __builtin_ACCL(value);
The example result will be the low 16-bits stored in the accumulator which holds
value
.
These builtins allow access to the parts of an accumulator in a way that is optimizer safe.
Prototype
int16_t __builtin_ACCL(int16_t value);
int16_t __builtin_ACCH(int16_t value);
int16_t __builtin_ACCU(int16_t value);
Argument
value
– Integer number to set accumulator value.
Return Value
Returns the low, high or upper portion of the accumulator.
Machine Instruction
mov.w
Error Messages
An error message will be generated if the current target does not support DSP instructions.