diff options
author | agc <agc@pkgsrc.org> | 2004-08-12 19:59:51 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2004-08-12 19:59:51 +0000 |
commit | 9bfaf4aae9972191b4426059cc1eb8139fd66dbf (patch) | |
tree | 610d8543bb5f4c11bdc2ee02e1a6461dcc9a47d6 /emulators/swarm/patches | |
parent | a194fd1772da634690c98f0c5552c9714586abcd (diff) | |
download | pkgsrc-9bfaf4aae9972191b4426059cc1eb8139fd66dbf.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/swarm/patches')
-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 |
6 files changed, 281 insertions, 0 deletions
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. |