28.2.3 __builtin_add_16
Architecture
dsPIC33A
Description
Add shifted value to accumulator. Although the hardware type of an accumulator is wider than the
natural size of int
, the compiler uses the shorter type as
the expected use of the value will eventually be in the natural
int
type. Note, that this type can be different
based on architecture.
Example:
volatile register int result asm("A");
int16_t value;
result = __builtin_add_16(result, value, 0);
Prototype
int __builtin_add_16(int Accum, int16_t value, const int16_t shift);
Arguments
Accum
- Accumulator to add
value
- value to add
shift
- amount to shift value
before being added to Accum
Return Value
Adds the possibly shifted value
to
Accum
and returns the same value.
Machine Instruction
add
Error Messages
An error message is reported if the shift
value is outside of
the range supported by the target device.