28.2.15 __builtin_divmodsd

Description

Issues the DSC architecture’s native signed divide support with the same restrictions given in the dsPIC30F/33F Programmer’s Reference Manual (DS-70000157). Notably, if the quotient does not fit into a 16-bit result, the results (including remainder) are unexpected. This form of the built-in function will capture both the quotient and remainder.

Prototype

int16_t __builtin_divmodsd(
int32_t dividend, int16_t divisor,
 int16_t *remainder);

Arguments

dividend – number to be divided

divisor – number to divide by

remainder – pointer to remainder

Return Value

Quotient and remainder.

Machine Instruction

div.sd

Error Messages

None