Intrinsic Functions for MIPS Microprocessors
9/7/2007
The functions that the MIPS device compiler recognizes are known as supported intrinsic functions. The compiler translates such intrinsic functions into a call to a C run-time (CRT) routine, or into a series of one or more instructions.
Intrinsic functions that the compiler always translates into a series of instructions are expanded functions. For example, the compiler recognizes sqrt as a common intrinsic function for all MIPS targets. sqrt is a floating-point (FP) intrinsic function which takes an FP argument and returns an FP value.
MIPS microprocessors with a FP unit support the sqrt instruction. That is, for MIPS microprocessors with an FP unit the compiler translates the intrinsic function sqrt into a sqrt instruction native to the microprocessor.
For MIPS microprocessors without a FP unit, the compiler translates sqrt into a call to a CRT routine. In this way, sqrt is an intrinsic function for all MIPS targets, but is expanded into an instruction only for MIPS II FP and MIPS IV FP. For more information about sqrt, see the topic C/C++ Libraries for Windows Embedded CE at this Microsoft Web site.
The following table shows supported intrinsic functions that the compiler recognizes for specific indicated MIPS ISAs.
Function |
MIPS 16 ASE |
MIPS II ISA |
MIPS II ISA FP unit |
MIPS IV ISA FP unit |
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
Y |