1. Behavioral Differences Between armcl and tiarmclang

This section of the Migration Guide contains information about general differences in behavior between the TI Arm Clang (tiarmclang) Compiler Tools and the armcl compiler tools. Some particular differences to be aware of include:

Differences in Support for Legacy TI C/C++ and Arm Assembly

  • Discontinued support for legacy TI pre-defined macro symbols, pragmas, and intrinsics.

  • The tiarmclang compiler tools support GNU-syntax Arm assembly language by default as opposed to legacy TI-syntax Arm assembly language.

Development Flow Related Differences

  • The tiarmclang compiler invokes the linker by default, whereas the user must specify armcl’s -run_linker option to invoked the linker from the armcl command-line. However, the --rom_model (-c) linker option is not set by default by the tiarmclang compiler when running the linker. Therefore, the --rom_model (-c) or --ram_model (-cr) option must be passed to the linker on the tiarmclang command line or in the linker command file.

  • The tiarmclang compiler does not support a C/C++ interlist option from the compiler command-line.

  • The tiarmclang compiler ends compilation after emitting assembly output when using the -S option.

  • The tiarmclang compiler does not support altering the file extension of compiler generated files.

Differences in Behavior of Binary Utilities

  • The armcl compiler will not attempt to inline a function that contains an asm() statement, but the tiarmclang compiler will inline a function containing an asm() statement if it is beneficial to do so.

  • The command-line interface for the tiarmclang versions of the C++ Name Demangler Utility (tiarmdem) and the Name Utility (tiarmnm) behave differently than the armcl versions of armdem and armnm.

Differences in type aliasing assumptions

  • When optimizing memory accesses, tiarmclang assumes that pointers of different types cannot refer to the same memory. This means that if a pointer to an object is cast to a pointer of a different type, the compiler will treat the two pointers as not referencing the same memory. A user access of either pointer with the assumption that they refer to the same memory is undefined behavior. The C standard allows compilers to make a less conservative assumption about strict type aliasing in order to better optimize code to yield better performance. This behavior is consistent with that of other compilers, but it is different from armcl, which makes a more conservative assumption while sacrificing optimization.

  • Users with code for which this poses problems should disable strict type aliasing by using the -fno-strict-aliasing compiler option.

For more specific information about these differences, please see the following subsections: