summaryrefslogtreecommitdiff
path: root/emulators/spim
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1996-10-30 01:58:56 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1996-10-30 01:58:56 +0000
commit196a4cf5d1719a0c0602ce2b652e9614b4e2d915 (patch)
tree27c22f9e4dc3cf820ba1e73ac2607ccf559f9a4b /emulators/spim
parentdistfile changed (diff)
New port, spim/xspim, a MIPS R2000 RISC Simulator
Notes
Notes: svn path=/head/; revision=4193
Diffstat (limited to 'emulators/spim')
-rw-r--r--emulators/spim/Makefile48
-rw-r--r--emulators/spim/distinfo1
-rw-r--r--emulators/spim/files/patch-0139
-rw-r--r--emulators/spim/files/patch-0211
-rw-r--r--emulators/spim/files/patch-0367
-rw-r--r--emulators/spim/pkg-comment1
-rw-r--r--emulators/spim/pkg-descr15
-rw-r--r--emulators/spim/pkg-plist9
8 files changed, 191 insertions, 0 deletions
diff --git a/emulators/spim/Makefile b/emulators/spim/Makefile
new file mode 100644
index 000000000000..b3bedcb45400
--- /dev/null
+++ b/emulators/spim/Makefile
@@ -0,0 +1,48 @@
+# ex:ts=8
+# New ports collection makefile for: spim
+# Version required: 5.8
+# Date created: Mon Oct 28, 1996
+# Whom: David O'Brien (obrien@cs.ucdavis.edu)
+#
+# $Id$
+#
+
+DISTNAME= spim
+PKGNAME= spim-5.8
+CATEGORIES+= emulators
+MASTER_SITES= ftp://ftp.cs.wisc.edu/pub/spim/
+
+MAINTAINER= obrien@cs.ucdavis.edu
+
+PREFIX?= ${LOCALBASE}
+NO_WRKSUBDIR= yes
+HAS_CONFIGURE= yes
+CONFIGURE_SCRIPT= Configure
+USE_IMAKE= yes
+XMKMF= xmkmf
+ALL_TARGET= y.tab.c depend cl-spim cl-xspim
+
+
+pre-configure:
+ @${RM} -f ${WRKSRC}/y.tab.*
+
+pre-install:
+ @${MKDIR} -p ${PREFIX}/share/spim && chmod a+rx ${PREFIX}/share/spim
+
+post-install:
+ [ -e ${PREFIX}/bin/cl-spim ] && \
+ /bin/ln -f ${PREFIX}/bin/cl-spim ${PREFIX}/bin/spim
+ [ -e ${PREFIX}/bin/cl-xspim ] && \
+ /bin/ln -f ${PREFIX}/bin/cl-xspim ${PREFIX}/bin/xspim
+.if !defined(NOPORTDOCS)
+ @${ECHO} "Installing spim/xspim documentation"
+ @${MKDIR} -p ${PREFIX}/share/doc/spim \
+ && chmod a+rx ${PREFIX}/share/doc/spim
+ ${INSTALL_DATA} ${WRKSRC}/Documentation/spim.ps \
+ ${PREFIX}/share/doc/spim
+ ${INSTALL_DATA} ${WRKSRC}/Documentation/cycle.ps \
+ ${PREFIX}/share/doc/spim
+ gzip -9nf ${PREFIX}/share/doc/spim/*.ps
+.endif
+
+.include <bsd.port.mk>
diff --git a/emulators/spim/distinfo b/emulators/spim/distinfo
new file mode 100644
index 000000000000..2c772538fe6a
--- /dev/null
+++ b/emulators/spim/distinfo
@@ -0,0 +1 @@
+MD5 (spim.tar.gz) = 20c8fc70ebc522a1a9655ab691fee826
diff --git a/emulators/spim/files/patch-01 b/emulators/spim/files/patch-01
new file mode 100644
index 000000000000..0c877164e959
--- /dev/null
+++ b/emulators/spim/files/patch-01
@@ -0,0 +1,39 @@
+--- Imakefile.orig Tue Oct 10 10:20:07 1995
++++ Imakefile Tue Oct 29 17:19:52 1996
+@@ -57,13 +57,13 @@
+ #
+
+ # Full path for directory that will hold the trap handler file:
+-TRAP_DIR = /usr/unsup/lib
++TRAP_DIR = $(PREFIX)/share/spim
+
+ # Full path for the directory that will hold the executable files:
+-BIN_DIR = /usr/unsup/bin
++BIN_DIR = $(PREFIX)/bin
+
+ # Full path for the directory that will hold the man files:
+-MAN_DIR = /var/unsup/man
++MAN_DIR = $(PREFIX)/man/man1
+
+
+ # If you have flex, use it instead of lex. If you use flex, define this
+@@ -163,8 +163,8 @@
+ NormalProgramTarget(cl-spim_sub,$(CLOBJS),,,)
+ NormalProgramTarget(cl-xspim_sub,$(XCLOBJS),$(DEPLIBS),$(LOCALLIBS),$(SYSLIBS))
+
+-InstallProgram(spim,$(BIN_DIR))
+-InstallProgram(xspim,$(BIN_DIR))
++InstallProgram(cl-spim,$(BIN_DIR))
++InstallProgram(cl-xspim,$(BIN_DIR))
+ InstallManPage(spim,$(MAN_DIR))
+ InstallManPage(xspim,$(MAN_DIR))
+ InstallNonExec(trap.handler,$(TRAP_DIR))
+@@ -290,7 +290,7 @@
+ mv -f lex.yy.c.xx lex.yy.c
+
+ depend::
+- makedepend -w10 *.c
++ makedepend -w10 -I$(X11BASE)/include *.c
+
+ #
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/emulators/spim/files/patch-02 b/emulators/spim/files/patch-02
new file mode 100644
index 000000000000..dcc77703eaa3
--- /dev/null
+++ b/emulators/spim/files/patch-02
@@ -0,0 +1,11 @@
+--- cl-except.h.orig Fri Aug 25 07:05:25 1995
++++ cl-except.h Mon Oct 28 23:34:02 1996
+@@ -25,7 +25,7 @@
+ #define _BSD_SIGNALS
+ #endif
+
+-#include <syscall.h>
++#include <sys/syscall.h>
+ #include <signal.h>
+
+ /* gdb-style for tracking each signal */
diff --git a/emulators/spim/files/patch-03 b/emulators/spim/files/patch-03
new file mode 100644
index 000000000000..9d2c6e1418d7
--- /dev/null
+++ b/emulators/spim/files/patch-03
@@ -0,0 +1,67 @@
+--- cl-except.c.orig Fri Aug 25 07:13:05 1995
++++ cl-except.c Tue Oct 29 00:37:44 1996
+@@ -46,6 +46,7 @@
+ /* Exported Variables: */
+
+ mem_addr breakpoint_reinsert; /* !0 -> reinsert break at this address */
++spim_proc proc; /* spim's signal tracking structure */
+
+
+ /* Imported Variables: */
+@@ -67,14 +68,14 @@
+ #ifdef __STDC__
+ static void intercept_signals (int sig, int code, struct sigcontext *scp);
+ static mem_addr compute_branch_target (instruction *inst);
+-static void psignal (int sig);
++static void spim_psignal (int sig);
+ static int issig (void);
+ static int psig (void);
+ static void sendsig (void);
+ #else
+ static void intercept_signals ();
+ static mem_addr compute_branch_target ();
+-static void psignal ();
++static void spim_psignal ();
+ static int issig ();
+ static int psig ();
+ static void sendsig ();
+@@ -266,7 +267,7 @@
+
+ else if (retval == 0)
+ /* bad system call --> turn into a signal */
+- psignal (excpt_handler[SYSCALL_EXCPT].sig);
++ spim_psignal (excpt_handler[SYSCALL_EXCPT].sig);
+
+ retval = !retval; /* retval == 1 -> syscall ok;
+ * retval == 0 -> syscall bad */
+@@ -286,7 +287,7 @@
+ case IBUS_EXCPT:
+ case DBUS_EXCPT:
+ case CPU_EXCPT:
+- psignal (excpt_handler[excpt_code].sig);
++ spim_psignal (excpt_handler[excpt_code].sig);
+ break;
+
+
+@@ -456,7 +457,7 @@
+ }
+ else if (spim_related_sig & (1 << sig))
+ cycle_steps = 0;
+- else psignal (sig);
++ else spim_psignal (sig);
+ }
+
+
+@@ -466,10 +467,10 @@
+
+ #ifdef __STDC__
+ static void
+-psignal (int sig)
++spim_psignal (int sig)
+ #else
+ static void
+-psignal (sig)
++spim_psignal (sig)
+ int sig;
+ #endif
+ {
diff --git a/emulators/spim/pkg-comment b/emulators/spim/pkg-comment
new file mode 100644
index 000000000000..774dcff69a7b
--- /dev/null
+++ b/emulators/spim/pkg-comment
@@ -0,0 +1 @@
+MIPS R2000 Simulator
diff --git a/emulators/spim/pkg-descr b/emulators/spim/pkg-descr
new file mode 100644
index 000000000000..7119312777bc
--- /dev/null
+++ b/emulators/spim/pkg-descr
@@ -0,0 +1,15 @@
+MIPS R2000 Simulator -- "1/25th the performance at none of the cost"
+
+Spim/Xspim simulates MIPS R2000 assembly code, providing a gdb and xgdb
+like interface to the classical MIPS RISC CPU. The virtual machine
+it provides can be either the one presented by the MIPS assembler or the
+one of the bare hardware. The simulator can also be built to simulate the
+pipeline architecture of the MIPS machine (both the control and floating
+point pipelines). When built for this, it also simulates and displays
+an instruction and data cache.
+
+This simulator is useful in CS and EE classes, including providing a
+target machine for compilers courses, lower division assembly language
+programming, microprocessor design courses, etc...
+
+ -- David O'Brien (obrien@cs.ucdavis.edu)
diff --git a/emulators/spim/pkg-plist b/emulators/spim/pkg-plist
new file mode 100644
index 000000000000..91739e4de4d9
--- /dev/null
+++ b/emulators/spim/pkg-plist
@@ -0,0 +1,9 @@
+bin/spim
+bin/xspim
+bin/cl-spim
+bin/cl-xspim
+man/man1/spim.1.gz
+man/man1/xspim.1.gz
+share/spim/trap.handler
+share/doc/spim/spim.ps.gz
+share/doc/spim/cycle.ps.gz