__asm Restrictions in SHx Inline Assembly

An __asm line record can be any valid assembly operation code accepted by the stand-alone assembler. In addition, an __asm line record can contain a label definition or a comment as described in the previous sections. However, there are some coding restrictions:

  • No directives except for .prolog are allowed in the __asm instruction stream. If the prolog end is not at the function start, it must be marked within an __asm statement using this directive. For more information on function prologs and epilogs, see SH-3 Calling Sequence Specification and SH-4 Calling Sequence Specification.
  • For SH3-DSP, the REPEAT and REPEAT_PREFETCH operations are not allowed in the __asm instruction stream.
  • No expansion of assembler instructions is performed. After scaling, immediate values must fit in the associated object code field for the instruction.

See Also

Elements of the SHx __asm Block | The __asm Keyword in SHx Inline Assembly | SH-4 Mode Bits | Constants in SHx Inline Assembly | Symbols and Labels in SHx Inline Assembly | SHx Inline Assembly Parameters | Branching in SHx Inline Assembly

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.