Add support for msp430.
[deliverable/binutils-gdb.git] / gas / doc / c-msp430.texi
CommitLineData
2469cfa2
NC
1@c Copyright 2002 Free Software Foundation, Inc.
2@c This is part of the GAS manual.
3@c For copying conditions, see the file as.texinfo.
4@ifset GENERIC
5@page
6@node MSP430-Dependent
7@chapter MSP 430 Dependent Features
8@end ifset
9@ifclear GENERIC
10@node Machine Dependencies
11@chapter MSP 430 Dependent Features
12@end ifclear
13
14@cindex MSP 430 support
15@cindex 430 support
16@menu
17* MSP430 Options:: Options
18* MSP430 Syntax:: Syntax
19* MSP430 Floating Point:: Floating Point
20* MSP430 Directives:: MSP 430 Machine Directives
21* MSP430 Opcodes:: Opcodes
22@end menu
23
24@node MSP430 Options
25@section Options
26@cindex MSP 430 options (none)
27@cindex options for MSP430 (none)
28@code{@value{AS}} has only -m flag which selects the mpu arch. Currently has
29no effect.
30
31@node MSP430 Syntax
32@section Syntax
33@menu
34* MSP430-Macros:: Macros
35* MSP430-Chars:: Special Characters
36* MSP430-Regs:: Register Names
37* MSP430-Ext:: Assembler Extensions
38@end menu
39
40@node MSP430-Macros
41@subsection Macros
42
43@cindex Macros, MSP 430
44@cindex MSP 430 macros
45The macro syntax used on the MSP 430 is like that described in the MSP
46430 Family Assembler Specification. Normal @code{@value{AS}}
47macros should still work.
48
49Additional built-in macros are:
50
51@table @code
52
53@item llo(exp)
54Extracts least significant word from 32-bit expression 'exp'.
55
56@item lhi(exp)
57Extracts most significant word from 32-bit expression 'exp'.
58
59@item hlo(exp)
60Extracts 3rd word from 64-bit expression 'exp'.
61
62@item hhi(exp)
63Extracts 4rd word from 64-bit expression 'exp'.
64
65@end table
66
67They normally being used as an immediate source operand.
68@smallexample
69 mov #llo(1), r10 ; == mov #1, r10
70 mov #lhi(1), r10 ; == mov #0, r10
71@end smallexample
72
73@node MSP430-Chars
74@subsection Special Characters
75
76@cindex line comment character, MSP 430
77@cindex MSP 430 line comment character
78@samp{;} is the line comment character.
79
80@cindex identifiers, MSP 430
81@cindex MSP 430 identifiers
82The character @samp{$} in jump instructions indicates current location and
83implemented only for TI syntax compatibility.
84
85@node MSP430-Regs
86@subsection Register Names
87
88@cindex MSP 430 register names
89@cindex register names, MSP 430
90General-purpose registers are represented by predefined symbols of the
91form @samp{r@var{N}} (for global registers), where @var{N} represents
92a number between @code{0} and @code{15}. The leading
93letters may be in either upper or lower case; for example, @samp{r13}
94and @samp{R7} are both valid register names.
95
96@cindex special purpose registers, MSP 430
97Register names @samp{PC}, @samp{SP} and @samp{SR} cannot be used as register names
98and will be treated as variables. Use @samp{r0}, @samp{r1}, and @samp{r2} instead.
99
100
101@node MSP430-Ext
102@subsection Assembler Extensions
103@cindex MSP430 Assembler Extensions
104
105@table @code
106
107@item @@rN
108As destination operand being treated as @samp{0(rn)}
109
110@item 0(rN)
111As source operand being treated as @samp{@@rn}
112
113@item jCOND +N
114Skips next N bytes followed by jump instruction and equivalent to
115@samp{jCOND $+N+2}
116
117@end table
118
119
120@node MSP430 Floating Point
121@section Floating Point
122
123@cindex floating point, MSP 430 (@sc{ieee})
124@cindex MSP 430 floating point (@sc{ieee})
125The MSP 430 family uses @sc{ieee} 32-bit floating-point numbers.
126
127@node MSP430 Directives
128@section MSP 430 Machine Directives
129
130@cindex machine directives, MSP 430
131@cindex MSP 430 machine directives
132@table @code
133@cindex @code{file} directive, MSP 430
134@item .file
135This directive is ignored; it is accepted for compatibility with other
136MSP 430 assemblers.
137
138@quotation
139@emph{Warning:} in other versions of the @sc{gnu} assembler, @code{.file} is
140used for the directive called @code{.app-file} in the MSP 430 support.
141@end quotation
142
143@cindex @code{line} directive, MSP 430
144@item .line
145This directive is ignored; it is accepted for compatibility with other
146MSP 430 assemblers.
147
148@cindex @code{sect} directive, MSP 430
149@item .arch
150Currently this directive is ignored; it is accepted for compatibility with other
151MSP 430 assemblers.
152
153@end table
154
155@node MSP430 Opcodes
156@section Opcodes
157
158@cindex MSP 430 opcodes
159@cindex opcodes for MSP 430
160@code{@value{AS}} implements all the standard MSP 430 opcodes. No
161additional pseudo-instructions are needed on this family.
162
163For information on the 430 machine instruction set, see @cite{MSP430
164User's Manual, document slau049b}, Texas Instrument, Inc.
This page took 0.029296 seconds and 4 git commands to generate.