1.1. Changes in Support for Legacy TI C/C++ and Arm Assembly

The TI Arm Clang (tiarmclang) Compiler Tools do not support legacy TI-specific C/C++ mechanisms that the previous incarnation of the TI Arm compiler (armcl) did. You can, however, invoke the legacy TI-syntax Arm assembler from the tiarmclang command to process legacy TI-syntax Arm assembly source files. This section provides some further details about the tiarmclang compiler’s behavior regarding legacy TI-specific C/C++ mechanisms and Arm assembly source files.

1.1.1. Pre-Defined Macro Symbols, Pragmas, and Intrinsics

  • The tiarmclang compiler supports pre-defined macro symbols and intrinsics that are included in the Arm C Language Extensions (ACLE).

    It is highly recommended that you make use of ACLE-compliant pre-defined macro symbols and intrinsics in your C/C++ source code. You can find details about ACLE pre-defined macro symbols and intrinsics in the Arm C Language Extensions - Release ACLE Q2 2018 specification.

  • Legacy TI pre-defined macros symbols, pragmas, intrinsics are not supported in tiarmclang

    The tiarmclang compiler does not support many of the legacy TI pre-defined macro symbols, pragmas, or intrinsics that are supported in the armcl compiler. Use of legacy TI-specific pre-defined macro symbols and intrinsics can usually be replaced by a functionally equivalent ACLE-compliant pre-defined macro symbol or intrinsic.

    Also, rather than using legacy TI-specific pragmas (like CODE_SECTION, DATA_SECTION, and LOCATION, for example), you should use function, variable, and type attributes where applicable. For example, instead of defining a function in a specially named section using the CODE_SECTION pragma,

    #pragma CODE_SECTION(my_func, ".text:myfunc")
    void my_func(void) {
        <code>
    }
    

    you can use a section attribute instead:

    void my_func(void) __attribute__((section(".text:my_func"))) {
        <code>
    }
    

    Please see the C/C++ Source Migration Aid Diagnostics section in the Migrating C and C++ Source Code chapter for details on how instances of these legacy TI mechanisms can be found and converted into a portable form that the tiarmclang compiler does support.

1.1.2. Arm Assembly Source Syntax

  • The tiarmclang compiler assumes the use of GNU-syntax Arm assembly language

    The tiarmclang compiler, when instructed to generate assembly source via the -S option, will produce GNU-syntax rather than legacy TI-syntax Arm assembly source code. Furthermore, the default behavior of the tiarmclang compiler when presented with an assembly source file (with .s or .S file extension) is to interpret the source file as a GNU-syntax Arm assembly source file.

    The tiarmclang compiler can be made to process legacy TI-syntax assembly source with its TI-syntax Arm assembler, but you must precede such an input file with the -x ti-asm option. For more information on migrating assembly source code from legacy TI-syntax to GNU-syntax, please see the Migrating Assembly Language Source Code chapter of this migration guide.