JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++


The VisualDSP++ Compiler Model

The visualdsp compiler model models the behavior of the VisualDSP++ compilers for SHARC, TigerSHARC and Blackfin processors.



Overview

The following file extensions are supported:

Compiler model Modeled native compilers Source file extensions Description
visualdsp VisualDSP++ C/C++ compilers for SHARC, TigerSHARC and Blackfin processors .c, .C C source file.
.cc, .cpp, .cxx, .c++ (case insensitive) C++ source file.

Availability

Platform Availability The visualdsp compiler model is available for all platforms.
Default Recognition/Handling By default, compilations are recognized and handled as follows.
Platform Native Compiler Model Used
All ccblkfn(.exe) visualdsp
Windows only cc21k.exe visualdsp
Windows only ccts.exe visualdsp
Specifying Additional Mappings On other systems, or if your compiler executable has a different name, specify a COMPILER_MODELS rule to map your compiler executable name to the visualdsp model.

Some handling, including include paths and macro definitions, depends on the name of the invoked native compiler. If the compiler name is not one of those shown in the table above - which can occur if you have set up a COMPILER_MODELS configuration file rule to map an additional executable name to the visualdsp compiler model - the compilation will be handled using the settings for ccblkfn.exe.

For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.

Command Arguments

The visualdsp compiler model supports the following command arguments.

Option Additional Treatment in Model
-@file
-@ file
Extracts the options specified in file and appends them to the command line.
-Dmacro Defines macro macro to 1.
-Dmacro=defn Defines macro macro with defn as its definition.
-double-size-32 Specifies front end options --cs_targ_sizeof_double 4 and --cs_targ_sizeof_long_double 4, and defines macro __DOUBLES_ARE_FLOATS__=1, unless the command line subsequently contains -double-size-64.
-double-size-64 Specifies front end options --cs_targ_sizeof_double 8 and --cs_targ_sizeof_long_double 8, unless the command line subsequently contains -double-size-32.
-Idir Appends directory dir to the list of directories searched for include files.
-I- For all occurrences of -Idir before before -I-, dir is searched only for include files specified with #include "fname" (not #include <fname>).
-implicit-pointers Specifies front end option --cs_ext_conv_incompat_pointer.
-includefile
-include file
Specifies front end option --preinclude file.
-no-builtins Defines macro __NO_BUILTINS=1. (In all other cases, specifies front end option --preinclude builtins.h).
-no-std-inc Specifies that the standard include directories should not be included.
-proccpu
-proc cpu
Influences set of defined macros: see below.
-signed-bitfield Specifies front end option --cs_targ_plain_int_bit_field_is_signed. (In all other cases, specifies front end option --cs_targ_plain_int_bit_field_is_unsigned
-signed-char Specifies front end option --signed_chars and defines macro __SIGNED_CHARS__=1, unless the command line subsequently contains -unsigned-char.
-Umacro Undefines macro macro.
-unsigned-char Specifies front end option --unsigned_chars, unless the command line subsequently contains -signed-char. (In all other cases, specifies --signed_chars.)

Predefined Paths and Macros

Include path Unless -no-std-inc is specified, two -Idir settings will be specified, where dir depends on the compiler executable invoked and on the executable location execpath:
compiler executable -I directives specified
(with system-appropriate directory separators)
cc21k.exe
ccts.exe
-Iexecpath/TS/include
-Iexecpath/TS/include/cplus
ccblkfn.exe
(and any other compiler executable mapped to the visualdsp model)
-Iexecpath/Blackfin/include
-Iexecpath/Blackfin/include/cplus
Front End Options The following front end options are always specified. For C compilations, the following are also specified.
Macros Defined The visualdsp compiler model defines the following in addition to the standard CodeSonar predefined macros.
__builtin_fabs =fabs
__builtin_fabsf =fabsf
__builtin_fmaxf =fmaxf
__builtin_fminf =fminf
__builtin_quad =long long
__DISABLE_DIVQ =1
__inline =inline
__regclass(X) =
_Pragma(X) =
bank(X) =
section(X) =
Macros Conditionally Defined
__canonical_cpu__=1 if -proccpu is specified with cpu whose canonical form (upper case and with hyphens removed) is canonical_cpu.
__n1n2n3n 4x__=1 if the invoked compiler executable is cc21k.exe and -proccpu is specified with cpu of the form ADSP-n1n2n3n 4n5 (with ni all digits).

If -proccpu is not specified, the model defines __210xx__=1.

__n1n2n3xx__=1 if the invoked compiler executable is cc21k.exe and -proccpu is specified with cpu of the form ADSP-n1n2n3n 4n5 (with ni all digits).

If -proccpu is not specified, the model defines __210xx__=1.

__ADSP21000__=1 if the invoked compiler executable is cc21k.exe.
__ADSP21020__=1 if the invoked compiler executable is cc21k.exe and -proccpu is specified with cpu ADSP-21020 (or is not specified at all).
__ADSPBF52x__=1 if the invoked compiler executable is ccblkfn.exe (or default case) and -proccpu is specified with cpu ending in 52[0-9].
__ADSPBF54x__=1 if the invoked compiler executable is ccblkfn.exe (or default case) and -proccpu is specified with cpu ending in 54[0-9] (or is not specified at all).
__ADSPBLACKFIN__=1 if the invoked compiler executable is ccblkfn.exe (or default case)
__ADSPTS__=1 if the invoked compiler executable is ccts.exe
__ADSPTS101__=1 if the invoked compiler executable is ccts.exe and -proccpu is specified with cpu ADSP-TS101 (or is not specified at all).
__ADSPTS20x__=1 if the invoked compiler executable is ccts.exe
__DOUBLES_ARE_FLOATS__=1 unless -double-size-64 is specified (without subsequent -double-size-32).
__NO_BUILTINS=1 if -no-builtins is specified
__SIGNED_CHARS__=1 unless -unsigned-char is specified (without subsequent -signed-char).
__WCHAR_T_DEFINED=1 for C++ compilations
_HAS_NAMESPACE=1 for C++ compilations
_WCHART=1 for C++ compilations
bool=char for C compilations.
false=0 for C compilations.
true=1 for C compilations.
 

To report problems with this documentation, please visit https://support.codesecure.com/.