2.17. Assembler Options

The transformation from generated code to encoded object is part of the tiarmclang compiler. In fact, you may present an assembly source file written in GNU-syntax Arm assembly language (typically with an .s extension) to the compiler and it will produce an encoded object file for that assembly source file.

If you are processing a GNU-syntax assembly source file with the tiarmclang compiler, then the normal tiarmclang command-line options are applicable. However, if you have a TI-syntax Arm assembly language source file that you want to assemble and include in an application where all of the C/C++ source files are compiled with tiarmclang, then you can use the -x ti-asm option to tell tiarmclang to invoke the TI-syntax assembler (tiarmasm) on the TI-syntax assembly source file. The TI-syntax assembler only recognizes and parses TI-syntax Arm assembly language source to produce a valid Arm object file. Please see Invoking the TI-Syntax ARM Assembler from tiarmclang in the Migrating Assembly Language Source Code chapter in this migration guide for more information.

None of the options listed below are applicable to processing GNU-syntax Arm assembly source code with the tiarmclang compiler, but those that the armcl compiler uses to manage the behavior of its assembler (armasm) during compilation are listed below. Where applicable, it will be indicated how the armcl assembler option can be passed to the TI-syntax assembler via use of the tiarmclang compiler’s “-Xti-assembler” or “-Wti-a,” options.

armcl Option (and alias)

tiarmclang Option

--asm_listing (-al)

-Xti-assembler -l

The armcl compiler’s --asm_listing option instructs its standalone assembler to generate an assembly listing file.

The tiarmclang’s TI-syntax assembler can be made to generate an assembly listing file by passing the -l option as an argument to the -Xti-assembler option.

armcl Option (and alias)

tiarmclang Option

--c_src_interlist (-ss)

not applicable

The armcl compiler’s --c_src_interlist option instructs the compiler to generate comments interlisted with compiler-generated assembly that displays the correspondence between C/C++ statements and the assembly code that the compiler generated for those statements.

The tiarmclang compiler does not support interlisting C/C++ source code comments among compiler generated assembly.

armcl Option (and alias)

tiarmclang Option

--src_interlist (-s)

not applicable

The armcl compiler’s --src_interlist option instructs the compiler to generate comments interlisted with compiler-generated assembly that displays the correspondence between C/C++ source statements or optimized C/C++ source (if the optimizer is run) and the assembly code that the compiler generated for those statements.

The tiarmclang compiler does not support interlisting C/C++ source code comments among compiler generated assembly.

armcl Option (and alias)

tiarmclang Option

--absolute_listing (-aa)

not applicable

When the --absolute_listing option is specified to the armcl compiler, the compiler will invoke its absolute lister (armabs) during compilation to produce a listing annotated with absolute addresses rather than section-relative offsets.

The tiarmclang compiler does not have an absolute lister executable at its disposal, so there no equivalent functionality available in the tiarmclang compiler tools.

armcl Option (and alias)

tiarmclang Option

--asm_define=<name>[=<value>] (-ad=<name>[=<value>])

-Xti-assembler --define=<name>[=<value>]

The armcl compiler’s --asm_define option creates a pre-defined symbol for the assembler with an initial value indicated by the optional <value> argument. If no <value> argument is specified, then the symbol indicated by <name> gets a value of 1.

If the pre-defined symbol is intended for use by the TI-syntax assembler, then you can create the pre-defined symbol using the -Xti-assembler option.

armcl Option (and alias)

tiarmclang Option

--asm_dependency=<file> (-apd=<file>

-Xti-assembler --depend=<file>

The armcl compiler’s --asm_dependency option will cause the TI-syntax assembler (armasm) to pre-process a TI-syntax assembly source files and generate a list of dependencies (suitable for input to a standard make utility).

If invoking the tiarmclang TI-syntax assembler, then you can pass the --depend option as an argument to the tiarmclang -Xti-assembler option to cause the TI-syntax assembler to pre-process a TI-syntax assembly source file and generate a list of dependencies.

armcl Option (and alias)

tiarmclang Option

--asm_includes (-api)

-Xti-assembler --includes

The armcl compiler’s --asm_includes option will cause its TI-syntax standalone assembler (armasm) to pre-process an assembly source file and generate a list of included files.

If invoking the TI-syntax assembler from tiarmclang, then you can pass the --includes option as an argument to the tiarmclang -Xti-assembler option to cause the TI-syntax assembler to pre-process a TI-syntax assembly source file and generate a list of included files.

armcl Option (and alias)

tiarmclang Option

--asm_undefine=<name> (-au=<name>)

-Xti-assembler --undefine=<name>

You can undefine a symbol that is used in a TI-syntax assembly source file with the armcl compiler’s --asm_undefine option.

If invoking the tiarmclang’s TI-syntax assembler from tiarmclang, then you can pass the --undefine option as an argument to the tiarmclang -Xti-assembler option to undefine a symbol that may be referenced in a TI-syntax assembly source file.

armcl Option (and alias)

tiarmclang Option

--asm_cross_reference_listing (-ax)

-Xti-assembler -x

If the --asm_cross_reference_listing option is specified to the armcl compiler when processing a TI-syntax assembly source file, then the armcl’s standalone assembler (armasm) will be instructed to generate a cross-reference assembly listing file.

When invoking the TI-syntax assembler (tiarmasm) from the tiarmclang compiler, you can pass the -x option as an argument to the tiarmclang Xti-assembler option to cause the tiarmclang’s TI-syntax assembler to generate a cross reference listing file.

armcl Option (and alias)

tiarmclang Option

--include_file=<file> (-ahi=<file>)

-Xti-assembler -hi=<file>

The armcl compiler’s --include_file option indicates that the specified <file> should be prepended to the TI-syntax assembly source file that is being process as if a .include directive were specified on the first line of the assembly source file.

If invoking the TI-syntax assembler from tiarmclang, then you can pass the -hi option as an argument to the tiarmclang -Xti-assembler option to include the specified <file> at the top of the TI-syntax assembly source file that is being processed.