SPNU151V January 1998 – February 2020
By default (that is, without the compiler -md option), all functions with external linkage support dual-state interworking. This support assumes that most calls do not require a state change and are therefore optimized (in terms of code size and execution speed) for calls not requiring a state change. Using the DUAL_STATE pragma does not change the functionality of the dual-state support, but it does assert that calls to the applied function often require a state change. Therefore, such support is optimized for state changes.
The pragma must appear before any declaration or reference to the function that you want to keep. In C, the argument func is the name of the function. In C++, the pragma applies to the next function declared.
The syntax of the pragma in C is:
#pragma DUAL_STATE (func) |
The syntax of the pragma in C++ is:
#pragma DUAL_STATE |
For more information on dual-state interworking, see Section 6.11.