Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

© 2005-2011 Microchip Technology Inc. DS70157F-page 453
Section 6. Built-in Functions
Built-in Functions
6
__builtin_divf
Description:
Computes the quotient num / den. A math error exception occurs if den is zero. Function
arguments are unsigned, as is the function result.
Prototype:
unsigned int _ _builtin_divf(unsigned int num,
unsigned int den);
Argument:
num numerator
den denominator
Return Value:
Returns the unsigned integer value of the quotient num / den.
Assembler Operator / Machine Instruction:
div.f
__builtin_divmodsd
Description:
Issues the 16-bit architecture’s native signed divide support. 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:
signed int _ _builtin_divmodsd(
signed long dividend, signed int divisor,
signed int *remainder);
Argument:
dividend number to be divided
divisor number to divide by
remainder pointer to remainder
Return Value:
Quotient and remainder.
Assembler Operator / Machine Instruction:
divmodsd
Error Messages:
None.

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh