summaryrefslogtreecommitdiff
path: root/emulators/gxemul
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2019-08-23 13:13:49 +0000
committerryoon <ryoon@pkgsrc.org>2019-08-23 13:13:49 +0000
commit2bfe6ab94ac3eedd5cdf2ad9aa35267c90a642cb (patch)
treeaaada4596d86a19431e1a08340812ff18a861ab0 /emulators/gxemul
parente556dedbba66c0939430e3596996bd1247a20628 (diff)
downloadpkgsrc-2bfe6ab94ac3eedd5cdf2ad9aa35267c90a642cb.tar.gz
Update to 0.6.2
* All pkgsrc patches are included by upstream or target files are removed. Changelog: The most important changes between release 0.6.1 and 0.6.2 are: When writing to mirrored RAM ranges, any dyntrans translations made in either the mirror or the mirrored ranges are now invalidated. This means that an emulated SGI O2 can now be used with up to 1 GB of RAM when running OpenBSD/sgi as a guest OS. Previously, 256 MB was the maximum amount of emulated RAM possible for the SGI O2. A fix 2018-06-13 (between 0.6.0.1 and 0.6.0.2) for translation invalidation when using larger than 4 KB pages, which made HelenOS/malta run further, caused a regression which broke NetBSD/hpcmips (on VR4121 CPUs, which have 1 KB native page size). A bit of cleanup seems to have fixed this, so that both NetBSD/hpcmips and HelenOS/malta work now. Cleanup: The MIPS processor emulation implemented in the "new framework", and the corresponding MIPS machine modes in the new framework, have been removed. (All meaningful MIPS emulation is in the old framework anyway.) Documentation updates: Each emulated machine now has a page of its own with the guest OSes or other software that may run in that mode, rather than just having a long unsorted list of guest OS installation instructions. Less focus on the "new framework", more focus on the old framework where things actually work. An introduction to using GXemul as a debugger. A general overhaul to remove old stuff, fix errors, and make things easier to read.
Diffstat (limited to 'emulators/gxemul')
-rw-r--r--emulators/gxemul/Makefile5
-rw-r--r--emulators/gxemul/PLIST40
-rw-r--r--emulators/gxemul/distinfo27
-rw-r--r--emulators/gxemul/patches/patch-ad50
-rw-r--r--emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc15
-rw-r--r--emulators/gxemul/patches/patch-src_components_cpu_M88K__CPUComponent.cc15
-rw-r--r--emulators/gxemul/patches/patch-src_components_cpu_MIPS__CPUComponent.cc15
-rw-r--r--emulators/gxemul/patches/patch-src_console_console.cc52
-rw-r--r--emulators/gxemul/patches/patch-src_cpus_cpu__mips__instr.cc160
-rw-r--r--emulators/gxemul/patches/patch-src_cpus_cpu_mips.cc19
-rw-r--r--emulators/gxemul/patches/patch-src_devices_dev__footbridge.cc59
-rw-r--r--emulators/gxemul/patches/patch-src_devices_dev__sh4.cc17
-rw-r--r--emulators/gxemul/patches/patch-src_disk_diskimage__scsicmd.cc18
-rw-r--r--emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h30
-rw-r--r--emulators/gxemul/patches/patch-src_include_components_M88K__CPUComponent.h15
-rw-r--r--emulators/gxemul/patches/patch-src_include_components_MIPS__CPUComponent.h15
-rw-r--r--emulators/gxemul/patches/patch-src_include_mips_cpu_types.h21
-rw-r--r--emulators/gxemul/patches/patch-src_include_refcount__ptr.h15
-rw-r--r--emulators/gxemul/patches/patch-src_machines_machine__pmax.cc15
-rw-r--r--emulators/gxemul/patches/patch-src_old__main_timer.cc15
20 files changed, 39 insertions, 579 deletions
diff --git a/emulators/gxemul/Makefile b/emulators/gxemul/Makefile
index 89e1b07e895..b3341ec46a9 100644
--- a/emulators/gxemul/Makefile
+++ b/emulators/gxemul/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.66 2019/06/30 20:33:02 skrll Exp $
+# $NetBSD: Makefile,v 1.67 2019/08/23 13:13:49 ryoon Exp $
-DISTNAME= gxemul-0.6.1
-PKGREVISION= 4
+DISTNAME= gxemul-0.6.2
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gxemul/}
diff --git a/emulators/gxemul/PLIST b/emulators/gxemul/PLIST
index f925d2e70d0..7d39e8e0428 100644
--- a/emulators/gxemul/PLIST
+++ b/emulators/gxemul/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.27 2019/01/04 13:35:16 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.28 2019/08/23 13:13:49 ryoon Exp $
bin/gxemul
man/man1/gxemul.1
share/doc/gxemul/20040504-ultrix45-boot1.png
@@ -102,6 +102,16 @@ share/doc/gxemul/20180220-openbsd-luna88k-5.4.png
share/doc/gxemul/20180910-sgiip32prom-4.13.png
share/doc/gxemul/20181018-openbsd-sgi-o2-small.png
share/doc/gxemul/20181018-openbsd-sgi-o2.png
+share/doc/gxemul/20190526-irix-not-really-working-yet.png
+share/doc/gxemul/20190526-irix-not-really-working-yet_small.png
+share/doc/gxemul/20190528-winnt-arc-mips-video-fail.png
+share/doc/gxemul/20190528-winnt-arc-mips-video-fail_small.png
+share/doc/gxemul/20190612-netbsd-sgimips-1.png
+share/doc/gxemul/20190612-netbsd-sgimips-1_small.png
+share/doc/gxemul/20190612-netbsd-sgimips-2.png
+share/doc/gxemul/20190612-netbsd-sgimips-2_small.png
+share/doc/gxemul/20190616-netbsd-playstation2-userland-small.png
+share/doc/gxemul/20190616-netbsd-playstation2-userland.png
share/doc/gxemul/Doxyfile
share/doc/gxemul/HISTORY
share/doc/gxemul/LICENSE
@@ -114,7 +124,6 @@ share/doc/gxemul/components/component_dummy.html
share/doc/gxemul/components/component_i960_cpu.html
share/doc/gxemul/components/component_m88k_cpu.html
share/doc/gxemul/components/component_mainbus.html
-share/doc/gxemul/components/component_mips_cpu.html
share/doc/gxemul/components/component_ram.html
share/doc/gxemul/configfiles.html
share/doc/gxemul/debian-1-small.png
@@ -147,28 +156,44 @@ share/doc/gxemul/debian-8-small.png
share/doc/gxemul/debian-8.png
share/doc/gxemul/debian-9-small.png
share/doc/gxemul/debian-9.png
+share/doc/gxemul/debugging.html
share/doc/gxemul/doxygen.css
share/doc/gxemul/doxygen_footerFile.html
share/doc/gxemul/doxygen_headerFile.html
-share/doc/gxemul/dreamcast.html
share/doc/gxemul/experiments.html
share/doc/gxemul/framework.html
share/doc/gxemul/generate_machine_doc.sh
-share/doc/gxemul/guestoses.html
share/doc/gxemul/head.html
share/doc/gxemul/index.html
share/doc/gxemul/intro.html
+share/doc/gxemul/machine_algor.html
+share/doc/gxemul/machine_arc.html
+share/doc/gxemul/machine_cats.html
+share/doc/gxemul/machine_cobalt.html
+share/doc/gxemul/machine_decstation.html
+share/doc/gxemul/machine_dreamcast.html
+share/doc/gxemul/machine_evbarm.html
+share/doc/gxemul/machine_evbmips.html
+share/doc/gxemul/machine_hpcmips.html
+share/doc/gxemul/machine_landisk.html
+share/doc/gxemul/machine_luna88k.html
+share/doc/gxemul/machine_macppc.html
+share/doc/gxemul/machine_mvme88k.html
+share/doc/gxemul/machine_netwinder.html
+share/doc/gxemul/machine_pmppc.html
+share/doc/gxemul/machine_prep.html
+share/doc/gxemul/machine_ps2.html
+share/doc/gxemul/machine_rpi.html
+share/doc/gxemul/machine_sgi_o2.html
share/doc/gxemul/machine_template.html
+share/doc/gxemul/machine_vocore.html
share/doc/gxemul/machines/machine_cyclonevh.html.SKEL
share/doc/gxemul/machines/machine_hp700rx.html.SKEL
share/doc/gxemul/machines/machine_mvme187.html.SKEL
-share/doc/gxemul/machines/machine_sgi_ip32.html.SKEL
share/doc/gxemul/machines/machine_testm88k-thumb.png
share/doc/gxemul/machines/machine_testm88k.html.SKEL
share/doc/gxemul/machines/machine_testm88k.png
share/doc/gxemul/machines/machine_testmips-thumb.png
-share/doc/gxemul/machines/machine_testmips.html.SKEL
-share/doc/gxemul/machines/machine_testmips.png
share/doc/gxemul/misc.html
share/doc/gxemul/model.png
share/doc/gxemul/networking.html
@@ -184,4 +209,3 @@ share/doc/gxemul/technical.html
share/doc/gxemul/translation.html
share/doc/gxemul/ultrix4.5-20040706.png
share/doc/gxemul/ultrix4.5-20040706_small.png
-share/doc/gxemul/unsupported.html
diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo
index aad892e63fe..9c416df4b05 100644
--- a/emulators/gxemul/distinfo
+++ b/emulators/gxemul/distinfo
@@ -1,23 +1,6 @@
-$NetBSD: distinfo,v 1.59 2019/06/30 20:33:02 skrll Exp $
+$NetBSD: distinfo,v 1.60 2019/08/23 13:13:49 ryoon Exp $
-SHA1 (gxemul-0.6.1.tar.gz) = 150e495e91a968a49ffc7fe2390c3edff100508d
-RMD160 (gxemul-0.6.1.tar.gz) = 0434bff07970d8828531d222cc8b95c64c2d62f1
-SHA512 (gxemul-0.6.1.tar.gz) = 03dbbaa9ba5e36b4644a984f06bffa5ff9e763f395c472c0fbdfc8bca975a5fb184a676d3a6c5e1a3483c3c62a2778af9c36d2bf4ab8dcaf21b3dfac8abcd301
-Size (gxemul-0.6.1.tar.gz) = 5617712 bytes
-SHA1 (patch-ad) = d4964bc672b690ee2a5c7148b9b9852d7f87776a
-SHA1 (patch-src_components_cpu_CPUDyntransComponent.cc) = dd7a9a83d8abce053e5e61a6aa6ae057c6c51a6a
-SHA1 (patch-src_components_cpu_M88K__CPUComponent.cc) = 4b456721aa0639b91d2dab82fb28f61a951ec8f4
-SHA1 (patch-src_components_cpu_MIPS__CPUComponent.cc) = 9bcb304937ccfa491e37da6f57729854294c420d
-SHA1 (patch-src_console_console.cc) = 0b9c07eaa26a39b20a6f6769cdf02208fc9667d3
-SHA1 (patch-src_cpus_cpu__mips__instr.cc) = 1a39066fad8004b1bf0e9ae6186d943389c4d35f
-SHA1 (patch-src_cpus_cpu_mips.cc) = ad6d9c8b452b1b8422d9194cadfa1c8c3d29ef21
-SHA1 (patch-src_devices_dev__footbridge.cc) = 2dc76e65fff7e6c846d9d06b74bed76075b0c79a
-SHA1 (patch-src_devices_dev__sh4.cc) = 81e3dcc01934c71389a91861343bc8aa32284160
-SHA1 (patch-src_disk_diskimage__scsicmd.cc) = fc0d9cff9afb057051c4f2cb65c898a31a1463bd
-SHA1 (patch-src_include_components_CPUDyntransComponent.h) = f60d31261a03a0a73fa4844143da4931cae85ce6
-SHA1 (patch-src_include_components_M88K__CPUComponent.h) = 5232386ac337c552d88cbdb829b6f0f3e94ba0f2
-SHA1 (patch-src_include_components_MIPS__CPUComponent.h) = 48bc9ea9dacbe7afd9734ee04e270943208db148
-SHA1 (patch-src_include_mips_cpu_types.h) = 04fff50fad3e619e7e0eeb8bf17a79edd18b2147
-SHA1 (patch-src_include_refcount__ptr.h) = 6c8742b199801c1db906d4856f6f5f01a0f25fe0
-SHA1 (patch-src_machines_machine__pmax.cc) = ed3fba7eacb593cbba082a6d8d8ec823bf90162f
-SHA1 (patch-src_old__main_timer.cc) = a6234d80f28611a5be18b917a4249b8530b433bc
+SHA1 (gxemul-0.6.2.tar.gz) = aabaeba783e70be952ab0056bf84d0f2b70c2155
+RMD160 (gxemul-0.6.2.tar.gz) = ccac73d82446f89792b1fc803bee623813f3aab2
+SHA512 (gxemul-0.6.2.tar.gz) = 4f389c509f9ecf39603ceed50e899e2bee285d3fefac9b3214076115ee71b5a7a68d1d92690b6debc8de5cf5f0303da83b3cc921a5c0b5eb4c7ad89baa730b59
+Size (gxemul-0.6.2.tar.gz) = 5897883 bytes
diff --git a/emulators/gxemul/patches/patch-ad b/emulators/gxemul/patches/patch-ad
deleted file mode 100644
index 2826821aecb..00000000000
--- a/emulators/gxemul/patches/patch-ad
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD: patch-ad,v 1.4 2019/06/02 09:19:58 gson Exp $
-
-short-term hack to fix hpcmips emulation from Anders Gavare
-
-patch to fix big-endian mips support from matt@netbsd.org
-
-diff -rup src/cpus/cpu_mips_coproc.cc src/cpus/cpu_mips_coproc.cc
---- src/cpus/cpu_mips_coproc.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/cpus/cpu_mips_coproc.cc
-@@ -1927,7 +1927,7 @@ void coproc_tlbwri(struct cpu *cpu, int
- * be too expensive to add e.g. 16MB pages like
- * this.
- */
-- if (psize == 0x1000) {
-+ if (psize == 0x1000 && cpu->cd.mips.cpu_type.rev != MIPS_R4100) {
- memblock = memory_paddr_to_hostaddr(cpu->mem, paddr0, 0);
- if (memblock != NULL && cp->reg[COP0_ENTRYLO0] & ENTRYLO_V)
- cpu->update_translation_table(cpu, vaddr0, memblock,
-@@ -2029,6 +2029,13 @@ void coproc_function(struct cpu *cpu, st
-
- if (cpnr < 2 && (((function & 0x03e007f8) == (COPz_MTCz << 21))
- || ((function & 0x03e007f8) == (COPz_DMTCz << 21)))) {
-+ tmpvalue = cpu->cd.mips.gpr[rt];
-+ if (copz == COPz_MTCz) {
-+ /* Sign-extend: */
-+ tmpvalue &= 0xffffffffULL;
-+ if (tmpvalue & 0x80000000ULL)
-+ tmpvalue |= 0xffffffff00000000ULL;
-+ }
- if (unassemble_only) {
- debug("%s%i\t%s,", copz==COPz_DMTCz? "dmtc" : "mtc",
- cpnr, regnames[rt]);
-@@ -2038,16 +2045,10 @@ void coproc_function(struct cpu *cpu, st
- debug("r%i", rd);
- if (function & 7)
- debug(",%i", (int)(function & 7));
-+ debug(" [%016llx]", (long long)tmpvalue);
- debug("\n");
- return;
- }
-- tmpvalue = cpu->cd.mips.gpr[rt];
-- if (copz == COPz_MTCz) {
-- /* Sign-extend: */
-- tmpvalue &= 0xffffffffULL;
-- if (tmpvalue & 0x80000000ULL)
-- tmpvalue |= 0xffffffff00000000ULL;
-- }
- coproc_register_write(cpu, cpu->cd.mips.coproc[cpnr], rd,
- &tmpvalue, copz == COPz_DMTCz, function & 7);
- return;
diff --git a/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc b/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc
deleted file mode 100644
index cb041ca732f..00000000000
--- a/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_components_cpu_CPUDyntransComponent.cc,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/components/cpu/CPUDyntransComponent.cc.orig 2012-11-19 20:12:27.000000000 +0000
-+++ src/components/cpu/CPUDyntransComponent.cc
-@@ -194,7 +194,7 @@ void CPUDyntransComponent::DyntransClear
- // Fill the page with "to be translated" entries, which when executed
- // will read the instruction from memory, attempt to translate it, and
- // then execute it.
-- void (*f)(CPUDyntransComponent*, DyntransIC*) = GetDyntransToBeTranslated();
-+ DyntransIC_t f = GetDyntransToBeTranslated();
-
- for (int i=0; i<m_dyntransICentriesPerPage; ++i)
- icpage[i].f = f;
diff --git a/emulators/gxemul/patches/patch-src_components_cpu_M88K__CPUComponent.cc b/emulators/gxemul/patches/patch-src_components_cpu_M88K__CPUComponent.cc
deleted file mode 100644
index a220b1564e0..00000000000
--- a/emulators/gxemul/patches/patch-src_components_cpu_M88K__CPUComponent.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_components_cpu_M88K__CPUComponent.cc,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/components/cpu/M88K_CPUComponent.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/components/cpu/M88K_CPUComponent.cc
-@@ -337,7 +337,7 @@ int M88K_CPUComponent::GetDyntransICshif
- }
-
-
--void (*M88K_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*)
-+DyntransIC_t M88K_CPUComponent::GetDyntransToBeTranslated()
- {
- return instr_ToBeTranslated;
- }
diff --git a/emulators/gxemul/patches/patch-src_components_cpu_MIPS__CPUComponent.cc b/emulators/gxemul/patches/patch-src_components_cpu_MIPS__CPUComponent.cc
deleted file mode 100644
index 7c86de1f204..00000000000
--- a/emulators/gxemul/patches/patch-src_components_cpu_MIPS__CPUComponent.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_components_cpu_MIPS__CPUComponent.cc,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/components/cpu/MIPS_CPUComponent.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/components/cpu/MIPS_CPUComponent.cc
-@@ -327,7 +327,7 @@ int MIPS_CPUComponent::GetDyntransICshif
- }
-
-
--void (*MIPS_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*)
-+DyntransIC_t MIPS_CPUComponent::GetDyntransToBeTranslated()
- {
- bool mips16 = m_pc & 1? true : false;
- return mips16? instr_ToBeTranslated_MIPS16 : instr_ToBeTranslated;
diff --git a/emulators/gxemul/patches/patch-src_console_console.cc b/emulators/gxemul/patches/patch-src_console_console.cc
deleted file mode 100644
index 7c81144b6aa..00000000000
--- a/emulators/gxemul/patches/patch-src_console_console.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-$NetBSD: patch-src_console_console.cc,v 1.2 2017/07/16 16:36:09 christos Exp $
-
-Change console_charavail() to return the number of characters available
-in the FIFO instead of 0/1.
-
---- src/console/console.cc.orig 2014-08-17 04:45:15.000000000 -0400
-+++ src/console/console.cc 2017-07-16 10:04:04.603287788 -0400
-@@ -328,10 +328,19 @@
- }
-
-
-+static int console_room_left_in_fifo(int handle)
-+{
-+ int roomLeftInFIFO = console_handles[handle].fifo_tail
-+ - console_handles[handle].fifo_head;
-+ if (roomLeftInFIFO <= 0)
-+ roomLeftInFIFO += CONSOLE_FIFO_LEN;
-+ return roomLeftInFIFO;
-+}
-+
- /*
- * console_charavail():
- *
-- * Returns 1 if a char is available in the fifo, 0 otherwise.
-+ * Returns the number of chararacters available in the fifo.
- */
- int console_charavail(int handle)
- {
-@@ -342,9 +351,7 @@
-
- // If adding more would lead to a full FIFO, then let's
- // wait.
-- int roomLeftInFIFO = console_handles[handle].fifo_tail - console_handles[handle].fifo_head;
-- if (roomLeftInFIFO <= 0)
-- roomLeftInFIFO += CONSOLE_FIFO_LEN;
-+ int roomLeftInFIFO = console_room_left_in_fifo(handle);
- if (roomLeftInFIFO < (int)sizeof(ch) + 1)
- break;
-
-@@ -369,11 +376,7 @@
- }
- }
-
-- if (console_handles[handle].fifo_head ==
-- console_handles[handle].fifo_tail)
-- return 0;
--
-- return 1;
-+ return CONSOLE_FIFO_LEN - console_room_left_in_fifo(handle);
- }
-
-
diff --git a/emulators/gxemul/patches/patch-src_cpus_cpu__mips__instr.cc b/emulators/gxemul/patches/patch-src_cpus_cpu__mips__instr.cc
deleted file mode 100644
index 2d013f60193..00000000000
--- a/emulators/gxemul/patches/patch-src_cpus_cpu__mips__instr.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-$NetBSD: patch-src_cpus_cpu__mips__instr.cc,v 1.1 2019/06/30 20:33:02 skrll Exp $
-
-When emulating the MIPS DIV and DDIV instructions, check for divide
-overflow instead of performing the overflowing divide on the host and
-crashing the emulator. This is needed to run recent versions of the
-NetBSD test suite on an emulated MIPS system.
-
-implement trap with immediate instructions present in MIPS32.
-
---- src/cpus/cpu_mips_instr.cc.orig 2019-06-29 16:17:02.938155374 +0000
-+++ src/cpus/cpu_mips_instr.cc
-@@ -1275,6 +1275,8 @@ X(divu)
- uint32_t res, rem;
- if (b == 0)
- res = 0, rem = a;
-+ else if (a == (int32_t)0x80000000U && b == -1)
-+ res = 0, rem = 0;
- else
- res = a / b, rem = a - b*res;
- cpu->cd.mips.lo = (int32_t)res;
-@@ -1300,6 +1302,8 @@ X(ddivu)
- uint64_t res, rem;
- if (b == 0)
- res = 0;
-+ else if (a == (int64_t)0x8000000000000000ULL && b == -1)
-+ res = 0;
- else
- res = a / b;
- rem = a - b*res;
-@@ -1465,6 +1469,92 @@ X(tne)
- }
- }
-
-+/*
-+ * 1-register + 1-immediate:
-+ *
-+ * arg[0] = ptr to rs
-+ * arg[1] = ([u]int16_t) immediate value
-+ */
-+
-+X(tgei)
-+{
-+ MODE_int_t a = reg(ic->arg[0]), b = (int16_t)ic->arg[1];
-+ if (a >= b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+X(tgeiu)
-+{
-+ MODE_uint_t a = reg(ic->arg[0]), b = ic->arg[1];
-+ if (a >= b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+X(tlti)
-+{
-+ MODE_int_t a = reg(ic->arg[0]), b = (int16_t)ic->arg[1];
-+ if (a < b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+X(tltiu)
-+{
-+ MODE_uint_t a = reg(ic->arg[0]), b = ic->arg[1];
-+ if (a < b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+X(teqi)
-+{
-+ MODE_uint_t a = reg(ic->arg[0]), b = (int16_t)ic->arg[1];
-+ if (a == b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+X(tnei)
-+{
-+ MODE_uint_t a = reg(ic->arg[0]), b = ic->arg[1];
-+ if (a != b) {
-+ /* Synch. PC and cause an exception: */
-+ int low_pc = ((size_t)ic - (size_t)cpu->cd.mips.cur_ic_page)
-+ / sizeof(struct mips_instr_call);
-+ cpu->pc &= ~((MIPS_IC_ENTRIES_PER_PAGE-1)
-+ << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ cpu->pc += (low_pc << MIPS_INSTR_ALIGNMENT_SHIFT);
-+ mips_cpu_exception(cpu, EXCEPTION_TR, 0, 0, 0, 0, 0, 0);
-+ }
-+}
-+
-
- /*
- * 3-register arithmetic instructions:
-@@ -4478,6 +4568,37 @@ X(to_be_translated)
- }
- break;
-
-+ case REGIMM_TGEI:
-+ case REGIMM_TGEIU:
-+ case REGIMM_TLTI:
-+ case REGIMM_TLTIU:
-+ case REGIMM_TEQI:
-+ case REGIMM_TNEI:
-+ switch (rt) {
-+ case REGIMM_TGEI:
-+ ic->f = instr(tgei);
-+ break;
-+ case REGIMM_TGEIU:
-+ ic->f = instr(tgeiu);
-+ break;
-+ case REGIMM_TLTI:
-+ ic->f = instr(tlti);
-+ break;
-+ case REGIMM_TLTIU:
-+ ic->f = instr(tltiu);
-+ break;
-+ case REGIMM_TEQI:
-+ ic->f = instr(teqi);
-+ break;
-+ case REGIMM_TNEI:
-+ ic->f = instr(tnei);
-+ break;
-+ }
-+
-+ ic->arg[0] = (size_t)&cpu->cd.mips.gpr[rs];
-+ ic->arg[1] = imm;
-+ break;
-+
- default:if (!cpu->translation_readahead)
- fatal("UNIMPLEMENTED regimm rt=%i\n", rt);
- goto bad;
diff --git a/emulators/gxemul/patches/patch-src_cpus_cpu_mips.cc b/emulators/gxemul/patches/patch-src_cpus_cpu_mips.cc
deleted file mode 100644
index ef755840771..00000000000
--- a/emulators/gxemul/patches/patch-src_cpus_cpu_mips.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-src_cpus_cpu_mips.cc,v 1.3 2019/01/04 13:35:16 ryoon Exp $
-
-implement trap with immediate instructions present in MIPS32.
-
---- src/cpus/cpu_mips.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/cpus/cpu_mips.cc
-@@ -1462,6 +1462,12 @@ int mips_cpu_disassemble_instr(struct cp
- case REGIMM_BLTZALL:
- case REGIMM_BGEZAL:
- case REGIMM_BGEZALL:
-+ case REGIMM_TGEI:
-+ case REGIMM_TGEIU:
-+ case REGIMM_TLTI:
-+ case REGIMM_TLTIU:
-+ case REGIMM_TEQI:
-+ case REGIMM_TNEI:
- debug("%s\t%s,", regimm_names[regimm5], regnames[rs]);
-
- addr = (dumpaddr + 4) + (imm << 2);
diff --git a/emulators/gxemul/patches/patch-src_devices_dev__footbridge.cc b/emulators/gxemul/patches/patch-src_devices_dev__footbridge.cc
deleted file mode 100644
index b01397c4a05..00000000000
--- a/emulators/gxemul/patches/patch-src_devices_dev__footbridge.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-src_devices_dev__footbridge.cc,v 1.1 2017/05/15 01:45:49 christos Exp $
-- fix hang interrupt issue. Always assert the irq's even if we have alread
- asserted the global irq for the device. prevents hangs with cats.
-- add cosmetic (no/op) code for the SDRAM setup that cats does.
-
---- src/devices/dev_footbridge.cc.orig 2014-08-17 04:45:12.000000000 -0400
-+++ src/devices/dev_footbridge.cc 2017-05-14 21:30:25.392564100 -0400
-@@ -154,7 +154,7 @@
- struct footbridge_data *d = (struct footbridge_data *) interrupt->extra;
- d->irq_status |= interrupt->line;
-
-- if ((d->irq_status & d->irq_enable) && !d->irq_asserted) {
-+ if ((d->irq_status & d->irq_enable) /* && !d->irq_asserted */) {
- d->irq_asserted = 1;
- INTERRUPT_ASSERT(d->irq);
- }
-@@ -455,6 +455,42 @@
- INTERRUPT_DEASSERT(d->timer_irq[timer_nr]);
- break;
-
-+ case SDRAM_BA_MASK:
-+ if (writeflag == MEM_READ) {
-+ fatal("[ footbridge read to sdram_ba_mask ]\n");
-+ exit(1);
-+ } else {
-+ switch (idata) {
-+ case SDRAM_MASK_256KB:
-+ case SDRAM_MASK_512KB:
-+ case SDRAM_MASK_1MB:
-+ case SDRAM_MASK_2MB:
-+ case SDRAM_MASK_4MB:
-+ case SDRAM_MASK_8MB:
-+ case SDRAM_MASK_16MB:
-+ case SDRAM_MASK_32MB:
-+ case SDRAM_MASK_64MB:
-+ case SDRAM_MASK_128MB:
-+ case SDRAM_MASK_256MB:
-+ break;
-+ default:
-+ fatal("[ footbridge write to sdram_ba_mask "
-+ "%#llx ]\n", (long long)idata);
-+ break;
-+ }
-+ }
-+ break;
-+ case SDRAM_BA_OFFSET:
-+ if (writeflag == MEM_READ) {
-+ fatal("[ footbridge read to sdram_ba_offset ]\n");
-+ exit(1);
-+ } else {
-+ if (idata != 0)
-+ fatal("[ footbridge write to sdram_ba_offset "
-+ "%#llx ]\n", (long long)idata);
-+ }
-+ break;
-+
- default:if (writeflag == MEM_READ) {
- fatal("[ footbridge: read from 0x%x ]\n",
- (int)relative_addr);
diff --git a/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc b/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc
deleted file mode 100644
index 7604f83b036..00000000000
--- a/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-src_devices_dev__sh4.cc,v 1.4 2019/01/04 13:35:16 ryoon Exp $
-
-Put the actual number of characters waiting in the FIFO instead of 1 or 0
-
---- src/devices/dev_sh4.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/devices/dev_sh4.cc
-@@ -1715,8 +1715,8 @@ DEVICE_ACCESS(sh4)
-
- case SH4_SCIF_BASE + SCIF_FDR:
- /* Nr of bytes in the TX and RX fifos, respectively: */
-- odata = (console_charavail(d->scif_console_handle)? 1 : 0)
-- + (d->scif_tx_fifo_cursize << 8);
-+ odata = console_charavail(d->scif_console_handle) |
-+ (d->scif_tx_fifo_cursize << 8);
- break;
-
- case SH4_SCIF_BASE + SCIF_SPTR:
diff --git a/emulators/gxemul/patches/patch-src_disk_diskimage__scsicmd.cc b/emulators/gxemul/patches/patch-src_disk_diskimage__scsicmd.cc
deleted file mode 100644
index 63d6cb242a4..00000000000
--- a/emulators/gxemul/patches/patch-src_disk_diskimage__scsicmd.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-src_disk_diskimage__scsicmd.cc,v 1.1 2019/04/11 12:50:30 christos Exp $
-
-Ignore unimplemented disk commands instead of exiting.
-
---- src/disk/diskimage_scsicmd.cc.orig 2018-12-07 01:29:22.000000000 -0500
-+++ src/disk/diskimage_scsicmd.cc 2019-04-11 08:13:01.813050193 -0400
-@@ -1145,9 +1145,9 @@
- break;
-
- default:
-- fatal("[ UNIMPLEMENTED SCSI command 0x%02x, disk id=%i ]\n",
-+ debug("[ UNIMPLEMENTED SCSI command 0x%02x, disk id=%i ]\n",
- xferp->cmd[0], id);
-- exit(1);
-+ break;
- }
- debug(" ]\n");
-
diff --git a/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h b/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h
deleted file mode 100644
index 019c19dd360..00000000000
--- a/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-src_include_components_CPUDyntransComponent.h,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/include/components/CPUDyntransComponent.h.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/include/components/CPUDyntransComponent.h
-@@ -47,9 +47,13 @@ class CPUDyntransComponent;
- * f points to a function to be executed.
- * arg[] contains arguments, such as pointers to registers, or immediate values.
- */
-+class CPUDyntransComponent;
-+struct DyntransIC;
-+typedef void (*DyntransIC_t)(class CPUDyntransComponent*, struct DyntransIC*);
-+
- struct DyntransIC
- {
-- void (*f)(CPUDyntransComponent*, DyntransIC*);
-+ DyntransIC_t f;
-
- union {
- void* p;
-@@ -105,7 +109,7 @@ public:
- protected:
- // Implemented by specific CPU families:
- virtual int GetDyntransICshift() const = 0;
-- virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent* cpu, DyntransIC* ic) = 0;
-+ virtual DyntransIC_t GetDyntransToBeTranslated() = 0;
-
- void DyntransToBeTranslatedBegin(struct DyntransIC*);
- bool DyntransReadInstruction(uint16_t& iword);
diff --git a/emulators/gxemul/patches/patch-src_include_components_M88K__CPUComponent.h b/emulators/gxemul/patches/patch-src_include_components_M88K__CPUComponent.h
deleted file mode 100644
index dc9ac05b3e8..00000000000
--- a/emulators/gxemul/patches/patch-src_include_components_M88K__CPUComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_include_components_M88K__CPUComponent.h,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/include/components/M88K_CPUComponent.h.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/include/components/M88K_CPUComponent.h
-@@ -377,7 +377,7 @@ protected:
- virtual bool FunctionTraceReturnImpl(int64_t& retval) { retval = m_r[M88K_RETURN_VALUE_REG]; return true; }
-
- virtual int GetDyntransICshift() const;
-- virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*);
-+ virtual DyntransIC_t GetDyntransToBeTranslated();
-
- virtual void ShowRegisters(GXemul* gxemul, const vector<string>& arguments) const;
-
diff --git a/emulators/gxemul/patches/patch-src_include_components_MIPS__CPUComponent.h b/emulators/gxemul/patches/patch-src_include_components_MIPS__CPUComponent.h
deleted file mode 100644
index 0ef55e0bf41..00000000000
--- a/emulators/gxemul/patches/patch-src_include_components_MIPS__CPUComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_include_components_MIPS__CPUComponent.h,v 1.2 2019/01/04 13:35:16 ryoon Exp $
-
-Don't define functions returning functions.
-
---- src/include/components/MIPS_CPUComponent.h.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/include/components/MIPS_CPUComponent.h
-@@ -196,7 +196,7 @@ protected:
- virtual bool FunctionTraceReturnImpl(int64_t& retval);
-
- virtual int GetDyntransICshift() const;
-- virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*);
-+ virtual DyntransIC_t GetDyntransToBeTranslated();
-
- virtual void ShowRegisters(GXemul* gxemul, const vector<string>& arguments) const;
-
diff --git a/emulators/gxemul/patches/patch-src_include_mips_cpu_types.h b/emulators/gxemul/patches/patch-src_include_mips_cpu_types.h
deleted file mode 100644
index 04a99eb5391..00000000000
--- a/emulators/gxemul/patches/patch-src_include_mips_cpu_types.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-src_include_mips_cpu_types.h,v 1.3 2019/01/04 13:35:16 ryoon Exp $
-
-* Real MIPS MALTA has no FPU.
-
---- src/include/mips_cpu_types.h.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/include/mips_cpu_types.h
-@@ -98,10 +98,10 @@
- { "RM7900", 0x34 /*?*/, 0x0 /* ? */,DCOUNT,EXC4K, MMU4K, 4, 0, 64, 4,14,5,1,14,5,1,18, 6, 1 }, /* instrs/cycle? cachelinesize? assoc = 4ways for all */ \
- { "RM9000", 0x34 /*?*/, 0x0 /* ? */,DCOUNT,EXC4K, MMU4K, 4, 0, 48, 4,14,5,1,14,5,1,18, 6, 1 }, /* This is totally bogus */ \
- { "RC32334", MIPS_RC32300,0x00, 0, EXC32, MMU4K, 32, 1, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \
-- { "4Kc", 0x100+MIPS_4Kc, 1, 0, EXC32, MMU32, 32, 1, 16, 4,14,4,2,14,4,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-- { "4KEc", 0x100+MIPS_4KEc_R2, 1, 0, EXC32, MMU32, 32, 2, 16, 4,14,4,2,14,4,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-- { "5Kc", 0x100+MIPS_5Kc, 1, 0, EXC64, MMU64, 64, 1, 48, 4,15,5,2,15,5,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-- { "5KE", 0x100+MIPS_5KE, 1, 0, EXC64, MMU64, 64, 2, 48, 4,15,5,2,15,5,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-+ { "4Kc", 0x100+MIPS_4Kc, 1, NOFPU, EXC32, MMU32, 32, 1, 16, 4,14,4,2,14,4,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-+ { "4KEc", 0x100+MIPS_4KEc_R2, 1, NOFPU, EXC32, MMU32, 32, 2, 16, 4,14,4,2,14,4,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-+ { "5Kc", 0x100+MIPS_5Kc, 1, NOFPU, EXC64, MMU64, 64, 1, 48, 4,15,5,2,15,5,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
-+ { "5KE", 0x100+MIPS_5KE, 1, NOFPU, EXC64, MMU64, 64, 2, 48, 4,15,5,2,15,5,2, 0, 0, 0 }, /* DCOUNT? instrs/cycle? BOGUS, TODO */ \
- { "24KEc", 0x100+MIPS_24KE, 1, 0, EXC32, MMU32, 32, 2, 32, 4,15,5,2,15,5,2, 0, 0, 0 }, /* revision level? DCOUNT? instrs/cycle? cache? BOGUS, TODO */ \
- { "BCM4710", 0x000240, 0x00, 0, EXC32, MMU32, 32, 1, 32, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* TODO: this is just bogus */ \
- { "BCM4712", 0x000290, 0x07, 0, EXC32, MMU32, 32, 1, 32, 2,13,4,1,12,4,1, 0, 0, 0 }, /* 2ways I, 2ways D */ \
diff --git a/emulators/gxemul/patches/patch-src_include_refcount__ptr.h b/emulators/gxemul/patches/patch-src_include_refcount__ptr.h
deleted file mode 100644
index ececeb38dc3..00000000000
--- a/emulators/gxemul/patches/patch-src_include_refcount__ptr.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_include_refcount__ptr.h,v 1.3 2019/01/04 13:35:16 ryoon Exp $
-
-Fix compilation on Linux.
-
---- src/include/refcount_ptr.h.orig 2014-08-17 08:45:13.000000000 +0000
-+++ src/include/refcount_ptr.h
-@@ -33,6 +33,8 @@ template <class T>
- class refcount_ptr;
-
-
-+#include <stddef.h>
-+
- /**
- * \brief Base class for reference countable objects.
- *
diff --git a/emulators/gxemul/patches/patch-src_machines_machine__pmax.cc b/emulators/gxemul/patches/patch-src_machines_machine__pmax.cc
deleted file mode 100644
index 49907ad43bf..00000000000
--- a/emulators/gxemul/patches/patch-src_machines_machine__pmax.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_machines_machine__pmax.cc,v 1.3 2019/01/04 13:35:17 ryoon Exp $
-
-sd0 -> rz0 so we can find our boot device.
-
---- src/machines/machine_pmax.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/machines/machine_pmax.cc
-@@ -804,7 +804,7 @@ abort();
- strlcpy(bootpath, "rz(0,0,0)", sizeof(bootpath));
- else
- #endif
-- strlcpy(bootpath, "5/rz1/", sizeof(bootpath));
-+ strlcpy(bootpath, "5/rz0/", sizeof(bootpath));
-
- if (machine->bootdev_id < 0 || machine->force_netboot) {
- /* tftp boot: */
diff --git a/emulators/gxemul/patches/patch-src_old__main_timer.cc b/emulators/gxemul/patches/patch-src_old__main_timer.cc
deleted file mode 100644
index b0b43e9b7fd..00000000000
--- a/emulators/gxemul/patches/patch-src_old__main_timer.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_old__main_timer.cc,v 1.1 2019/03/03 10:41:28 gson Exp $
-
-Set the SA_RESTART flag on SIGALRM so that it will not interrupt
-writes to the console causing loss of console data.
-
---- src/old_main/timer.cc.orig 2018-12-07 06:29:22.000000000 +0000
-+++ src/old_main/timer.cc
-@@ -229,6 +229,7 @@ void timer_start(void)
-
- memset(&saction, 0, sizeof(saction));
- saction.sa_handler = timer_tick;
-+ saction.sa_flags = SA_RESTART;
-
- sigaction(SIGALRM, &saction, NULL);
-