Change the following compiler command-line options when porting C6000 code to C7000:
- Set the --silicon_version option to --silicon_version=7100. (Or replace the -mv6600, -mv6740, or -mv6400+ option with -mv7100.)
- The --interrupt_threshold (-mi) option will be ignored. C7000 C code is always interruptible.
- The --speculate_loads (-mh) option will be ignored. The C7000 compiler uses speculative load instructions for all loads except those to ioport variables/addresses.
- Specify the size/speed tradeoff option using the --opt_for_speed (-mf) option. Change the previously used --opt_for_space (-ms) option to the corresponding -mf option using Table 2-1. The --opt_for_space options do not exist for C7000. An --opt_for_speed option must be used instead, even if no --opt_for_space option was used for C6000.
Table 2-1 Corresponding -ms and -mf Options--opt_for_space (-ms) level (C6000 only) | --opt_for_speed (-mf) level (C6000 and C7000) | Description |
---|
No C6000 option | -mf5 | Maximum performance on C7000; Code size could be very large |
no -ms option selected | -mf4 | Near maximum performance on C7000; Maximum performance on C6000 |
-ms0 | -mf3 | Favor performance |
-ms1 | -mf2 | Favor code size |
-ms2 | -mf1 | Near minimum code size |
-ms3 | -mf0 | Minimum code size |
Consider using the --opt_level=3 (-O3)
compiler option. This option enables a high level of optimization by the
compiler.