mirror of
https://github.com/holub/mame
synced 2025-06-16 01:09:09 +03:00
appease vs2019_clang with llvm 10.0
This commit is contained in:
parent
2dec1d2ef0
commit
ad819a3243
@ -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",
|
||||
@ -984,6 +989,12 @@ if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.fi
|
||||
buildoptions_c {
|
||||
"-Wno-incompatible-pointer-types-discards-qualifiers",
|
||||
}
|
||||
end
|
||||
configuration { "vs*" }
|
||||
if _OPTIONS["vs"]=="clangcl" then
|
||||
buildoptions {
|
||||
"-Wno-implicit-int-float-conversion",
|
||||
}
|
||||
end
|
||||
configuration { "winstore*" }
|
||||
defines {
|
||||
@ -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",
|
||||
}
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)];
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user