The header file <cruntime.h> defines the interface to functions that the C compiler calls when generating code. For instance, it contains the runtime routines for floating point operations and conversion, with shifts, multiplies, and divides for each of the integer types. In general, you do not need to call these routines directly from your own C code. These functions are are documented here should you need to call them from assembly language. These functions abide by the standard calling conventions of the compiler. Not every implementation of CrossWorks will provide all these functions.
Integer multiplication | |
__int16_mul | Multiply two 16-bit signed or unsigned integers forming a 16-bit product |
__int16_mul_8x8 | Multiply two 8-bit signed integers forming a 16-bit signed product |
__int16_mul_asgn | Multiply a 16-bit signed or unsigned integer in memory by a 16-bit integer |
__int32_mul | Multiply two 32-bit signed or unsigned integers forming a 32-bit product |
__int32_mul_16x16 | Multiply two 16-bit signed integers forming a 32-bit signed product |
__int32_mul_asgn | Multiply a 32-bit signed or unsigned integer in memory by a 32-bit integer |
__int64_mul | Multiply two 64-bit signed or unsigned integers forming a 64-bit product |
__int64_mul_32x32 | Multiply two 32-bit signed integers forming a 64-bit signed product |
__int64_mul_asgn | Multiply a 64-bit signed or unsigned integer in memory by a 64-bit integer |
__uint16_mul_8x8 | Multiply two 8-bit unsigned integers forming a 16-bit unsigned product |
__uint32_mul_16x16 | Multiply two 16-bit unsigned integers forming a 32-bit unsigned product |
__uint64_mul_32x32 | Multiply two 32-bit unsigned integers forming a 64-bit unsigned product |
Integer division | |
__int16_div | Divide two 16-bit signed integers and return the 16-bit signed quotient |
__int16_div_asgn | Divide a 16-bit signed integer in memory by a 16-bit signed integer |
__int16_mod | Divide two 16-bit signed integers and return the 16-bit signed remainder after division |
__int16_mod_asgn | Divide a 16-bit signed integer in memory by a 16-bit signed integer and assign it the 16-bit remainder |
__int32_div | Divide two 32-bit signed integers and return the 32-bit signed quotient |
__int32_div_asgn | Divide a 32-bit signed integer in memory by a 32-bit signed integer |
__int32_mod | Divide two 32-bit signed integers and return the 32-bit signed remainder after division |
__int32_mod_asgn | Divide a 32-bit signed integer in memory by a 32-bit signed integer and assign it the 32-bit remainder |
__int64_div | Divide two 64-bit signed integers and return the 64-bit signed quotient |
__int64_div_asgn | Divide a 64-bit signed integer in memory by a 64-bit signed integer |
__int64_mod | Divide two 64-bit signed integers and return the 64-bit signed remainder after division |
__int64_mod_asgn | Divide a 64-bit signed integer in memory by a 64-bit signed integer and assign it the 64-bit remainder |
__uint16_div | Divide two 16-bit unsigned integers and return the 16-bit unsigned quotient |
__uint16_div_asgn | Divide a 16-bit unsigned integer in memory by a 16-bit unsigned integer |
__uint16_mod | Divide two 16-bit unsigned integers and return the 16-bit unsigned remainder after division |
__uint16_mod_asgn | Divide a 16-bit unsigned integer in memory by a 16-bit unsigned integer and assign it the 16-bit remainder |
__uint32_div | Divide two 32-bit unsigned integers and return the 32-bit unsigned quotient |
__uint32_div_asgn | Divide a 32-bit unsigned integer in memory by a 32-bit unsigned integer |
__uint32_mod | Divide two 32-bit unsigned integers and return the 32-bit unsigned remainder after division |
__uint32_mod_asgn | Divide a 32-bit unsigned integer in memory by a 32-bit unsigned integer and assign it the 32-bit remainder |
__uint64_div | Divide two 64-bit unsigned integers and return the 64-bit unsigned quotient |
__uint64_div_asgn | Divide a 64-bit unsigned integer in memory by a 64-bit unsigned integer |
__uint64_mod | Divide two 64-bit unsigned integers and return the 64-bit unsigned remainder after division |
__uint64_mod_asgn | Divide a 64-bit unsigned integer in memory by a 64-bit unsigned integer and assign it the 64-bit remainder |
Integer shifts | |
__int16_asr | Shift a 16-bit signed integer arithmetically right by a variable number of bit positions |
__int16_asr_asgn | Shift a 16-bit signed integer in memory arithmetically right by a variable number of bit positions |
__int16_lsl | Shift a 16-bit signed integer left by a variable number of bit positions |
__int16_lsl_asgn | Shift a 16-bit signed integer in memory left by a variable number of bit positions |
__int16_lsr | Shift a 16-bit unsigned integer logically right by a variable number of bit positions |
__int16_lsr_asgn | Shift a 16-bit unsigned integer in memory logically right by a variable number of bit positions |
__int32_asr | Shift a 32-bit signed integer arithmetically right by a variable number of bit positions |
__int32_asr_asgn | Shift a 32-bit signed integer in memory arithmetically right by a variable number of bit positions |
__int32_lsl | Shift a 32-bit signed integer left by a variable number of bit positions |
__int32_lsl_asgn | Shift a 32-bit signed integer in memory left by a variable number of bit positions |
__int32_lsr | Shift a 32-bit unsigned integer logically right by a variable number of bit positions |
__int32_lsr_asgn | Shift a 32-bit unsigned integer in memory logically right by a variable number of bit positions |
__int64_asr | Shift a 64-bit signed integer arithmetically right by a variable number of bit positions |
__int64_asr_asgn | Shift a 64-bit signed integer in memory arithmetically right by a variable number of bit positions |
__int64_lsl | Shift a 64-bit signed integer left by a variable number of bit positions |
__int64_lsl_asgn | Shift a 64-bit signed integer in memory left by a variable number of bit positions |
__int64_lsr | Shift a 64-bit unsigned integer logically right by a variable number of bit positions |
__int64_lsr_asgn | Shift a 64-bit unsigned integer in memory logically right by a variable number of bit positions |
Floating-point arithmetic | |
__float32_add | Add two 32-bit floating point values |
__float32_add_1 | Add one to a 32-bit floating point value |
__float32_add_asgn | Add a 32-bit floating point value to a 32-bit floating point value in memory |
__float32_div | Divide two 32-bit floating point values |
__float32_div_asgn | Divide a 32-bit floating point value in memory by a 32-bit floating point value |
__float32_mul | Multiply two 32-bit floating point values |
__float32_mul_asgn | Multiply a 32-bit floating point value in memory by a 32-bit floating point value |
__float32_neg | Negate a 32-bit floating point value |
__float32_sqr | Square a 32-bit floating point value |
__float32_sub | Subtract two 32-bit floating point values |
__float32_sub_asgn | Subtract a 32-bit floating point value from a 32-bit floating point value in memory |
__float64_add | Add two 64-bit floating point values |
__float64_add_1 | Add one to a 64-bit floating point value |
__float64_add_asgn | Add a 64-bit floating point value to a 64-bit floating point value in memory |
__float64_div | Divide two 64-bit floating point values |
__float64_div_asgn | Divide a 64-bit floating point value in memory by a 64-bit floating point value |
__float64_mul | Multiply two 64-bit floating point values |
__float64_mul_asgn | Multiply a 64-bit floating point value in memory by a 64-bit floating point value |
__float64_neg | Negate a 64-bit floating point value |
__float64_sqr | Square a 64-bit floating point value |
__float64_sub | Subtract two 64-bit floating point values |
__float64_sub_asgn | Subtract a 64-bit floating point value from a 64-bit floating point value in memory |
Floating point comparison | |
__float32_eq | Compare two 32-bit floating point values for equality |
__float32_eq_0 | Compare 32-bit floating point value to zero |
__float32_lt | Compare two 32-bit floating point values |
__float32_lt_0 | Compare 32-bit floating point value with zero |
__float64_eq | Compare two 64-bit floating point values for equality |
__float64_eq_0 | Compare 64-bit floating point value to zero |
__float64_lt | Compare two 64-bit floating point values |
__float64_lt_0 | Compare 64-bit floating point value with zero |
Integer to floating point conversions | |
__int16_to_float32 | Convert a 16-bit signed integer to a 32-bit floating point value |
__int16_to_float64 | Convert a 16-bit signed integer to a 64-bit floating point value |
__int32_to_float32 | Convert a 32-bit signed integer to a 32-bit floating point value |
__int32_to_float64 | Convert a 32-bit signed integer to a 64-bit floating point value |
__int64_to_float32 | Convert a 64-bit signed integer to a 32-bit floating point value |
__int64_to_float64 | Convert a 64-bit signed integer to a 64-bit floating point value |
__uint16_to_float32 | Convert a 16-bit unsigned integer to a 32-bit floating point value |
__uint16_to_float64 | Convert a 16-bit unsigned integer to a 64-bit floating point value |
__uint32_to_float32 | Convert a 32-bit unsigned integer to a 32-bit floating point value |
__uint32_to_float64 | Convert a 32-bit unsigned integer to a 64-bit floating point value |
__uint64_to_float32 | Convert a 64-bit unsigned integer to a 32-bit floating point value |
__uint64_to_float64 | Convert a 64-bit unsigned integer to a 64-bit floating point value |
Floating point to integer conversions | |
__float32_to_int16 | Convert a 32-bit floating point value to a 16-bit signed integer |
__float32_to_int32 | Convert a 32-bit floating point value to a 32-bit signed integer |
__float32_to_int64 | Convert a 32-bit floating point value to a 64-bit signed integer |
__float32_to_uint16 | Convert a 32-bit floating point value to a 16-bit unsigned integer |
__float32_to_uint32 | Convert a 32-bit floating point value to a 32-bit unsigned integer |
__float32_to_uint64 | Convert a 32-bit floating point value to a 64-bit unsigned integer |
Floating point conversions | |
__float32_to_float64 | Convert a 32-bit floating point value to a 64-bit floating point value |
__float64_to_float32 | Convert a 64-bit floating point value to a 32-bit floating point value |