![](https://csdnimg.cn/release/download_crawler_static/7143859/bg13.jpg)
Examples
xix
Contents
Examples
2−1 Using the inline keyword 2-39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2−2 How the Run-Time-Support Library Uses the _INLINE Preprocessor Symbol 2-41. . . . . . . . .
2−3 An Interlisted Assembly Language File 2-47. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3−1 Software Pipelining Information 3-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3−2 The Function From Example 2−3 Compiled With the −O2 and −os Options 3-31. . . . . . . . . .
3−3 The Function From Example 2−3 Compiled With the −O2, −os, and −ss Options 3-32. . . . .
3−4 Strength Reduction, Induction Variable Elimination, Register Variables,
and Software Pipelining 3-36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3−5 Control-Flow Simplification and Copy Propagation 3-39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3−6 Data Flow Optimizations and Expression Simplification 3-42. . . . . . . . . . . . . . . . . . . . . . . . . . .
3−7 Inline Function Expansion 3-43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3−8 Register Tracking/Targeting 3-45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−1 Linear Assembly Code for Computing a Dot Product 4-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−2 C Code for Computing a Dot Product 4-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−3 Lmac Function Code Showing Comments 4-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−4 Load and Store Instructions That Specify Memory Bank Information 4-36. . . . . . . . . . . . . . . .
4−5 C Code for Dot Product 4-37. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−6 Linear Assembly for Dot Product 4-38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−7 Dot Product Software-Pipelined Kernel 4-38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−8 Dot Product From Example 4−6 Unrolled to Prevent Memory Bank Conflicts 4-39. . . . . . . . .
4−9 Unrolled Dot Product Kernel From Example 4−7 4-40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−10 Using .mptr for Indexed Pointers 4-41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−11 Annotating a Memory Reference 4-44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−12 Software Pipeline Using .mdep ld1, st1 4-45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4−13 Software Pipeline Using .mdep st1, ld1 and .mdep ld1, st1 4-45. . . . . . . . . . . . . . . . . . . . . . . .
5−1 Sample Linker Command File 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6−1 Sample Stand-Alone Simulator Banners 6-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6−2 Passing Options on the Command-Line 6-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6−3 Profiling Dot Product Routines 6-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6−4 C Code With Clock Function 6-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6−5 Stand-Alone Simulator Results After Compiling and Linking Example 6−4 6-10. . . . . . . . . . .
7−1 Define and Use Control Registers 7-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7−2 Use of the restrict type qualifier with pointers 7-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7−3 Use of the restrict type qualifier with arrays 7-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7−4 Using the CODE_SECTION Pragma 7-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7−5 Using the DATA_MEM_BANK Pragma 7-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .