28.2.1 __builtin_ACCL, __builtin_ACCH, __builtin_ACCU
Architecture
dsPIC33C/E/F, dsPIC30
Description
Access the value in the low, high, or upper portion of an accumulator. An example for dsPIC33E:
volatile register int value asm(“A”);
int16_t value;
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.