28.2.116 __builtin_sacd

Architecture

dsPIC33C/E/F, dsPIC30

Description

Shifts value by shift and returns the value. For example:

 volatile register int16_t value asm("A");
 int16_t result;

 result = __builtin_sacd(value,3);

Might generate:

 sacd A, #3, w0

Prototype

int16_t __builtin_sacd(int16_t value, int16_t shift);

Arguments

value – Integer number to be shifted.

shift – Literal amount to shift between -16 and 15

Return Value

Returns the shifted result.

Machine Instruction

sacd

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