SHx Inline Assembly Language

Inline assembly language allows you to embed assembly-language instructions directly in your C and C++ source programs without extra assembly and link steps. The inline assembler is built into the compiler and does not require separate assembly. Because the inline assembler requires no extra steps, it is sometimes more convenient than using a separate assembler, especially in situations where access to processor resources is required.

The compiler cannot optimize code with inline assembly, but it can fully optimize code that with intrinsic functions. If optimization is important for your project, you should consider using intrinsic functions.

The following list shows appropriate uses for inline assembly.

  • Writing functions in assembly language
  • Making direct hardware access
  • Writing prolog and epilog code

See Also

Hitachi Guide | SH-4 and SH3-DSP Inline Assembly Language | Intrinsic Functions and SHx Inline Assembly | Elements of the SHx __asm Block | SHx Inline Assembly Samples

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.