diff options
author | joerg <joerg> | 2012-11-23 12:33:22 +0000 |
---|---|---|
committer | joerg <joerg> | 2012-11-23 12:33:22 +0000 |
commit | a409bb522be06a2d9aee8609eb058fef35986a03 (patch) | |
tree | 420a22df7f8d6c6fcf4a909fa0b0e387883569b8 /emulators | |
parent | c2355199f2456a6c0807d2015b72d2a06a1149f9 (diff) | |
download | pkgsrc-a409bb522be06a2d9aee8609eb058fef35986a03.tar.gz |
Don't define functions returning functions.
Diffstat (limited to 'emulators')
7 files changed, 100 insertions, 1 deletions
diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo index f6aeafb644a..819f8a03e3d 100644 --- a/emulators/gxemul/distinfo +++ b/emulators/gxemul/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.38 2012/08/02 09:41:06 abs Exp $ +$NetBSD: distinfo,v 1.39 2012/11/23 12:33:22 joerg Exp $ SHA1 (gxemul-0.6.0.tar.gz) = aa37ad5f200eee045b1da2b1d3f651401cf474af RMD160 (gxemul-0.6.0.tar.gz) = ac6291a5f8bc9c0d1988d3ce39750339fe90a8ce @@ -10,4 +10,10 @@ SHA1 (patch-ae) = 19ef822c16f0f6dd50aea719e0bc797c39d1f9c0 SHA1 (patch-af) = 8304ff5d8f779ac60f8d416d27e0a183e0e47d94 SHA1 (patch-ag) = 9d13bf6f6e6038e114a45cfbd03e4e52ac60d2c7 SHA1 (patch-configure) = b7cacc97ffdeb127be196a7d352ee82b673d4026 +SHA1 (patch-src_components_cpu_CPUDyntransComponent.cc) = 1a70375b3ed409ef43122ce7e6935c07b4ed386d +SHA1 (patch-src_components_cpu_M88K__CPUComponent.cc) = 931cdc9a806e9ff48dccb2a63873c52491336b30 +SHA1 (patch-src_components_cpu_MIPS__CPUComponent.cc) = 75d8276092fcdc9f548f874e5807ae8e6a2b9eae SHA1 (patch-src_devices_dev__dreamcast__gdrom.cc) = 3e9abc13118fb79473adb11156f73c93b13b6dd8 +SHA1 (patch-src_include_components_CPUDyntransComponent.h) = 4fa3c327c4ce5ee9e39e7bc49ce6029b2a7da100 +SHA1 (patch-src_include_components_M88K__CPUComponent.h) = afd07ae4df33d0c0a9d3d8c15dca4ef9ee7dd916 +SHA1 (patch-src_include_components_MIPS__CPUComponent.h) = 4e49da9af0d220a1ea7c4520d8e7e53d8d84c155 diff --git a/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc b/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc new file mode 100644 index 00000000000..850ce9d86de --- /dev/null +++ b/emulators/gxemul/patches/patch-src_components_cpu_CPUDyntransComponent.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-src_components_cpu_CPUDyntransComponent.cc,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- 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 new file mode 100644 index 00000000000..d52ddf560b8 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_components_cpu_M88K__CPUComponent.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-src_components_cpu_M88K__CPUComponent.cc,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- src/components/cpu/M88K_CPUComponent.cc.orig 2010-02-14 09:33:54.000000000 +0000 ++++ src/components/cpu/M88K_CPUComponent.cc +@@ -337,7 +337,7 @@ int M88K_CPUComponent::GetDyntransICshif + } + + +-void (*M88K_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*) const ++DyntransIC_t M88K_CPUComponent::GetDyntransToBeTranslated() const + { + 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 new file mode 100644 index 00000000000..566354d7f4e --- /dev/null +++ b/emulators/gxemul/patches/patch-src_components_cpu_MIPS__CPUComponent.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-src_components_cpu_MIPS__CPUComponent.cc,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- src/components/cpu/MIPS_CPUComponent.cc.orig 2012-11-19 20:12:23.000000000 +0000 ++++ src/components/cpu/MIPS_CPUComponent.cc +@@ -327,7 +327,7 @@ int MIPS_CPUComponent::GetDyntransICshif + } + + +-void (*MIPS_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, DyntransIC*) const ++DyntransIC_t MIPS_CPUComponent::GetDyntransToBeTranslated() const + { + bool mips16 = m_pc & 1? true : false; + return mips16? instr_ToBeTranslated_MIPS16 : instr_ToBeTranslated; diff --git a/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h b/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h new file mode 100644 index 00000000000..e67ed554256 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_include_components_CPUDyntransComponent.h @@ -0,0 +1,28 @@ +$NetBSD: patch-src_include_components_CPUDyntransComponent.h,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- src/include/components/CPUDyntransComponent.h.orig 2012-11-19 20:05:03.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) const = 0; ++ virtual DyntransIC_t GetDyntransToBeTranslated() const = 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 new file mode 100644 index 00000000000..299d96b08ec --- /dev/null +++ b/emulators/gxemul/patches/patch-src_include_components_M88K__CPUComponent.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_include_components_M88K__CPUComponent.h,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- src/include/components/M88K_CPUComponent.h.orig 2012-11-19 20:10:14.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*) const; ++ virtual DyntransIC_t GetDyntransToBeTranslated() const ; + + 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 new file mode 100644 index 00000000000..1f5357ca0d5 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_include_components_MIPS__CPUComponent.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_include_components_MIPS__CPUComponent.h,v 1.1 2012/11/23 12:33:22 joerg Exp $ + +--- src/include/components/MIPS_CPUComponent.h.orig 2012-11-19 20:10:20.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*) const; ++ virtual DyntransIC_t GetDyntransToBeTranslated() const; + + virtual void ShowRegisters(GXemul* gxemul, const vector<string>& arguments) const; + |