26
BUILDING SPIM FOR UNIX SYSTEMS
27
==============================
29
These instructions explain how to compile and install spim and xspim on a
30
Unix system. It is not necessary to compile spim for PCs, as the web site
31
has precompiled versions.
33
To make SPIM, you must first run the Configure script:
37
Note: Configure compiles a program with the C compiler (cc). If you want it
38
to use another compiler, set the environment variable CC to its name, e.g.:
43
Next, edit the first few non-comment lines of Imakefile (or Makefile.std or
44
Makefile.cygwin, if you use one of those instead) to set the pathnames for
47
EXCEPTION_DIR -- The full pathname of the directory in which to
48
install the SPIM exception handler.
50
BIN_DIR -- The full pathname of the directory in which spim and
51
xspim should be installed.
53
MAN_DIR -- The full pathname of the directory in which the manual
54
pages for spim and xspim should be installed.
29
These instructions explain how to compile and install spim and xspim.
31
It is not necessary to compile PCSpim (the Microsoft Windows version), as
32
the spim web site contains a precompiled version.
34
To build spim (the terminal version) or xspim (the X-windows and Mac
37
1. Change to the directory "spim" to build spim. Change to the directory
38
"xspim" to build xspim
40
2. If necessary, edit the first few non-comment lines of the Makefile (or
41
the Imakefile if you are building xspim) to set the pathnames for your
44
EXCEPTION_DIR -- The full pathname of the directory in which to
45
install the SPIM exception handler.
47
BIN_DIR -- The full pathname of the directory in which spim and
48
xspim should be installed.
50
MAN_DIR -- The full pathname of the directory in which the manual
51
pages for spim and xspim should be installed.
56
53
In general, the remaining parameters need not be changed.
58
Then, if using Imakefile type:
56
3. If you are building spim type:
61
4. If you are building xspim, type:
63
If you want an X-window version of SPIM, also type:
68
If you do not have X-windows or the program xmkmf, edit the makefile in
69
Makefile.std or Makefile.cygwin and type:
71
% make -f Makefile.std test
72
% make -f Makefile.std xspim
75
To run spim or xspim, the exception handler code must be installed in the
76
directory specified by the variable EXCEPTION_DIR in the Makefile. If the file
77
exceptions.s is not installed, spim and xspim fail with a message before
78
they start running. You can either install this file by hand or by typing
66
5. To run spim or xspim, the exception handler code must be installed in the
67
directory specified by the variable EXCEPTION_DIR in the Makefile. If the
68
file "exceptions."s is not installed, spim and xspim fail with a message
69
before they start running. You can either install this file by hand or by
82
which also installs spim, xspim, and the manual pages in the directories that you set (above).
85
To test that spim is correctly built, type
74
which also installs spim, xspim, and the manual pages in the directories
78
6. To test that spim builds correctly, in the "spim" directory type
90
83
installed before running the test.)
96
SPIM works well on Windows. You can easily build spim (the non-windowing
97
version) using the Cygwin port of the GNU tools (see www.cygwin.com). The
98
Windows version of spim is called PCSpim and is distributed through:
100
www.cs.wisc.edu/~larus/spim.html
86
BUILDING SPIM ON MICROSOFT WINDOWS
87
==================================
89
spim (the terminal version) works well on Microsoft Windows. You can easily
90
build it using the Cygwin port of the GNU tools (see www.cygwin.com).
92
The Microsoft Windows version of spim is called PCSpim and is built using
93
Microsoft Visual Studio. You can get the files separately from
94
www.cs.wisc.edu/~larus/spim.html
105
99
===================
107
101
I generally release new version of SPIM once a year, before a semester
108
boundary (late August or early January). The new version are available
102
boundary (late August or early January). The new version are available on:
111
104
www.cs.wisc.edu/~larus/spim.html
115
The files in this directory are:
118
A short description of SPIM.
121
A shell script to configure SPIM.
124
Input file for the xmkmf program, which produces Makefile for your
128
This makefile builds spim (but not xspim--use PCSpim instead) under
129
the Cygnus Cygwin tools running on Windows. Very cool and very
133
A default makefile. Only use this file if you do not have xmkmf
108
This directory contains several files and subdirectories:
136
110
README This file.
139
113
Version number of system.
142
X-interface code for command buttons.
145
Code to handle data directives.
148
Code to build instructions and manipulate symbol table.
151
Code to maintain memory.
154
Code to handle system calls and exceptions.
157
Definition of operations.
160
Assembly command parser (YACC).
163
Register access macros.
166
Instruction simulator.
169
Lexical analyzer (LEX).
174
spim-utils.c, spim-utils.h
184
X-interface code to build windows.
187
Top-level X-interface.
190
Standard exception handler.
116
Record of changes to spim code.
119
TeX document that describes SPIM.
121
Documentation/H_P_AppendixA
122
Copy of Appendix A from Hennessey & Patterson's book "Computer
123
Organization and Design". This more up-to-date than the TeX documentation.
126
Microsoft Windows interface to SPIM
129
Installer code for PCSpim.
132
Terminal interfaces to spim (Microsoft Windows, Unix, and Mac).
193
135
Subdirectory contain torture tests to verify that SPIM works.
195
Documentation/spim.tex
196
TeX document that describes SPIM.
198
Documentation/spim.ps
199
Postscript version of TeX document.
138
X-Windows interface to spim (Unix and Mac).