summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/3rdparty.lua23
-rw-r--r--src/devices/cpu/avr8/avr8ops.hxx6
-rw-r--r--src/devices/cpu/bcp/dp8344.cpp4
-rw-r--r--src/devices/cpu/e132xs/e132xsop.hxx4
-rw-r--r--src/devices/cpu/mips/r4000.cpp4
-rw-r--r--src/devices/cpu/we32000/we32100d.cpp2
-rw-r--r--src/devices/cpu/z8000/z8000ops.hxx4
-rw-r--r--src/devices/machine/netlist.cpp6
-rw-r--r--src/mame/drivers/cloud9.cpp2
-rw-r--r--src/mame/drivers/mastboy.cpp2
-rw-r--r--src/mame/drivers/spec128.cpp2
-rw-r--r--src/mame/machine/nes_vt_soc.cpp13
12 files changed, 42 insertions, 30 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 4cb22313ae2..bf84e7bb347 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -717,6 +717,11 @@ project "7z"
"-Wno-undef",
"-Wno-strict-prototypes",
}
+if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") and str_to_version(_OPTIONS["gcc_version"]) >= 100000 then
+ buildoptions_c {
+ "-Wno-misleading-indentation",
+ }
+end
configuration { "mingw*" }
buildoptions_c {
@@ -729,6 +734,11 @@ project "7z"
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
"/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter
}
+if _OPTIONS["vs"]=="clangcl" then
+ buildoptions {
+ "-Wno-misleading-indentation",
+ }
+end
if _OPTIONS["vs"]=="intel-15" then
buildoptions {
"/Qwd869", -- remark #869: parameter "xxx" was never referenced
@@ -745,11 +755,6 @@ end
"_7ZIP_ST",
}
- if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") and str_to_version(_OPTIONS["gcc_version"]) >= 100000 then
- buildoptions_c {
- "-Wno-misleading-indentation",
- }
- end
files {
MAME_DIR .. "3rdparty/lzma/C/7zAlloc.c",
MAME_DIR .. "3rdparty/lzma/C/7zArcIn.c",
@@ -985,6 +990,12 @@ if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.fi
"-Wno-incompatible-pointer-types-discards-qualifiers",
}
end
+ configuration { "vs*" }
+if _OPTIONS["vs"]=="clangcl" then
+ buildoptions {
+ "-Wno-implicit-int-float-conversion",
+ }
+end
configuration { "winstore*" }
defines {
"SQLITE_OS_WINRT",
@@ -1512,7 +1523,7 @@ project "portaudio"
}
end
end
- if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") and version >= 100000 then
+ if _string.find(_OPTIONS["gcc"], "clang") and version >= 100000 then
buildoptions_c {
"-Wno-misleading-indentation",
}
diff --git a/src/devices/cpu/avr8/avr8ops.hxx b/src/devices/cpu/avr8/avr8ops.hxx
index 6ad36baa35b..19114961d48 100644
--- a/src/devices/cpu/avr8/avr8ops.hxx
+++ b/src/devices/cpu/avr8/avr8ops.hxx
@@ -686,7 +686,7 @@ void avr8_device::op_cpc(uint16_t op)
const uint8_t rd = m_r[RD5(op)];
const uint8_t rr = m_r[RR5(op)];
const uint8_t c = SREG & AVR8_SREG_MASK_C;
- const uint8_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
+ const uint32_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
SREG &= ~(AVR8_SREG_MASK_H | AVR8_SREG_MASK_V | AVR8_SREG_MASK_N | AVR8_SREG_MASK_S | AVR8_SREG_MASK_Z | AVR8_SREG_MASK_C);
SREG |= m_sbc_flag_cache[z | (c << 16) | (rd << 8) | rr];
}
@@ -698,7 +698,7 @@ void avr8_device::op_sbc(uint16_t op)
const uint8_t c = SREG & AVR8_SREG_MASK_C;
const uint8_t res = rd - (rr + c);
m_r[RD5(op)] = res;
- const uint8_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
+ const uint32_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
SREG &= ~(AVR8_SREG_MASK_H | AVR8_SREG_MASK_V | AVR8_SREG_MASK_N | AVR8_SREG_MASK_S | AVR8_SREG_MASK_Z | AVR8_SREG_MASK_C);
SREG |= m_sbc_flag_cache[z | (c << 16) | (rd << 8) | rr];
}
@@ -798,7 +798,7 @@ void avr8_device::op_sbci(uint16_t op)
const uint8_t c = SREG & AVR8_SREG_MASK_C;
const uint8_t res = rd - (rr + c);
m_r[16 + RD4(op)] = res;
- const uint8_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
+ const uint32_t z = (SREG & AVR8_SREG_MASK_Z) ? (1 << 17) : 0;
SREG &= ~(AVR8_SREG_MASK_H | AVR8_SREG_MASK_V | AVR8_SREG_MASK_N | AVR8_SREG_MASK_S | AVR8_SREG_MASK_Z | AVR8_SREG_MASK_C);
SREG |= m_sbc_flag_cache[z | (c << 16) | (rd << 8) | rr];
}
diff --git a/src/devices/cpu/bcp/dp8344.cpp b/src/devices/cpu/bcp/dp8344.cpp
index 819981a58ec..28c99a8ebed 100644
--- a/src/devices/cpu/bcp/dp8344.cpp
+++ b/src/devices/cpu/bcp/dp8344.cpp
@@ -655,7 +655,7 @@ u8 dp8344_device::rotate_right(u8 data, u8 b)
u8 dp8344_device::add_nzcv(u8 s1, u8 s2, bool carry_in)
{
s16 result = s8(s1) + s8(s2) + (carry_in ? 1 : 0);
- if (result >= 128 && result < -128)
+ if (result >= 128 || result < -128)
m_ccr |= 0x04;
else
m_ccr &= 0xfb;
@@ -674,7 +674,7 @@ u8 dp8344_device::add_nzcv(u8 s1, u8 s2, bool carry_in)
u8 dp8344_device::sub_nzcv(u8 s1, u8 s2, bool carry_in)
{
s16 result = s8(s1) - s8(s2) - (carry_in ? 1 : 0);
- if (result >= 128 && result < -128)
+ if (result >= 128 || result < -128)
m_ccr |= 0x04;
else
m_ccr &= 0xfb;
diff --git a/src/devices/cpu/e132xs/e132xsop.hxx b/src/devices/cpu/e132xs/e132xsop.hxx
index 1a82e5bb57c..36284db88eb 100644
--- a/src/devices/cpu/e132xs/e132xsop.hxx
+++ b/src/devices/cpu/e132xs/e132xsop.hxx
@@ -2118,7 +2118,7 @@ void hyperstone_device::hyperstone_mulsu()
(DST_GLOBAL ? m_core->global_regs : m_core->local_regs)[dstf_code] = (uint32_t)double_word;
m_core->icount -= m_core->clock_cycles_6;
- if(SIGNED == IS_SIGNED && (sreg >= 0xffff8000 && sreg <= 0x7fff) && (dreg >= 0xffff8000 && dreg <= 0x7fff))
+ if(SIGNED == IS_SIGNED && ((int32_t) sreg >= -0x8000 && (int32_t) sreg <= 0x7fff) && ((int32_t) dreg >= -0x8000 && (int32_t) dreg <= 0x7fff))
m_core->icount += m_core->clock_cycles_2;
else if(SIGNED == IS_UNSIGNED && sreg <= 0xffff && dreg <= 0xffff)
m_core->icount += m_core->clock_cycles_2;
@@ -2210,7 +2210,7 @@ void hyperstone_device::hyperstone_mul()
(DST_GLOBAL ? m_core->global_regs : m_core->local_regs)[dst_code] = result;
- if (sreg < 0xffff8000 || sreg > 0x7fff || dreg < 0xffff8000 || dreg > 0x7fff)
+ if ((int32_t)sreg < -0x8000 || (int32_t) sreg > 0x7fff || (int32_t) dreg < -0x8000 || (int32_t) dreg > 0x7fff)
m_core->icount -= 5 << m_core->clck_scale;
else
m_core->icount -= 3 << m_core->clck_scale;
diff --git a/src/devices/cpu/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp
index 7b409dc0bab..2d51e7d0e8a 100644
--- a/src/devices/cpu/mips/r4000.cpp
+++ b/src/devices/cpu/mips/r4000.cpp
@@ -3600,7 +3600,7 @@ r4000_base_device::translate_result r4000_base_device::translate(int intention,
u64 const key = (address & (extended ? (EH_R | EH_VPN2_64) : EH_VPN2_32)) | (m_cp0[CP0_EntryHi] & EH_ASID);
unsigned *mru = m_tlb_mru[intention & TRANSLATE_TYPE_MASK];
- if (LOG_STATS)
+ if (VERBOSE & LOG_STATS)
m_tlb_scans++;
bool invalid = false;
@@ -3617,7 +3617,7 @@ r4000_base_device::translate_result r4000_base_device::translate(int intention,
if ((entry.vpn & mask) != (key & mask))
continue;
- if (LOG_STATS)
+ if (VERBOSE & LOG_STATS)
m_tlb_loops += i + 1;
u64 const pfn = entry.pfn[BIT(address, entry.low_bit)];
diff --git a/src/devices/cpu/we32000/we32100d.cpp b/src/devices/cpu/we32000/we32100d.cpp
index 65406d85446..b473ff2cc73 100644
--- a/src/devices/cpu/we32000/we32100d.cpp
+++ b/src/devices/cpu/we32000/we32100d.cpp
@@ -360,7 +360,7 @@ offs_t we32100_disassembler::disassemble(std::ostream &stream, offs_t pc, const
|| op == 0x00
|| op == 0x26
|| (op & 0xfa) == 0x0a
- || (op & 0xfd) == 0x12
+ // TODO (always false) || (op & 0xfd) == 0x12
|| (op & 0xfe) == 0x1a
|| (op & 0xfc) == 0x98
|| (op & 0xde) == 0xc2
diff --git a/src/devices/cpu/z8000/z8000ops.hxx b/src/devices/cpu/z8000/z8000ops.hxx
index 457e234f5ea..82b9bd86442 100644
--- a/src/devices/cpu/z8000/z8000ops.hxx
+++ b/src/devices/cpu/z8000/z8000ops.hxx
@@ -771,11 +771,11 @@ uint64_t z8002_device::DIVL(uint64_t dest, uint32_t value)
remainder = dest % value;
if (qsign) result = -result;
if (rsign) remainder = -remainder;
- if ((int64_t)result < -0x80000000 || (int64_t)result > 0x7fffffff)
+ if ((int64_t)result < -0x80000000LL || (int64_t)result > 0x7fffffff)
{
int64_t temp = (int64_t)result >> 1;
SET_V;
- if (temp >= -0x80000000 && temp <= 0x7fffffff)
+ if (temp >= -0x80000000LL && temp <= 0x7fffffff)
{
result = (temp < 0) ? -1 : 0;
CHK_XXXL_ZS;
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 221aa138627..d0a7ab1f54b 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -847,7 +847,7 @@ netlist_mame_int_input_device::netlist_mame_int_input_device(const machine_confi
void netlist_mame_int_input_device::set_params(const char *param_name, const uint32_t mask, const uint32_t shift)
{
- if (LOG_DEV_CALLS) logerror("set_params\n");
+ LOGDEVCALLS("set_params\n");
m_param_name = param_name;
m_shift = shift;
m_mask = mask;
@@ -890,7 +890,7 @@ netlist_mame_logic_input_device::netlist_mame_logic_input_device(const machine_c
void netlist_mame_logic_input_device::set_params(const char *param_name, const uint32_t shift)
{
- if (LOG_DEV_CALLS) logerror("set_params\n");
+ LOGDEVCALLS("set_params\n");
m_param_name = param_name;
m_shift = shift;
}
@@ -942,7 +942,7 @@ netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_c
void netlist_mame_ram_pointer_device::set_params(const char *param_name)
{
- if (LOG_DEV_CALLS) logerror("set_params\n");
+ LOGDEVCALLS("set_params\n");
m_param_name = param_name;
}
diff --git a/src/mame/drivers/cloud9.cpp b/src/mame/drivers/cloud9.cpp
index 7d6cd992daf..8b616e002e9 100644
--- a/src/mame/drivers/cloud9.cpp
+++ b/src/mame/drivers/cloud9.cpp
@@ -413,7 +413,7 @@ void cloud9_state::cloud9(machine_config &config)
PALETTE(config, m_palette).set_entries(64);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_refresh_hz((float)PIXEL_CLOCK / (float)VTOTAL / (float)HTOTAL);
+ m_screen->set_refresh_hz((double)PIXEL_CLOCK / (double)VTOTAL / (double)HTOTAL);
m_screen->set_size(HTOTAL, VTOTAL);
m_screen->set_vblank_time(0); /* VBLANK is handled manually */
m_screen->set_visarea(0, 255, 0, 231);
diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp
index 8c2d85276c3..c46c3cf3820 100644
--- a/src/mame/drivers/mastboy.cpp
+++ b/src/mame/drivers/mastboy.cpp
@@ -822,7 +822,7 @@ void mastboy_state::mastboy(machine_config &config)
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(6000000.0f / 384.0f / 282.0f);
+ screen.set_refresh_hz(6000000.0 / 384.0 / 282.0);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(256, 256);
screen.set_visarea(0, 256-1, 16, 256-16-1);
diff --git a/src/mame/drivers/spec128.cpp b/src/mame/drivers/spec128.cpp
index 79db8d0b487..a31014f9673 100644
--- a/src/mame/drivers/spec128.cpp
+++ b/src/mame/drivers/spec128.cpp
@@ -328,7 +328,7 @@ void spectrum_state::spectrum_128(machine_config &config)
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, spectrum_128 )
/* video hardware */
- m_screen->set_raw(X1_128_SINCLAIR / 2.5f, 456, 0, 352, 311, 0, 296);
+ m_screen->set_raw(X1_128_SINCLAIR / 2.5, 456, 0, 352, 311, 0, 296);
MCFG_VIDEO_START_OVERRIDE(spectrum_state, spectrum_128 )
subdevice<gfxdecode_device>("gfxdecode")->set_info(spec128);
diff --git a/src/mame/machine/nes_vt_soc.cpp b/src/mame/machine/nes_vt_soc.cpp
index b6edaa70cd7..3ee664dbd08 100644
--- a/src/mame/machine/nes_vt_soc.cpp
+++ b/src/mame/machine/nes_vt_soc.cpp
@@ -985,12 +985,13 @@ void nes_vt_soc_device::do_dma(uint8_t data, bool has_ntsc_bug)
length -= 1;
src_addr += 1;
}
- else if ((dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F01) && !(m_ppu->get_201x_reg(0x1) & 0x80))
- {
- // Legacy mode for DGUN-2573 compat
- m_ppu->set_vram_dest(0x3F00);
- m_ppu->set_palette_mode(PAL_MODE_VT0x);
- }
+ //TODO (always false)
+ //else if ((dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F01) && !(m_ppu->get_201x_reg(0x1) & 0x80))
+ //{
+ // // Legacy mode for DGUN-2573 compat
+ // m_ppu->set_vram_dest(0x3F00);
+ // m_ppu->set_palette_mode(PAL_MODE_VT0x);
+ //}
for (int i = 0; i < length; i++)
{