mipsy.texi 5.38 KB
Newer Older
Benoit Perrot's avatar
Benoit Perrot committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
\input texinfo @c -*-texinfo-*-
@comment %**start of header
@setfilename mipsy.info
@include version.texi
@settitle Mipsy @value{VERSION}
@setchapternewpage odd
@finalout
@comment %**end of header

@c @href(URL, TITLE)
@c -----------------
@c A replacement for @uref that puts the URL in the footnotes when
@c not in HTML.
@ifhtml
@macro href{url, title}
@uref{\url\, \title\}
@end macro
@end ifhtml
@ifnothtml
@macro href{url, title}
\title\@footnote{\title\, @url{\url\}.}
@end macro
@end ifnothtml

@macro wiki
http://www.lrde.epita.fr/cgi-bin/twiki/view
@end macro

@macro mipsy
@acronym{MIPSY}
@end macro

@macro spim
@acronym{SPIM}
@end macro


@copying

This manual is for @acronym{MIPSY} (version @value{VERSION},
@value{UPDATED}), the tiny MIPS simulator.

Copyright @copyright{} 2003 Benoit Perrot.

@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the @acronym{GNU} Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, with the Front-Cover texts
being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in
(a) below.  A copy of the license is included in the section entitled
``@acronym{GNU} Free Documentation License.''

(a) The @acronym{FSF}'s Back-Cover Text is: ``You have freedom to copy
and modify this @acronym{GNU} Manual, like @acronym{GNU} software.
Copies published by the Free Software Foundation raise funds for
@acronym{GNU} development.''
@end quotation
@end copying

@dircategory GNU programming tools
@direntry
* mipsy: (mipsy).       The Tiny MIPS Simulator.
@end direntry

@titlepage
@title mipsy
@subtitle The Tiny MIPS Simulator
@subtitle @value{UPDATED}, @acronym{MIPSY} Version @value{VERSION}

@author Benoit Perrot

@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents

@ifnottex
@node Top
@top Mipsy
@insertcopying
@end ifnottex



@mipsy{} is a MIPS simulator designed to execute simple register based 
MIPS assembly code. It is a minimalist MIPS virtual machine, which 
allows unlimited registers.

Its features are:
@itemize @minus
@item
sufficient support of MIPS instruction set
@item
illimited registers
@end itemize

It was written by Benoit Perrot as an @acronym{LRDE} member, so that
@acronym{EPITA} students could exercise their compiler projects after
the instruction selection but before the register allocation.
It is implemented in C++ and Python. Be aware that @mipsy{} does not need 
a Python interpreter to run ; it is required to maintain @mipsy{}.

Information about @mipsy{} can be found on @href{@wiki{}/Projects/Mipsy,
@mipsy{} Home Page}, and feedback can be sent to
@href{projects@@lrde.epita.fr, @acronym{lrde}'s Projects Address}.
@acronym{LRDE} stands for @href{http://www.lrde.epita.fr, Laboratoire de
Recherche et Dévelopment de l'@acronym{EPITA}}, i.e., the Research and
Development Labof @acronym{EPITA}, the @href{http://www.epita.fr, Ecole
Pour l'Informatique et les Techniques Avancées}.

@href{FIXME:, Andrew Appel's home page} includes links to material
related to compilers theory, and some information about the
@href{FIXME:, Modern Compiler Implementation} book series.

More information on Python can be found on
@href{http://www.python.org, Python Home Page}. 

@menu
* Invoking @mipsy{}::
Benoit Perrot's avatar
Benoit Perrot committed
123
* Internal of @mipsy{}::
Benoit Perrot's avatar
Benoit Perrot committed
124
125
126
127
128
129
130
* The @mipsy{} Language::
* Copying This Manual::
* Index::

@detailmenu
 --- The Detailed Node Listing ---

Benoit Perrot's avatar
Benoit Perrot committed
131
132
133
134
Internal of @mipsy{}

* Steps of @mipsy{} ::

Benoit Perrot's avatar
Benoit Perrot committed
135
136
137
138
139
140
141
142
143
144
145
146
The @mipsy{} Language

* The @mipsy{} supported instruction set::
* @mipsy{} features::

Copying This Manual

* GNU Free Documentation License::  License for copying this manual.

@end detailmenu
@end menu

Benoit Perrot's avatar
Benoit Perrot committed
147
@c ---------------------------------------------------------
Benoit Perrot's avatar
Benoit Perrot committed
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@node Invoking @mipsy{}
@chapter Invoking @mipsy{}

To invoke @command{mipsy} run

@example
mipsy @var{options} @var{file}
@end example

@noindent
where @file{file.s} is a simple text file, and @var{options} is any
combination of the following options:

@table @code
@item -?
@itemx --help
Display a help message and exit successfully.

@item -V
@itemx --version
Display the version number and exit successfully.

@item FIXME:
Document the rest of it.
@end table

Benoit Perrot's avatar
Benoit Perrot committed
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

@c ---------------------------------------------------------
@node Internal of @mipsy{}
@chapter Internal of @mipsy{}

@menu
* Steps of @mipsy{}::
@end menu

@node Steps of @mipsy{}
@section Steps of @mipsy{}

@mipsy{} works in three steps:
@itemize @minus
@item it scan and parse the file (lexical and syntaxical analysis), 
producing an abstract representation of a program;
@item it resolve the program, checking the existence of labels used and
computing branch offsets (assembly);
@item it loads the resolved program in the virtual machine,
search for an entry point labeled `main' and start execution (execution).
@end itemize


@c ---------------------------------------------------------
Benoit Perrot's avatar
Benoit Perrot committed
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
@node The @mipsy{} Language
@chapter The @mipsy{} Language

@mipsy{} supports a minimal MIPS instruction set and unlimited 
registers.

@menu
* The @mipsy{} supported instruction set::
* @mipsy{} features::
@end menu

@node The @mipsy{} supported instruction set
@section The @mipsy{} supported instruction set

@node @mipsy{} features
@section @mipsy{} features

@node Copying This Manual
@appendix Copying This Manual

@menu
* GNU Free Documentation License::  License for copying this manual.
@end menu

@include fdl.texi

@node Index
@unnumbered Index

@printindex cp

@bye