ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles

In this book, we have shown how to combine modules written in assembly language and high-level languages. Most commonly, high-level language programs will call custom assembly language routines, though we have also demonstrated how a main program in assembly language could call functions written in a high-level language.

Some programming environments define inline assembly as a method to integrate assembly language into a high-level language, typically using a generic function-like construct whose argument is a short sequence of assembly language instructions.

Inline assembly support in Itanium programming languages allows system and application developers to:

  • gain access to machine resources, such as the psr (the process status register) or control registers (Appendix D);

  • manipulate cache structures and the register stack; and

  • utilize the powerful multimedia instructions (Chapter 12), which may not otherwise be available through high-level language compilers.

Machine instructions inserted directly into the source avoid the overhead associated with calling and returning from external functions. Moreover, the compiler can better optimize intrinsic functions than external functions.

Категории