summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2004-08-12 19:59:51 +0000
committeragc <agc@pkgsrc.org>2004-08-12 19:59:51 +0000
commitf10ed9ae400f16b2b60e49f7a744a63af4e4c4d5 (patch)
tree610d8543bb5f4c11bdc2ee02e1a6461dcc9a47d6 /emulators
parent9b85a4d517dd83d718d324aa610f8aa2752d73ff (diff)
downloadpkgsrc-f10ed9ae400f16b2b60e49f7a744a63af4e4c4d5.tar.gz
Make this package build with recent C++. With thanks to Bill Squier,
Krister Walfridsson and Soda for their help. mmm, progress...
Diffstat (limited to 'emulators')
-rw-r--r--emulators/swarm/distinfo8
-rw-r--r--emulators/swarm/patches/patch-ae126
-rw-r--r--emulators/swarm/patches/patch-af41
-rw-r--r--emulators/swarm/patches/patch-ag57
-rw-r--r--emulators/swarm/patches/patch-ah22
-rw-r--r--emulators/swarm/patches/patch-ai15
-rw-r--r--emulators/swarm/patches/patch-aj20
7 files changed, 288 insertions, 1 deletions
diff --git a/emulators/swarm/distinfo b/emulators/swarm/distinfo
index 5acb04c92a8..041d8ca70bb 100644
--- a/emulators/swarm/distinfo
+++ b/emulators/swarm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2003/08/14 09:31:39 agc Exp $
+$NetBSD: distinfo,v 1.6 2004/08/12 19:59:51 agc Exp $
SHA1 (swarm-0.61.tar.gz) = 36ed52671f8be2cf8e799efd94a48b2919979d2c
Size (swarm-0.61.tar.gz) = 395061 bytes
@@ -6,3 +6,9 @@ SHA1 (patch-aa) = 47bf38f1f6ffde193d4bbe03c8968c92ab66d406
SHA1 (patch-ab) = 9859132762130859692614242f32022750db5a3f
SHA1 (patch-ac) = 57f5103fde8c1380ddd78c58dfd57c5368d92bfd
SHA1 (patch-ad) = a5a46138f385875511434f342654ad5e234f6647
+SHA1 (patch-ae) = 5b42d3332b6e1a7f5c8e94fa54007444a9de92b5
+SHA1 (patch-af) = 28479b4dd547cf55f4fb3968846140abf8f2dd5d
+SHA1 (patch-ag) = c20ab04004bfe2982376c03b8411b698e6ba275f
+SHA1 (patch-ah) = 806ce24ca3048953aa11f9c228c7cd759acc28c6
+SHA1 (patch-ai) = 03c5cf845928361926fec3983a8c2c3bdd1c449f
+SHA1 (patch-aj) = ab261d34eda8b8f7307fb40e798205515169ddea
diff --git a/emulators/swarm/patches/patch-ae b/emulators/swarm/patches/patch-ae
new file mode 100644
index 00000000000..27a302d94f5
--- /dev/null
+++ b/emulators/swarm/patches/patch-ae
@@ -0,0 +1,126 @@
+$NetBSD: patch-ae,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- core.cpp 2004/08/12 17:16:45 1.1
++++ 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
new file mode 100644
index 00000000000..b4ab3a0b87a
--- /dev/null
+++ b/emulators/swarm/patches/patch-af
@@ -0,0 +1,41 @@
+$NetBSD: patch-af,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- main.cpp 2004/08/12 18:28:49 1.1
++++ 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
new file mode 100644
index 00000000000..0dfa76e7e9b
--- /dev/null
+++ b/emulators/swarm/patches/patch-ag
@@ -0,0 +1,57 @@
+$NetBSD: patch-ag,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- syscopro.cpp 2004/08/12 18:34:07 1.1
++++ 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
new file mode 100644
index 00000000000..42ac234a9dc
--- /dev/null
+++ b/emulators/swarm/patches/patch-ah
@@ -0,0 +1,22 @@
+$NetBSD: patch-ah,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- armproc.h 2004/08/12 18:45:56 1.1
++++ 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
new file mode 100644
index 00000000000..dc101d30b8c
--- /dev/null
+++ b/emulators/swarm/patches/patch-ai
@@ -0,0 +1,15 @@
+$NetBSD: patch-ai,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- alu.cpp 2004/08/12 18:49:18 1.1
++++ 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
new file mode 100644
index 00000000000..884e7b96151
--- /dev/null
+++ b/emulators/swarm/patches/patch-aj
@@ -0,0 +1,20 @@
+$NetBSD: patch-aj,v 1.1 2004/08/12 19:59:51 agc Exp $
+
+--- libc.cpp 2004/08/12 18:49:18 1.1
++++ 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.