1 @c Copyright (C) 1997 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
6 @chapter v850 Dependent Features
10 * V850 Options:: Options
11 * V850 Syntax:: Syntax
12 * V850 Floating Point:: Floating Point
13 * V850 Directives:: V850 Machine Directives
14 * V850 Opcodes:: Opcodes
19 @cindex V850 options (none)
20 @cindex options for V850 (none)
21 @code{@value{AS}} has no additional command-line options for the V850
27 * V850-Chars:: Special Characters
28 * V850-Regs:: Register Names
32 @subsection Special Characters
34 @cindex line comment character, V850
35 @cindex V850 line comment character
36 @samp{#} is the line comment character.
38 @subsection Register Names
40 @cindex V850 register names
41 @cindex register names, V850
42 @code{@value{AS}} supports the following names for registers:
44 @cindex @code{zero} register, V850
45 @item general register 0
47 @item general register 1
49 @item general register 2
51 @cindex @code{sp} register, V850
52 @item general register 3
54 @cindex @code{gp} register, V850
55 @item general register 4
57 @cindex @code{tp} register, V850
58 @item general register 5
60 @item general register 6
62 @item general register 7
64 @item general register 8
66 @item general register 9
68 @item general register 10
70 @item general register 11
72 @item general register 12
74 @item general register 13
76 @item general register 14
78 @item general register 15
80 @item general register 16
82 @item general register 17
84 @item general register 18
86 @item general register 19
88 @item general register 20
90 @item general register 21
92 @item general register 22
94 @item general register 23
96 @item general register 24
98 @item general register 25
100 @item general register 26
102 @item general register 27
104 @item general register 28
106 @item general register 29
108 @cindex @code{ep} register, V850
109 @item general register 30
111 @cindex @code{lp} register, V850
112 @item general register 31
114 @cindex @code{eipc} register, V850
115 @item system register 0
117 @cindex @code{eipsw} register, V850
118 @item system register 1
120 @cindex @code{fepc} register, V850
121 @item system register 2
123 @cindex @code{fepsw} register, V850
124 @item system register 3
126 @cindex @code{ecr} register, V850
127 @item system register 4
129 @cindex @code{psw} register, V850
130 @item system register 5
132 @c start-santize-v850e
133 @cindex @code{ctpc} register, V850
134 @item system register 16
136 @cindex @code{ctpsw} register, V850
137 @item system register 17
139 @cindex @code{dbpc} register, V850
140 @item system register 18
142 @cindex @code{dbpsw} register, V850
143 @item system register 19
145 @cindex @code{ctbp} register, V850
146 @item system register 20
151 @node V850 Floating Point
152 @section Floating Point
154 @cindex floating point, V850 (@sc{ieee})
155 @cindex V850 floating point (@sc{ieee})
156 The V850 family uses @sc{ieee} floating-point numbers.
158 @node V850 Directives
159 @section V850 Machine Directives
161 @cindex machine directives, V850
162 @cindex V850 machine directives
164 @cindex @code{offset} directive, V850
165 @item .offset @var{<expression>}
166 Moves the offset into the current section to the specified amount.
168 @cindex @code{section} directive, V850
169 @item .section "name", <type>
170 This is an extension to the standard .section directive. It sets the
171 current section to be <type> and creates an alias for this section
180 @cindex opcodes for V850
181 @code{@value{AS}} implements all the standard V850 opcodes.
183 @code{@value{AS}} also implements the following pseudo ops:
187 @cindex @code{hi} pseudo-op, V850
189 Computes the higher 16 bits of the given expression and stores it into
190 the immediate operand field of the given instruction. For example:
192 @samp{mulhi hi(here - there), r5, r6}
194 computes the difference between the address of labels 'here' and
195 'there', takes the upper 16 bits of this difference, shifts it down 16
196 bits and then mutliplies it by the lower 16 bits in register 5, putting
197 the result into register 6.
200 @cindex @code{lo} pseudo-op, V850
202 Computes the lower 16 bits of the given expression and stores it into
203 the immediate operand field of the given instruction. For example:
205 @samp{addi lo(here - there), r5, r6}
207 computes the difference between the address of labels 'here' and
208 'there', takes the lower 16 bits of this difference and adds it to
209 register 5, putting the result into register 6.
211 @cindex @code{sdaoff} pseudo-op, V850
213 Computes the offset of the named variable from the start of the Small
214 Data Area (whoes address is held in register 4, the GP register) and
215 stores the result as a 16 bit signed value in the immediate operand
216 field of the given instruction. For example:
218 @samp{ld.w sdaoff(_a_variable)[gp],r6}
220 loads the contents of the location pointed to by the label '_a_variable'
221 into register 6, provided that the label is located somewhere within +/-
222 32K of the address held in the GP register. [Note the linker assumes
223 that the GP register contains a fixed address set to the address of the
224 label called '__gp'. This can either be set up automatically by the
225 linker, or specifically set by using the @samp{--defsym __gp=<value>}
226 command line option].
228 @cindex @code{tdaoff} pseudo-op, V850
230 Computes the offset of the named variable from the start of the Tiny
231 Data Area (whoes address is held in register 30, the EP register) and
232 stores the result as a
233 @c start-santize-v850e
236 7 or 8 bit unsigned value in the immediate
237 operand field of the given instruction. For example:
239 @samp{sld.w tdaoff(_a_variable)[ep],r6}
241 loads the contents of the location pointed to by the label '_a_variable'
242 into register 6, provided that the label is located somewhere within +256
243 bytes of the address held in the EP register. [Note the linker assumes
244 that the EP register contains a fixed address set to the address of the
245 label called '__ep'. This can either be set up automatically by the
246 linker, or specifically set by using the @samp{--defsym __ep=<value>}
247 command line option].
249 @cindex @code{zdaoff} pseudo-op, V850
251 Computes the offset of the named variable from address 0 and stores the
252 result as a 16 bit signed value in the immediate operand field of the
253 given instruction. For example:
255 @samp{movea zdaoff(_a_variable),zero,r6}
257 puts the address of the label '_a_variable' into register 6, assuming
258 that the label is somewhere within the first 32K of memory. (Strictly
259 speaking it also possible to access the last 32K of memory as well, as
260 the offsets are signed).
265 For information on the V850 or Thumb instruction sets, see @cite{V850
266 Family 32-/16-Bit single-Chip Microcontroller Architecture Manual} from NEC.