summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-01-16 22:59:53 -0500
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2020-01-16 22:59:53 -0500
commit0c30ac41e64170bea00c270ab889aadea3361800 (patch) (github)
tree349fe53f8eb6a2bbe321c4862a54060c6a925ba1
parente7ebcb5dbfeb167b8b769ed71c380f89be52c33f (diff)
downloadmame-0c30ac41e64170bea00c270ab889aadea3361800.tar.bz2
mame-0c30ac41e64170bea00c270ab889aadea3361800.zip
we32100: Type specifiers cannot be stacked (nw)
-rw-r--r--src/devices/cpu/we32000/we32100d.cpp22
-rw-r--r--src/devices/cpu/we32000/we32100d.h2
2 files changed, 10 insertions, 14 deletions
diff --git a/src/devices/cpu/we32000/we32100d.cpp b/src/devices/cpu/we32000/we32100d.cpp
index 955cbbd63d9..c90528c6fc0 100644
--- a/src/devices/cpu/we32000/we32100d.cpp
+++ b/src/devices/cpu/we32000/we32100d.cpp
@@ -57,7 +57,7 @@ void we32100_disassembler::format_signed(std::ostream &stream, s32 x)
util::stream_format(stream, "-0x%x", u32(-x));
}
-void we32100_disassembler::dasm_am(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes, u8 n, bool dst)
+void we32100_disassembler::dasm_am(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes, u8 n, bool dst, bool spectype)
{
switch (n & 0xf0)
{
@@ -183,6 +183,8 @@ void we32100_disassembler::dasm_am(std::ostream &stream, offs_t &pc, const we321
util::stream_format(stream, "*$0x%08x", swapendian_int32(opcodes.r32(pc)));
pc += 4;
}
+ else if (spectype)
+ util::stream_format(stream, "invalid(0x%02x)", n);
else if (BIT(n, 3) || (n & 0x03) == 0x01)
util::stream_format(stream, "reserved(0x%02x)", n);
else
@@ -195,7 +197,7 @@ void we32100_disassembler::dasm_am(std::ostream &stream, offs_t &pc, const we321
else
util::stream_format(stream, "{%cbyte}", BIT(n, 2) ? 's' : 'u');
u8 m = opcodes.r8(pc++);
- dasm_am(stream, pc, opcodes, m, dst);
+ dasm_am(stream, pc, opcodes, m, dst, true);
}
break;
}
@@ -204,31 +206,25 @@ void we32100_disassembler::dasm_am(std::ostream &stream, offs_t &pc, const we321
void we32100_disassembler::dasm_src(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes)
{
u8 n = opcodes.r8(pc++);
- dasm_am(stream, pc, opcodes, n, false);
+ dasm_am(stream, pc, opcodes, n, false, false);
}
void we32100_disassembler::dasm_srcw(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes)
{
u8 n = opcodes.r8(pc++);
- if (n < 0xe0 || n >= 0xef)
- dasm_am(stream, pc, opcodes, n, false);
- else
- util::stream_format(stream, "invalid(0x%02x)", n);
+ dasm_am(stream, pc, opcodes, n, false, true);
}
void we32100_disassembler::dasm_dst(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes)
{
u8 n = opcodes.r8(pc++);
- dasm_am(stream, pc, opcodes, n, true);
+ dasm_am(stream, pc, opcodes, n, true, false);
}
void we32100_disassembler::dasm_dstw(std::ostream &stream, offs_t &pc, const we32100_disassembler::data_buffer &opcodes)
{
u8 n = opcodes.r8(pc++);
- if (n < 0xe0 || n == 0xef)
- dasm_am(stream, pc, opcodes, n, true);
- else
- util::stream_format(stream, "invalid(0x%02x)", n);
+ dasm_am(stream, pc, opcodes, n, true, true);
}
void we32100_disassembler::dasm_ea(std::ostream &stream, offs_t &pc, offs_t ppc, const we32100_disassembler::data_buffer &opcodes)
@@ -259,7 +255,7 @@ void we32100_disassembler::dasm_ea(std::ostream &stream, offs_t &pc, offs_t ppc,
util::stream_format(stream, "(%%%s) <%x>", s_rnames[15], u32(ppc + disp));
}
else
- dasm_am(stream, pc, opcodes, n, false);
+ dasm_am(stream, pc, opcodes, n, false, true);
}
else
util::stream_format(stream, "invalid(0x%02x)", n);
diff --git a/src/devices/cpu/we32000/we32100d.h b/src/devices/cpu/we32000/we32100d.h
index efc820675b9..afe653d518d 100644
--- a/src/devices/cpu/we32000/we32100d.h
+++ b/src/devices/cpu/we32000/we32100d.h
@@ -22,7 +22,7 @@ private:
// internal helpers
void format_signed(std::ostream &stream, s32 x);
- void dasm_am(std::ostream &stream, offs_t &pc, const data_buffer &opcodes, u8 n, bool dst);
+ void dasm_am(std::ostream &stream, offs_t &pc, const data_buffer &opcodes, u8 n, bool dst, bool spectype);
void dasm_src(std::ostream &stream, offs_t &pc, const data_buffer &opcodes);
void dasm_srcw(std::ostream &stream, offs_t &pc, const data_buffer &opcodes);
void dasm_dst(std::ostream &stream, offs_t &pc, const data_buffer &opcodes);