Assembly Code
6-3
Optimizing Assembly Code via Linear Assembly
Each example discusses the:
-
Algorithm in C code
-
Translation of the C code to linear assembly
-
Dependency graph to describe the flow of data in the algorithm
-
Allocation of resources (functional units, registers, and cross paths) in lin-
ear assembly
Note:
There are three types of code for the ’C6000: C/C++ code (which is input for
the C/C++ compiler), linear assembly code (which is input for the assembly
optimizer), and assembly code (which is input for the assembler).
In the three sections following section 6.2, we use the dot product to demon-
strate how to use various programming techniques to optimize both perfor-
mance and code size. Most of the examples provided in this book use fixed-
point arithmetic; however, the three sections following section 6.2 give both
fixed-point and floating-point examples of the dot product to show that the
same optimization techniques apply to both fixed- and floating-point pro-
grams.