mspgcc: A port of the GNU tools to the Texas Instruments MSP430 microcontrollers | ||
---|---|---|
<<< Previous | Using inline assembly language in C programs with mspgcc | Next >>> |
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 :) |
The following labels are defined for some expanded operands:
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..Lsren%=
.Lsrcl%=
.Lsre%=
.Lae%=
.Lmsn%=
.Lcsn%=
.Lsend%=
.Lsst%=
.Leaq%=
.LcmpSIe%=
<<< Previous | Home | Next >>> |
Using inline assembly language in C programs with mspgcc | Up | Library calls |