SPRAC71B February 2019 – October 2023
The compiler generates calls to helper functions to perform operations that need to be supported by the compiler, but are not supported directly by the architecture, such as floating-point operations on devices that lack dedicated hardware. These helper functions must be implemented in the RTS library of any toolchain that conforms to the ABI.
Helper functions are named using the prefix _ _C28x_. Any identifier with this prefix is reserved for the ABI.
The helper functions adhere to the standard calling conventions.
The following tables specify the helper functions using C notation and syntax. The types in the table correspond to the generic data types specified in Section 2.1.
The functions in Table 6-1 perform various mathematical, logical, and comparison operations.
Signature | Description |
---|---|
__c28xabi_absll | Return the absolute value of a long long int. |
__c28xabi_addd | Add two double-precision floating numbers. |
__c28xabi_addf | Add two single-precision floating numbers. |
__c28xabi_andll | Bitwise AND for two long long integer values. |
__c28xabi_cmpd | Compare two double-precision floating numbers. |
__c28xabi_cmpf | Compare two single-precision floating numbers. |
__c28xabi_cmpll | Compare two signed long long int values. |
__c28xabi_cmpull | Compare two unsigned long long int values. |
__c28xabi_divd | Divide two double-precision floating numbers. |
__c28xabi_divf | Divide two single-precision floating numbers. |
__c28xabi_divi | Divide two signed 16-bit integers. |
__c28xabi_divl | Divide two signed 32-bit integers. |
__c28xabi_divll | Divide two signed 64-bit long long integers. |
__c28xabi_divu | Divide two unsigned 16-bit integers. |
__c28xabi_divul | Divide two unsigned 32-bit integers. |
__c28xabi_divull | Divide two unsigned 64-bit long long integers. |
__c28xabi_dtof | Convert a double-precision floating number to a single-precision floating number. |
__c28xabi_dtoi | Convert a double-precision floating number to a signed 16-bit integer. |
__c28xabi_dtol | Convert a double-precision floating number to a signed 32-bit integer. |
__c28xabi_dtoll | Convert a double-precision floating number to a signed 64-bit long long integer. |
__c28xabi_dtou | Convert a double-precision floating number to an unsigned 16-bit integer. |
__c28xabi_dtoul | Convert a double-precision floating number to an unsigned 32-bit integer. |
__c28xabi_dtoull | Convert a double-precision floating number to an unsigned 64-bit long long integer. |
__c28xabi_ftod | Convert a single-precision floating number to a double-precision floating number. |
__c28xabi_ftoi | Convert a single-precision floating number to a signed 16-bit integer. |
__c28xabi_ftol | Convert a single-precision floating number to a signed 32-bit integer. |
__c28xabi_ftoll | Convert a single-precision floating number to a signed 64-bit long long integer. |
__c28xabi_ftou | Convert a single-precision floating number to an unsigned 16-bit integer. |
__c28xabi_ftoul | Convert a single-precision floating number to an unsigned 32-bit integer. |
__c28xabi_ftoull | Convert a single-precision floating number to an unsigned 64-bit long long integer. |
__c28xabi_itod | Convert a signed 16-bit integer to a double-precision floating number. |
__c28xabi_itof | Convert a signed 16-bit integer to a single-precision floating number. |
__c28xabi_lltod | Convert a signed 64-bit integer to a double-precision floating number. |
__c28xabi_lltof | Convert a signed 64-bit integer to a single-precision floating number. |
__c28xabi_ltod | Convert a signed 32-bit integer to a double-precision floating number. |
__c28xabi_ltof | Convert a signed 32-bit integer to a single-precision floating number. |
__c28xabi_modi | Compute the remainder of signed 16-bit division. |
__c28xabi_modl | Compute the remainder of signed 32-bit division. |
__c28xabi_modll | Compute the remainder of signed 64-bit long long integer division. |
__c28xabi_modu | Compute the remainder of unsigned 16-bit division. |
__c28xabi_modul | Compute the remainder of unsigned 32-bit division. |
__c28xabi_modull | Compute the remainder of unsigned 64-bit long long integer division. |
__c28xabi_mpyd | Multiply two double-precision floating numbers. |
__c28xabi_mpyf | Multiply two single-precision floating numbers. |
__c28xabi_mpyll | Multiply two signed 64-bit long long integer.s |
__c28xabi_negd | Negate a double-precision floating number. |
__c28xabi_negf | Negate a single-precision floating number. |
__c28xabi_orll | Bitwise OR for two long long integer values. |
__c28xabi_subd | Subtract one double-precision floating number from another. |
__c28xabi_subf | Subtract one single-precision floating number from another. |
__c28xabi_ulltod | Convert an unsigned 64-bit long long integer to a double-precision floating number. |
__c28xabi_ulltof | Convert an unsigned 64-bit long long integer to a single-precision floating number. |
__c28xabi_ultod | Convert an unsigned 32-bit integer to a double-precision floating number. |
__c28xabi_ultof | Convert an unsigned 32-bit integer to a single-precision floating number. |
__c28xabi_utod | Convert an unsigned 16-bit integer to a double-precision floating number. |
__c28xabi_utof | Convert an unsigned 16-bit integer to a single-precision floating number. |
__c28xabi_xorll | Bitwise XOR for two long long integer values. |