fix building with Visual Studio 2017 & clang 5.0.0 (also tested with gcc 7.2.0) (nw)

This commit is contained in:
smf- 2017-11-28 09:09:43 +00:00
parent b247832947
commit c2e7f912c1
14 changed files with 26 additions and 19 deletions

View File

@ -7,6 +7,7 @@
*
***************************************************************************/
#include "emu.h"
#include "es5510d.h"
u32 es5510_disassembler::opcode_alignment() const

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "deco16d.h"
#include "cpu/m6502/deco16d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m4510d.h"
#include "cpu/m6502/m4510d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m6502d.h"
#include "cpu/m6502/m6502d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m6509d.h"
#include "cpu/m6502/m6509d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m6510d.h"
#include "cpu/m6502/m6510d.hxx"

View File

@ -9,6 +9,7 @@
***************************************************************************/
#include "emu.h"
#include "m65c02d.h"
#include "cpu/m6502/m65c02d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m65ce02d.h"
#include "cpu/m6502/m65ce02d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "m740d.h"
#include "cpu/m6502/m740d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "n2a03d.h"
#include "cpu/m6502/n2a03d.hxx"

View File

@ -8,6 +8,7 @@
***************************************************************************/
#include "emu.h"
#include "r65c02d.h"
#include "cpu/m6502/r65c02d.hxx"

View File

@ -724,17 +724,18 @@ offs_t z8000_disassembler::disassemble(std::ostream &stream, offs_t pc, const da
src++;
i = *src++ - '0';
if (m_config->get_segmented_mode()) {
uint32_t address;
if (w[i] & 0x8000) {
old_w = w[i];
for (j = i; j < o.size; j++)
w[j] = w[j + 1];
get_op(opcodes, o.size - 1, new_pc, w, b, n);
w[i] = ((old_w & 0x7f00) << 16) | (w[i] & 0xffff);
address = ((old_w & 0x7f00) << 16) | (w[i] & 0xffff);
}
else {
w[i] = ((w[i] & 0x7f00) << 16) | (w[i] & 0xff);
address = ((w[i] & 0x7f00) << 16) | (w[i] & 0xff);
}
util::stream_format(stream, "<%%%02X>%%%04X", (w[i] >> 24) & 0xff, w[i] & 0xffff);
util::stream_format(stream, "<%%%02X>%%%04X", (address >> 24) & 0xff, address & 0xffff);
}
else util::stream_format(stream, "%%%04x", w[i]);
break;

View File

@ -68,10 +68,6 @@ private:
return reinterpret_cast<T *>(&m_buffer[0]) + ((lpc - m_lstart) & m_pc_mask);
}
template<typename T> const T *get_ptr(offs_t lpc) const {
return reinterpret_cast<const T *>(&m_buffer[0]) + ((lpc - m_lstart) & m_pc_mask);
}
template<typename T> T get(offs_t lpc) const {
return reinterpret_cast<const T *>(&m_buffer[0])[(lpc - m_lstart) & m_pc_mask];
}

View File

@ -710,7 +710,7 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -1:
lr8 = [this](offs_t pc) -> u8 { abort(); };
lr8 = [](offs_t pc) -> u8 { abort(); };
lr16 = [this](offs_t pc) -> u16 {
const u16 *p = get_ptr<u16>(pc);
return p ?
@ -758,8 +758,8 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -2:
lr8 = [this](offs_t pc) -> u8 { abort(); };
lr16 = [this](offs_t pc) -> u16 { abort(); };
lr8 = [](offs_t pc) -> u8 { abort(); };
lr16 = [](offs_t pc) -> u16 { abort(); };
lr32 = [this](offs_t pc) -> u16 {
const u32 *p = get_ptr<u32>(pc);
return p ?
@ -789,9 +789,9 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case -3:
lr8 = [this](offs_t pc) -> u8 { abort(); };
lr16 = [this](offs_t pc) -> u16 { abort(); };
lr32 = [this](offs_t pc) -> u32 { abort(); };
lr8 = [](offs_t pc) -> u8 { abort(); };
lr16 = [](offs_t pc) -> u16 { abort(); };
lr32 = [](offs_t pc) -> u32 { abort(); };
lr64 = [this](offs_t pc) -> u64 {
const u64 *p = get_ptr<u64>(pc);
return p ?
@ -801,10 +801,9 @@ unidasm_data_buffer::unidasm_data_buffer(util::disasm_interface *_disasm, const
break;
case 3:
assert(entry->endian == );
lr8 = [this](offs_t pc) -> u8 { abort(); };
lr32 = [this](offs_t pc) -> u32 { abort(); };
lr64 = [this](offs_t pc) -> u64 { abort(); };
lr8 = [](offs_t pc) -> u8 { abort(); };
lr32 = [](offs_t pc) -> u32 { abort(); };
lr64 = [](offs_t pc) -> u64 { abort(); };
lr16 = [this](offs_t pc) -> u16 {
if(pc < base_pc)
return 0x0000;
@ -1028,7 +1027,7 @@ int main(int argc, char *argv[])
lpce &= pc_mask;
return dis->pc_linear_to_real(lpce);
};
next_pc_wrap = [pc_mask, page_mask, dis = disasm.get()](offs_t pc, offs_t size) {
next_pc_wrap = [page_mask, dis = disasm.get()](offs_t pc, offs_t size) {
offs_t lpc = dis->pc_real_to_linear(pc);
offs_t lpce = (lpc & ~page_mask) | ((lpc + size) & page_mask);
return dis->pc_linear_to_real(lpce);
@ -1042,7 +1041,7 @@ int main(int argc, char *argv[])
pce &= pc_mask;
return pce;
};
next_pc_wrap = [pc_mask, page_mask](offs_t pc, offs_t size) {
next_pc_wrap = [page_mask](offs_t pc, offs_t size) {
offs_t pce = (pc & ~page_mask) | ((pc + size) & page_mask);
return pce;
};