You copied the Doc URL to your clipboard.

Inline assembler instruction restrictions in C and C++ code

The following instructions are not supported in the inline assembler:

  • BKPT, BX, BXJ, and BLX instructions.


    You can insert a BKPT instruction in C and C++ code by using the __breakpoint() intrinsic.

  • LDR Rn, =expression pseudo-instruction. Use MOV Rn, expression instead. (This can generate a load from a literal pool.)

  • LDRT, LDRBT, STRT, and STRBT instructions.

  • MUL, MLA, UMULL, UMLAL, SMULL, and SMLAL flag setting instructions.

  • MOV or MVN flag-setting instructions where the second operand is a constant.

  • The special LDM instructions used in system or supervisor mode to load the user-mode banked registers, written with a ^ after the register list, such as:

    LDMIA sp!, {r0-r12, lr, pc}^
  • ADR and ADRL pseudo-instructions.


    You can use MOV Rn, &expression; instead of the ADR and ADRL pseudo-instructions.