diff options
Diffstat (limited to 'emulators/swarm')
-rw-r--r-- | emulators/swarm/DESCR | 19 | ||||
-rw-r--r-- | emulators/swarm/Makefile | 24 | ||||
-rw-r--r-- | emulators/swarm/PLIST | 4 | ||||
-rw-r--r-- | emulators/swarm/distinfo | 16 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-aa | 39 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ab | 17 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ac | 11 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ad | 42 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ae | 126 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-af | 41 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ag | 57 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ah | 22 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ai | 15 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-aj | 20 | ||||
-rw-r--r-- | emulators/swarm/patches/patch-ak | 13 |
15 files changed, 0 insertions, 466 deletions
diff --git a/emulators/swarm/DESCR b/emulators/swarm/DESCR deleted file mode 100644 index b2640bfc5ca..00000000000 --- a/emulators/swarm/DESCR +++ /dev/null @@ -1,19 +0,0 @@ -This is SWARM - SoftWare ARM. - -The initial stage in this process is implement a plain software model -of the basic ARM. There are, of course, already software models of -the ARM available, so why do another one? Well, this one will need to -allow the instruction set to be modified at run time, and provide not -just an execution environment, but also a way of monitoring things -like cache hits. - -To this end a hierarchical model of an ARM CPU has been implemented in -C++. It currently supports: - -+ Arm 6 based core. Currently able to handle data processing -instructions, word/byte load and stores, load/store multiple, -branches, 32 bit multiplication, and SWIs. -+ Support for plugging in different caches - be they unified or -separate I & D caches. Currently only a direct mapped cache is -implemented. -+ Compile for SWARM using ARM targeted gcc. diff --git a/emulators/swarm/Makefile b/emulators/swarm/Makefile deleted file mode 100644 index 3eb9eadde9f..00000000000 --- a/emulators/swarm/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# $NetBSD: Makefile,v 1.14 2006/06/01 21:02:01 joerg Exp $ -# - -DISTNAME= swarm-0.61 -CATEGORIES= emulators -MASTER_SITES= http://www.cl.cam.ac.uk/~mwd24/phd/bin/ - -MAINTAINER= agc@NetBSD.org -HOMEPAGE= http://www.cl.cam.ac.uk/~mwd24/phd/swarm.html -COMMENT= Software arm7M core emulator - -WRKSRC= ${WRKDIR}/swarm -BUILD_DIRS= src - -USE_LANGUAGES= c++ - -INSTALLATION_DIRS= bin - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/swarm ${PREFIX}/bin - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/swarm - ${INSTALL_DATA} ${WRKSRC}/doc/swarm.pdf ${PREFIX}/share/doc/swarm - -.include "../../mk/bsd.pkg.mk" diff --git a/emulators/swarm/PLIST b/emulators/swarm/PLIST deleted file mode 100644 index e7269ecb10a..00000000000 --- a/emulators/swarm/PLIST +++ /dev/null @@ -1,4 +0,0 @@ -@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:53:55 zuntum Exp $ -bin/swarm -share/doc/swarm/swarm.pdf -@dirrm share/doc/swarm diff --git a/emulators/swarm/distinfo b/emulators/swarm/distinfo deleted file mode 100644 index f8afc40ab1d..00000000000 --- a/emulators/swarm/distinfo +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: distinfo,v 1.9 2005/12/09 12:10:09 joerg Exp $ - -SHA1 (swarm-0.61.tar.gz) = 36ed52671f8be2cf8e799efd94a48b2919979d2c -RMD160 (swarm-0.61.tar.gz) = d8e15da178236a46761a65cd52809276df5f3511 -Size (swarm-0.61.tar.gz) = 395061 bytes -SHA1 (patch-aa) = 65da2134c0d99930412e60fbb3e0f299d3982113 -SHA1 (patch-ab) = 5a71a670297e4d8db2dd3c7c96d9528f878d13cb -SHA1 (patch-ac) = 20b0603e24178a6086531bd2f7eb0eb5fc0e99c3 -SHA1 (patch-ad) = 4e660fcb3dae67d4519ad3df40e342707e983e96 -SHA1 (patch-ae) = 08b8819ad53bb0a91c3ab7a56479b2f36faab754 -SHA1 (patch-af) = 8228c591fd22ee8984d1f434940ad2cbbba41a22 -SHA1 (patch-ag) = 4d3ca9cd45edc081b85019ec88135504b3e7b0a1 -SHA1 (patch-ah) = 94d58bdd8d48e73f49ef06ac90eb0a9b0e1af6db -SHA1 (patch-ai) = 51b43a6b560566447d588623b19d3da6ab7b4ade -SHA1 (patch-aj) = 227b459e8201320679d3484daa163a5a5c579b17 -SHA1 (patch-ak) = b5fe118ed1da57ba528c3f3e86790ff33b7a2533 diff --git a/emulators/swarm/patches/patch-aa b/emulators/swarm/patches/patch-aa deleted file mode 100644 index 3eea0de9b7e..00000000000 --- a/emulators/swarm/patches/patch-aa +++ /dev/null @@ -1,39 +0,0 @@ -$NetBSD: patch-aa,v 1.5 2005/11/03 21:51:57 rillig Exp $ - -fix tests for endianness and use our own header files to get -int64_t and uint64_t - ---- src/swarm_types.h.orig Tue Apr 10 09:46:10 2001 -+++ src/swarm_types.h -@@ -26,9 +26,10 @@ - #ifndef __SWARM_TYPES_H__ - #define __SWARM_TYPES_H__ - --#ifdef sun4 -+#include <sys/endian.h> -+#if BYTE_ORDER == BIG_ENDIAN - #define __BIG_ENDIAN__ --#else /* ix86 / alpha / arm32 */ -+#else - #define __LITTLE_ENDIAN__ - #endif - -@@ -60,6 +61,10 @@ - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; - -+#ifdef __NetBSD__ -+#include <sys/types.h> -+#include <sys/inttypes.h> -+#else - #ifndef WIN32 - #ifndef __int8_t_defined - typedef long long int int64_t; -@@ -69,6 +74,7 @@ - typedef INT64 int64_t; - typedef UINT64 uint64_t; - #endif // !WIN32 -+#endif // __NetBSD__ - #endif - - typedef int bool_t; diff --git a/emulators/swarm/patches/patch-ab b/emulators/swarm/patches/patch-ab deleted file mode 100644 index a206c2798b0..00000000000 --- a/emulators/swarm/patches/patch-ab +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ab,v 1.4 2005/11/03 21:51:57 rillig Exp $ - ---- src/Makefile.orig Wed Apr 11 17:43:07 2001 -+++ src/Makefile -@@ -22,10 +22,10 @@ - # - ############################################################################### - --GCC = gcc -+GCC = ${CC} - ROOT = .. - ARCH = `$(ROOT)/bin/scripts/arch` --CFLAGS = -D$(ARCH) -DSHARED_CACHE -DQUIET -DSWARM_SWI_HANDLER #-DDEBUG_MEM -+CFLAGS+= -D$(ARCH) -DSHARED_CACHE -DQUIET -DSWARM_SWI_HANDLER #-DDEBUG_MEM - OPTS = -g -DEBUG - - OBJS = core.o main.o alu.o cache.o direct.o swarm.o swi.o armproc.o \ diff --git a/emulators/swarm/patches/patch-ac b/emulators/swarm/patches/patch-ac deleted file mode 100644 index e15561b05a1..00000000000 --- a/emulators/swarm/patches/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-ac,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/isa_be.h.orig Mon Nov 6 12:38:08 2000 -+++ src/isa_be.h Mon Apr 1 00:43:50 2002 -@@ -190,5 +190,5 @@ - uint32_t p : 1; - uint32_t u : 1; -- uint32_t psr : 1; -+ uint32_t s : 1; - uint32_t wb : 1; - uint32_t ls : 1; diff --git a/emulators/swarm/patches/patch-ad b/emulators/swarm/patches/patch-ad deleted file mode 100644 index 88aaaf2559b..00000000000 --- a/emulators/swarm/patches/patch-ad +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-ad,v 1.3 2005/12/09 12:10:09 joerg Exp $ - ---- src/uartctrl.cpp 2003/08/14 08:54:51 1.1 -+++ src/uartctrl.cpp 2003/08/14 09:15:14 -@@ -40,6 +40,29 @@ - // - int CUARTCtrl::GetPty() - { -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include <sys/param.h> -+ // masterpty = fd of master pty -+ const char *letters = "pqrstuvwxyzPQRST"; -+ const char *numbers = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -+ const char *let; -+ const char *num; -+ char ptyname[MAXPATHLEN]; -+ int cc; -+ -+ cc = strlcpy(ptyname, "/dev/pty", sizeof(ptyname)); -+ ptyname[cc + 2] = 0x0; -+ for (let = letters ; *let ; let++) { -+ ptyname[cc] = *let; -+ for (num = numbers ; *num ; num++) { -+ ptyname[cc + 1] = *num; -+ } -+ if ((masterpty = open(ptyname, O_RDWR | O_NONBLOCK, 0666)) >= 0) { -+ return 0; -+ } -+ } -+ return -1; -+#else - char *namepty; - struct termios tiopty; - int curFlags; -@@ -102,6 +125,7 @@ - getchar(); - } - return 0; -+#endif - } - - /////////////////////////////////////////////////////////////////////////////// diff --git a/emulators/swarm/patches/patch-ae b/emulators/swarm/patches/patch-ae deleted file mode 100644 index a96cf175c1c..00000000000 --- a/emulators/swarm/patches/patch-ae +++ /dev/null @@ -1,126 +0,0 @@ -$NetBSD: patch-ae,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/core.cpp 2004/08/12 17:16:45 1.1 -+++ src/core.cpp 2004/08/12 17:17:18 -@@ -26,7 +26,7 @@ - #include "core.h" - #include "isa.h" - #include <string.h> --#include <iostream.h> -+#include <iostream> - #include "disarm.h" - #ifndef ARM6 - #include "booth.h" -@@ -34,6 +34,8 @@ - - #include "memory.cpp" - -+using namespace std; -+ - static const char* mode_str[16] = {"reset", "fiq", "irq", "svc", - NULL, NULL, NULL, "abort", - NULL, NULL, NULL, "undef", -@@ -4031,22 +4033,29 @@ - { - char str[80]; - -- cout.form("-------------------------------------------------------------------------------\n"); -- cout.form("SWARM Core debug dump\n\n"); -+ cout << "-------------------------------------------------------------------------------\n"; -+ cout << "SWARM Core debug dump\n\n"; - -- cout.form("Registers:"); -+ cout << "Registers:"; - for (int j = 0; j < 4; j++) - { -- for (int i = 0; i < 4; i++) -- cout.form(" 0x%08X", m_regsWorking[i + (j * 4)]); -- cout.form("\n\t "); -+ for (int i = 0; i < 4; i++) { -+ cout << " "; -+ cout << hex << m_regsWorking[i + (j * 4)]; -+ } -+ cout << "\n\t "; - } -- cout.form(" 0x%08X", m_regsWorking[16]); -+ cout << " "; -+ cout << hex << m_regsWorking[16]; - -- if (m_mode == M_FIQ) -- cout.form("\tSPSR_%s[0x%08x]\n\n", mode_str[m_mode & 0xF], m_regsFiq[7]); -- else if ((m_mode == M_USER) || (m_mode == M_SYSTEM)) -- cout.form("\n\n"); -+ if (m_mode == M_FIQ) { -+ cout << "\tSPSR_"; -+ cout << mode_str[m_mode & 0xF]; -+ cout << "["; -+ cout << hex << m_regsFiq[7]; -+ cout << "]\n\n"; -+ } else if ((m_mode == M_USER) || (m_mode == M_SYSTEM)) -+ cout << "\n\n"; - else - { - uint32_t* temp; -@@ -4060,31 +4069,50 @@ - temp = NULL; break; // ??? - } - -- if (temp != NULL) -- cout.form("\tSPSR_%s[0x%08x]\n\n", mode_str[m_mode & 0xF], temp[2]); -+ if (temp != NULL) { -+ cout << "\tSPSR_"; -+ cout << mode_str[m_mode & 0xF]; -+ cout << "["; -+ cout << hex << temp[2]; -+ cout << "]\n\n"; -+ } - } - -- cout.form("Instruction Pipe (top is current instruction):\n"); -+ cout << "Instruction Pipe (top is current instruction):\n"; - for (int i = 2; i > 0; i--) - { -- cout.form("\t0x%08X - ", m_iPipe[i]); -+ cout << "\t0x"; -+ cout << hex << m_iPipe[i]; -+ cout << " - "; - memset(str, 0, 80); - CDisarm::Decode(m_iPipe[i], str); -- cout.form("%s\n", str); -+ cout << str; -+ cout << "\n"; - } - if (m_busCurrent != NULL) - { -- cout.form("\t0x%08X - ", m_busCurrent->Din); -+ cout << "\t0x"; -+ cout << hex << m_busCurrent->Din; -+ cout << " - "; - memset(str, 0, 80); - CDisarm::Decode(m_busCurrent->Din, str); -- cout.form("%s (suspect if bad address error)\n", str); -+ cout << str; -+ cout << " (suspect if bad address error)\n"; - } -- cout.form("Instruction Stage last executed - %d\n\n", m_nCtrlCur); -- -- cout.form("DIn reg = 0x%08X DOut reg = 0x%08X Addr reg = 0x%08X\n", -- m_regDataIn, m_regDataOut, m_regAddr); -+ cout << "Instruction Stage last executed - "; -+ cout << dec << m_nCtrlCur; -+ cout << "\n\n"; -+ -+ cout << "DIn reg = 0x"; -+ cout << hex << m_regDataIn; -+ cout << " DOut reg = 0x"; -+ cout << hex << m_regDataOut; -+ cout << " Addr reg = 0x"; -+ cout << hex << m_regAddr; -+ cout << "\n"; -+ cout << dec; - -- cout.form("-------------------------------------------------------------------------------\n"); -+ cout << "-------------------------------------------------------------------------------\n"; - } - - diff --git a/emulators/swarm/patches/patch-af b/emulators/swarm/patches/patch-af deleted file mode 100644 index 51513e7266e..00000000000 --- a/emulators/swarm/patches/patch-af +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-af,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/main.cpp 2004/08/12 18:28:49 1.1 -+++ src/main.cpp 2004/08/12 18:29:57 -@@ -34,11 +34,13 @@ - #endif - #include "cache.h" - #include "direct.h" --#include <iostream.h> -+#include <iostream> - #include <sys/stat.h> - #include "libc.h" - #include "syscopro.h" - -+using namespace std; -+ - #define FAST_CYCLE 1 - #define SLOW_CYCLE 4 - -@@ -491,15 +493,18 @@ - } - DebuggerRepeatCount--; - } --#endif DEBUGGER -+#endif /* DEBUGGER */ - // Do we need to do anything with the bus? - if (pinout.benable == 1) - { - // Quick sanity check - if (pinout.address >= MEMORY_SIZE) - { -- cerr.form("SWARM failing: Bad address - 0x%08X\n", -- pinout.address); -+ cerr << "SWARM failing: Bad address - 0x"; -+ cerr << hex << pinout.address; -+ cerr << "\n"; -+ -+ cerr << dec; - - pArm->DebugDump(); - diff --git a/emulators/swarm/patches/patch-ag b/emulators/swarm/patches/patch-ag deleted file mode 100644 index f0a46bbef7b..00000000000 --- a/emulators/swarm/patches/patch-ag +++ /dev/null @@ -1,57 +0,0 @@ -$NetBSD: patch-ag,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/syscopro.cpp 2004/08/12 18:34:07 1.1 -+++ src/syscopro.cpp 2004/08/12 18:37:39 -@@ -26,10 +26,12 @@ - #include "syscopro.h" - #include <string.h> - #include "isa.h" --#include <iostream.h> -+#include <iostream> - - #include "memory.cpp" - -+using namespace std; -+ - // Defines a dull ARM7 type processor ID. Make = ARM, Arch = 3, rest NULL - #define SWARM_ID 0x41007000 - -@@ -486,22 +488,28 @@ - { - char str[80]; - -- cout.form("-------------------------------------------------------------------------------\n"); -- cout.form("System coprocessor debug dump\n\n"); -+ cout << "-------------------------------------------------------------------------------\n"; -+ cout << "System coprocessor debug dump\n\n"; - -- cout.form("Registers:"); -+ cout << "Registers:"; - for (int j = 0; j < 4; j++) - { -- for (int i = 0; i < 4; i++) -- cout.form(" 0x%08X", m_regsWorking[i + (j * 4)]); -- cout.form("\n\t "); -+ for (int i = 0; i < 4; i++) { -+ cout << " 0x"; -+ cout << hex << m_regsWorking[i + (j * 4)]; -+ } -+ cout << "\n\t "; - } -- cout.form("\n"); -+ cout << "\n"; - -- cout.form("DIn reg = 0x%08X DOut reg = 0x%08X\n", -- m_regDataIn, m_regDataOut); -+ cout << "DIn reg = 0x"; -+ cout << hex << m_regDataIn; -+ cout << " DOut reg = 0x", -+ cout << hex << m_regDataOut; -+ cout << "\n"; -+ cout << dec; - -- cout.form("-------------------------------------------------------------------------------\n"); -+ cout << "-------------------------------------------------------------------------------\n"; - } - - diff --git a/emulators/swarm/patches/patch-ah b/emulators/swarm/patches/patch-ah deleted file mode 100644 index 36a8add64a5..00000000000 --- a/emulators/swarm/patches/patch-ah +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ah,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/armproc.h 2004/08/12 18:45:56 1.1 -+++ src/armproc.h 2004/08/12 18:46:08 -@@ -29,7 +29,7 @@ - #include "core.h" - #include "cache.h" - #include "swi.h" --#include <iostream.h> -+#include <iostream> - #include "copro.h" - - #include "ostimer.h" -@@ -37,6 +37,8 @@ - #include "lcdctrl.h" - #include "uartctrl.h" - -+using namespace std; -+ - enum PPROC {P_NORMAL, P_READING1, P_READING, P_WRITING1, P_INTWRITE}; - - typedef struct POTAG diff --git a/emulators/swarm/patches/patch-ai b/emulators/swarm/patches/patch-ai deleted file mode 100644 index 3c52ea6f61f..00000000000 --- a/emulators/swarm/patches/patch-ai +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-ai,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/alu.cpp 2004/08/12 18:49:18 1.1 -+++ src/alu.cpp 2004/08/12 18:49:37 -@@ -24,7 +24,9 @@ - - #include "swarm.h" - #include "alu.h" --#include <iostream.h> -+#include <iostream> -+ -+using namespace std; - - #define CARRY_FROM(_a,_b,_r) ((_a >> 31) ? ((_b >> 31) | ((~_r) >> 31)) : ((_b >> 31) * ((~_r) >> 31))) - diff --git a/emulators/swarm/patches/patch-aj b/emulators/swarm/patches/patch-aj deleted file mode 100644 index b719fe18469..00000000000 --- a/emulators/swarm/patches/patch-aj +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-aj,v 1.2 2005/11/03 21:51:57 rillig Exp $ - ---- src/libc.cpp 2004/08/12 18:49:18 1.1 -+++ src/libc.cpp 2004/08/12 18:50:21 -@@ -31,12 +31,14 @@ - #endif - #include <fcntl.h> - --#include <iostream.h> -+#include <iostream> - #include <errno.h> - #include <string.h> - - #include "swi.h" - -+using namespace std; -+ - /////////////////////////////////////////////////////////////////////////////// - // The gnuarm struct stat is in a different format to ours, so we need to - // get the data and then copy it field by field. diff --git a/emulators/swarm/patches/patch-ak b/emulators/swarm/patches/patch-ak deleted file mode 100644 index ed63f82cb9f..00000000000 --- a/emulators/swarm/patches/patch-ak +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2005/12/09 12:10:09 joerg Exp $ - ---- bin/scripts/arch.orig 2005-12-09 11:57:36.000000000 +0000 -+++ bin/scripts/arch -@@ -183,7 +183,7 @@ Linux) case "$machine" in - kbin=$bin - k_version=$version;; - --FreeBSD) case "$machine" in -+FreeBSD|DragonFly) case "$machine" in - i[3456]86) arch=ix86; machine=$arch; bin=${machine}_freebsd;; - *) echo 1>&2 "Unknown $system machine $machine"; exit 3;; - esac |