summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pexception.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@users.noreply.github.com>2022-06-10 16:11:21 +0200
committer GitHub <noreply@github.com>2022-06-10 16:11:21 +0200
commit1f3f5e0d574e256bc106ee4bc9ee701858585ca3 (patch)
treee471112c27fccd862215cf2c460d5471d546de86 /src/lib/netlist/plib/pexception.cpp
parent63e595ae364a6f9e6b3692af673d1a0c48523f2d (diff)
netlist: fix bugs and more cpp instead of macros (#9897)
* netlist: fix bugs and more cpp instead of macros - C-style comments converted to c++ - Fix crash in state saving code when an abort queue processing event is pending. - Fix a bug where a net could be twice in the queue. - Convert more macros to c++ - fixed SUBTARGET=nl build - fixed potential bugs which would allow a terminal to belong to more than one net. This is not possible even for a short time. - moved some member function definitions out-of-class. - moved code out-of-class - added constexpr where appropriate - fixed mamenl build - Cleanup and indentation
Diffstat (limited to 'src/lib/netlist/plib/pexception.cpp')
-rw-r--r--src/lib/netlist/plib/pexception.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/netlist/plib/pexception.cpp b/src/lib/netlist/plib/pexception.cpp
index 61cb9480301..260fa908bf0 100644
--- a/src/lib/netlist/plib/pexception.cpp
+++ b/src/lib/netlist/plib/pexception.cpp
@@ -28,7 +28,7 @@ namespace plib {
}
catch (...)
{
- /* ignore */
+ // ignore
}
std::terminate();
}
@@ -45,7 +45,7 @@ namespace plib {
}
catch (...)
{
- /* ignore */
+ // ignore
}
std::terminate();
}
@@ -106,17 +106,17 @@ namespace plib {
//FIXME: mingw needs to be compiled with `-fnon-call-exceptions`
- fp_signal_enabler::fp_signal_enabler(unsigned fpexceptions)
+ fp_signal_enabler::fp_signal_enabler(unsigned fp_exceptions)
{
#if HAS_FEENABLE_EXCEPT
if (m_enable)
{
int b = 0;
- if (fpexceptions & plib::FP_INEXACT) b = b | FE_INEXACT;
- if (fpexceptions & plib::FP_DIVBYZERO) b = b | FE_DIVBYZERO;
- if (fpexceptions & plib::FP_UNDERFLOW) b = b | FE_UNDERFLOW;
- if (fpexceptions & plib::FP_OVERFLOW) b = b | FE_OVERFLOW;
- if (fpexceptions & plib::FP_INVALID) b = b | FE_INVALID;
+ if (fp_exceptions & plib::FP_INEXACT) b = b | FE_INEXACT;
+ if (fp_exceptions & plib::FP_DIVBYZERO) b = b | FE_DIVBYZERO;
+ if (fp_exceptions & plib::FP_UNDERFLOW) b = b | FE_UNDERFLOW;
+ if (fp_exceptions & plib::FP_OVERFLOW) b = b | FE_OVERFLOW;
+ if (fp_exceptions & plib::FP_INVALID) b = b | FE_INVALID;
if ((b & m_last_enabled) != b)
m_last_enabled = feenableexcept(b);
}
@@ -124,11 +124,11 @@ namespace plib {
if (m_enable)
{
int b = _EM_DENORMAL | _EM_INEXACT | _EM_ZERODIVIDE | _EM_UNDERFLOW | _EM_OVERFLOW | _EM_INVALID;
- if (fpexceptions & plib::FP_INEXACT) b &= ~_EM_INEXACT;
- if (fpexceptions & plib::FP_DIVBYZERO) b &= ~_EM_ZERODIVIDE;
- if (fpexceptions & plib::FP_UNDERFLOW) b &= ~_EM_UNDERFLOW;
- if (fpexceptions & plib::FP_OVERFLOW) b &= ~_EM_OVERFLOW;
- if (fpexceptions & plib::FP_INVALID) b &= ~_EM_INVALID;
+ if (fp_exceptions & plib::FP_INEXACT) b &= ~_EM_INEXACT;
+ if (fp_exceptions & plib::FP_DIVBYZERO) b &= ~_EM_ZERODIVIDE;
+ if (fp_exceptions & plib::FP_UNDERFLOW) b &= ~_EM_UNDERFLOW;
+ if (fp_exceptions & plib::FP_OVERFLOW) b &= ~_EM_OVERFLOW;
+ if (fp_exceptions & plib::FP_INVALID) b &= ~_EM_INVALID;
m_last_enabled = _controlfp(0, 0);
_controlfp(b, _MCW_EM );
}