4.1. Translating Legacy TI-Syntax Arm Assembly to GNU-Syntax Arm Assembly

This area of the “Migrating Assembly Language Source Code” section addresses how to convert explicit legacy TI-syntax Arm assembly language in an assembly source file into GNU-syntax Arm assembly language.

First, we will go through a discussion of the anatomy of a given assembly language source line, noting differences between the rules employed for legacy TI-syntax Arm assembly versus GNU-syntax Arm assembly in each field of a line of assembly source.

Second, we’ll consider concerns that may surface when converting Arm assembly instructions from legacy TI-syntax to GNU-syntax.

Third, we’ll discuss how to deal with converting assembly directives from legacy TI-syntax to GNU-syntax. While many of the legacy TI-syntax assembly directives have a functionally equivalent GNU-syntax counterpart, some may require more than one line of GNU-syntax assembly (the .usect directive, for example) when converted. Other legacy TI-syntax assembly directives may not have a functionally equivalent GNU-syntax counterpart and, similarly, some GNU-syntax assembly directives do not have functionally equivalent legacy TI-syntax counterparts.

Finally, the migration of assembly macro definitions from legacy TI-syntax to GNU-syntax will be taken up in some detail. Assembly macro definitions consist of more than just the .macro and .endm directives that define the beginning and end of the scope of a given macro definition. One must also address the conversion of macro parameter references and the definition of and references to local labels that are used in the scope of a macro definition.