28.2.2 __builtin_add
Description
Add value to the accumulator specified by result with a shift specified by literal shift. For example:
volatile register int result asm("A");
int value;
result = builtin_add(result,value,0);
If value
is held in w0, the following will be generated:
add w0, #0, A
Prototype
int __builtin_add(int Accum,int value, const int shift);
Argument
Accum
– Accumulator to add.
value
– Integer number to add to accumulator value.
shift
– Amount to shift resultant accumulator value.
Return Value
Returns the shifted addition result to an accumulator.
Assembler Operator/ Machine Instruction
add
Error Messages
An error message will be displayed if:
- the result is not an accumulator register
- argument 0 is not an accumulator
- the shift value is not a literal within range