source: trunk/src/binutils/gas/doc/c-mips.texi@ 10

Last change on this file since 10 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 11.9 KB
Line 
1@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000
2@c Free Software Foundation, Inc.
3@c This is part of the GAS manual.
4@c For copying conditions, see the file as.texinfo.
5@ifset GENERIC
6@page
7@node MIPS-Dependent
8@chapter MIPS Dependent Features
9@end ifset
10@ifclear GENERIC
11@node Machine Dependencies
12@chapter MIPS Dependent Features
13@end ifclear
14
15@cindex MIPS processor
16@sc{gnu} @code{@value{AS}} for @sc{mips} architectures supports several
17different @sc{mips} processors, and MIPS ISA levels I through V, MIPS32,
18and MIPS64. For information about the @sc{mips} instruction set, see
19@cite{MIPS RISC Architecture}, by Kane and Heindrich (Prentice-Hall).
20For an overview of @sc{mips} assembly conventions, see ``Appendix D:
21Assembly Language Programming'' in the same work.
22
23@menu
24* MIPS Opts:: Assembler options
25* MIPS Object:: ECOFF object code
26* MIPS Stabs:: Directives for debugging information
27* MIPS ISA:: Directives to override the ISA level
28* MIPS autoextend:: Directives for extending MIPS 16 bit instructions
29* MIPS insn:: Directive to mark data as an instruction
30* MIPS option stack:: Directives to save and restore options
31@end menu
32
33@node MIPS Opts
34@section Assembler options
35
36The @sc{mips} configurations of @sc{gnu} @code{@value{AS}} support these
37special options:
38
39@table @code
40@cindex @code{-G} option (MIPS)
41@item -G @var{num}
42This option sets the largest size of an object that can be referenced
43implicitly with the @code{gp} register. It is only accepted for targets
44that use @sc{ecoff} format. The default value is 8.
45
46@cindex @code{-EB} option (MIPS)
47@cindex @code{-EL} option (MIPS)
48@cindex MIPS big-endian output
49@cindex MIPS little-endian output
50@cindex big-endian output, MIPS
51@cindex little-endian output, MIPS
52@item -EB
53@itemx -EL
54Any @sc{mips} configuration of @code{@value{AS}} can select big-endian or
55little-endian output at run time (unlike the other @sc{gnu} development
56tools, which must be configured for one or the other). Use @samp{-EB}
57to select big-endian output, and @samp{-EL} for little-endian.
58
59@cindex MIPS architecture options
60@item -mips1
61@itemx -mips2
62@itemx -mips3
63@itemx -mips4
64@itemx -mips5
65@itemx -mips32
66@itemx -mips64
67Generate code for a particular MIPS Instruction Set Architecture level.
68@samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors,
69@samp{-mips2} to the @sc{r6000} processor, @samp{-mips3} to the
70@sc{r4000} processor, and @samp{-mips4} to the @sc{r8000} and
71@sc{r10000} processors. @samp{-mips5}, @samp{-mips32}, and
72@samp{-mips64} correspond to generic @sc{MIPS V}, @sc{MIPS32}, and
73@sc{MIPS64} ISA processors, respectively. You can also switch
74instruction sets during the assembly; see @ref{MIPS ISA, Directives to
75override the ISA level}.
76
77@item -mgp32
78Assume that 32-bit general purpose registers are available. This
79affects synthetic instructions such as @code{move}, which will assemble
80to a 32-bit or a 64-bit instruction depending on this flag. On some
81MIPS variants there is a 32-bit mode flag; when this flag is set,
8264-bit instructions generate a trap. Also, some 32-bit OSes only save
83the 32-bit registers on a context switch, so it is essential never to
84use the 64-bit registers.