With the Alpha edition of the Visual C++ compiler, the _ _asm, _ _fasm, and _ _dasm statements, introduced in the previous chapter, are especially flexible and powerful. You can use these statements, collectively referred to as “_ _asm statements,” within C/C++ source code in many different ways. This section provides two examples that illustrate some of the fine points of these _ _asm statements, illustrate how instructions are generated, and show how inline assembly code interacts with surrounding C/C++ source code.
The Microsoft Visual C++ compiler generates high-quality Alpha assembly-language code. Therefore, use _ _asm statements only when necessary; for example, when the Visual C++ compiler is not optimizing a certain section of code to your expectations. The examples shown here have been designed to illustrate the use of _ _asm statements; they are not inherently any more efficient than the code typically produced directly by the Visual C++ compiler.
This section has the following topics:
These examples are designed to show the very natural way in which _ _asm statements are often incorporated into C/C++ code on Alpha, via parameterized macros.