Registers, variables and labels

Since GCC cannot check the assembler syntax, you can do anything within an assembler asm() statement. However, please note, that GCC does not use r0, r2, or r3. Therefore, if you mention one of these registers as an output parameter in an asm() statement, or as an alias for register variable, GCC will substitute some another register instead. Using r0, r2, or r3 as input parameters will result in the error "'asm' operand requires impossible reload".

Variables can be used in any normal way within asm() statement (mind name conversion for [Rr][0-15] names)

GCC defines labels with the following patterns:

".Lfe%="A function end label
".L__Frame_size_%s"See above
".L%="A local label for almost all purposes :)

where the %= modifier stands for a unique number within the file.

The following labels are defined for some expanded operands:

.Lsren%=
.Lsrcl%=
.Lsre%=
.Lae%=
.Lmsn%=
.Lcsn%=
.Lsend%=
.Lsst%=
.Leaq%=
.LcmpSIe%=

so, do not use these patterns. You may use any other label as you wish. Please note, that if label starts from .L it means, that the label is local and cannot be seen from another file as well as in disassembled output with msp430-objdump.