mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
Fix mingw 32 bit build. (nw)
This commit is contained in:
parent
0716d96514
commit
8536d065e2
@ -88,6 +88,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..\..\</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
@ -127,7 +128,6 @@
|
||||
<ClCompile Include="..\devices\nld_74192.cpp" />
|
||||
<ClCompile Include="..\devices\nld_74193.cpp" />
|
||||
<ClCompile Include="..\devices\nld_74194.cpp" />
|
||||
<ClCompile Include="..\devices\nld_74279.cpp" />
|
||||
<ClCompile Include="..\devices\nld_74365.cpp" />
|
||||
<ClCompile Include="..\devices\nld_7448.cpp" />
|
||||
<ClCompile Include="..\devices\nld_7450.cpp" />
|
||||
@ -144,7 +144,6 @@
|
||||
<ClCompile Include="..\devices\nld_82S126.cpp" />
|
||||
<ClCompile Include="..\devices\nld_82S16.cpp" />
|
||||
<ClCompile Include="..\devices\nld_9310.cpp" />
|
||||
<ClCompile Include="..\devices\nld_9312.cpp" />
|
||||
<ClCompile Include="..\devices\nld_9316.cpp" />
|
||||
<ClCompile Include="..\devices\nld_9322.cpp" />
|
||||
<ClCompile Include="..\devices\nld_am2847.cpp" />
|
||||
@ -209,7 +208,6 @@
|
||||
<ClInclude Include="..\devices\nld_74192.h" />
|
||||
<ClInclude Include="..\devices\nld_74193.h" />
|
||||
<ClInclude Include="..\devices\nld_74194.h" />
|
||||
<ClInclude Include="..\devices\nld_74279.h" />
|
||||
<ClInclude Include="..\devices\nld_74365.h" />
|
||||
<ClInclude Include="..\devices\nld_7448.h" />
|
||||
<ClInclude Include="..\devices\nld_7450.h" />
|
||||
@ -226,7 +224,6 @@
|
||||
<ClInclude Include="..\devices\nld_82S126.h" />
|
||||
<ClInclude Include="..\devices\nld_82S16.h" />
|
||||
<ClInclude Include="..\devices\nld_9310.h" />
|
||||
<ClInclude Include="..\devices\nld_9312.h" />
|
||||
<ClInclude Include="..\devices\nld_9316.h" />
|
||||
<ClInclude Include="..\devices\nld_9322.h" />
|
||||
<ClInclude Include="..\devices\nld_am2847.h" />
|
||||
|
@ -186,9 +186,6 @@
|
||||
<ClCompile Include="..\devices\nld_7473.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\devices\nld_74279.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\devices\nld_4066.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -228,9 +225,6 @@
|
||||
<ClCompile Include="..\devices\nld_7474.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\devices\nld_9312.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\devices\nld_82S126.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -434,9 +428,6 @@
|
||||
<ClInclude Include="..\devices\nlid_proxy.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\devices\nld_74279.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\devices\nld_log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -470,9 +461,6 @@
|
||||
<ClInclude Include="..\devices\nld_7474.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\devices\nld_9312.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\devices\nld_74194.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -116,6 +116,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
24
src/lib/netlist/devices/nlid_truthtable.cpp
Normal file → Executable file
24
src/lib/netlist/devices/nlid_truthtable.cpp
Normal file → Executable file
@ -69,6 +69,8 @@ namespace netlist
|
||||
size_t m_size;
|
||||
};
|
||||
|
||||
static const uint_least64_t one64 = static_cast<uint_least64_t>(1);
|
||||
|
||||
struct truthtable_desc_t
|
||||
{
|
||||
truthtable_desc_t(unsigned NO, unsigned NI, bool *initialized,
|
||||
@ -159,7 +161,7 @@ namespace netlist
|
||||
connect(m_Q[i], m_I[idx]);
|
||||
// disable ignore for this inputs altogether.
|
||||
// FIXME: This shouldn't be necessary
|
||||
disabled_ignore |= (1<<idx);
|
||||
disabled_ignore |= (one64 << idx);
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,7 +238,7 @@ uint_least64_t truthtable_desc_t::set_bits(uint_least64_t v, uint_least64_t b)
|
||||
uint_least64_t truthtable_desc_t::get_ignored_simple(uint_least64_t i)
|
||||
{
|
||||
uint_least64_t m_enable = 0;
|
||||
for (size_t j=0; j<m_size; j++)
|
||||
for (uint_least64_t j=0; j<m_size; j++)
|
||||
{
|
||||
if (m_outs[j] != m_outs[i])
|
||||
{
|
||||
@ -250,24 +252,24 @@ uint_least64_t truthtable_desc_t::get_ignored_extended(uint_least64_t state)
|
||||
{
|
||||
// Determine all inputs which may be ignored ...
|
||||
uint_least64_t ignore = 0;
|
||||
for (unsigned j=0; j<m_NI; j++)
|
||||
for (std::size_t j=0; j<m_NI; j++)
|
||||
{
|
||||
if (m_outs[state] == m_outs[state ^ (1 << j)])
|
||||
ignore |= (1<<j);
|
||||
if (m_outs[state] == m_outs[state ^ (one64 << j)])
|
||||
ignore |= (one64 << j);
|
||||
}
|
||||
/* Check all permutations of ign
|
||||
* We have to remove those where the ignored inputs
|
||||
* may change the output
|
||||
*/
|
||||
uint_least64_t bits = (1<<count_bits(ignore));
|
||||
uint_least64_t bits = (one64 << count_bits(ignore));
|
||||
std::vector<bool> t(bits);
|
||||
|
||||
for (size_t j=1; j<bits; j++)
|
||||
{
|
||||
uint_least64_t tign = set_bits(ignore, j);
|
||||
t[j] = 0;
|
||||
uint_least64_t bitsk=(1<<count_bits(tign));
|
||||
for (size_t k=0; k<bitsk; k++)
|
||||
uint_least64_t bitsk=(one64 << count_bits(tign));
|
||||
for (uint_least64_t k=0; k<bitsk; k++)
|
||||
{
|
||||
uint_least64_t b=set_bits(tign, k);
|
||||
if (m_outs[state] != m_outs[(state & ~tign) | b])
|
||||
@ -377,7 +379,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least
|
||||
{
|
||||
pstring outs = out[j].trim();
|
||||
if (outs.equals("1"))
|
||||
val = val | (1 << j);
|
||||
val = val | (one64 << j);
|
||||
else
|
||||
nl_assert_always(outs.equals("0"), "Unknown value (not 0 or 1");
|
||||
netlist_time t = netlist_time::from_nsec(static_cast<unsigned long>(times[j].trim().as_long()));
|
||||
@ -399,7 +401,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least
|
||||
// determine ignore
|
||||
std::vector<uint_least64_t> ign(m_size, all_set);
|
||||
|
||||
for (size_t i=0; i<m_size; i++)
|
||||
for (uint_least64_t i=0; i<m_size; i++)
|
||||
{
|
||||
if (ign[i] == all_set)
|
||||
{
|
||||
@ -415,7 +417,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least
|
||||
|
||||
ign[i] = tign;
|
||||
/* don't need to recalculate similar ones */
|
||||
uint_least64_t bitsk=(1<<count_bits(tign));
|
||||
uint_least64_t bitsk=(one64 << count_bits(tign));
|
||||
for (uint_least64_t k=0; k<bitsk; k++)
|
||||
{
|
||||
uint_least64_t b=set_bits(tign, k);
|
||||
|
@ -56,7 +56,7 @@ typedef __int128_t INT128;
|
||||
//============================================================
|
||||
|
||||
// This will be autodetected
|
||||
// #define PPMF_TYPE 0
|
||||
//#define PPMF_TYPE 0
|
||||
|
||||
#define PPMF_TYPE_PMF 0
|
||||
#define PPMF_TYPE_GNUC_PMF_CONV 1
|
||||
@ -92,6 +92,11 @@ typedef __int128_t INT128;
|
||||
#else
|
||||
#define PPMF_TYPE PPMF_TYPE_PMF
|
||||
#endif
|
||||
#else
|
||||
#undef PHAS_PMF_INTERNAL
|
||||
#define PHAS_PMF_INTERNAL 0
|
||||
#undef MEMBER_ABI
|
||||
#define MEMBER_ABI
|
||||
#endif
|
||||
|
||||
#endif /* PCONFIG_H_ */
|
||||
|
@ -177,6 +177,7 @@ namespace plib {
|
||||
function_ptr t = *reinterpret_cast<function_ptr *>(&m_func);
|
||||
return (obj->*t)(std::forward<Targs>(args)...);
|
||||
}
|
||||
bool is_set() { return m_func != nullptr; }
|
||||
private:
|
||||
generic_function m_func;
|
||||
#if 0 && defined(_MSC_VER)
|
||||
|
Loading…
Reference in New Issue
Block a user