summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ville Linde <villedevs@gmail.com>2016-05-29 17:44:41 +0300
committer Ville Linde <villedevs@gmail.com>2016-05-29 17:48:54 +0300
commit6cfc1ac0fceab578ecddf29c99cbab77410c2abc (patch)
tree576708434b1f6df2e6fa1e701ced9236aec1ed78
parent7b2e3a2696188120e8724aba9a0f91601fe912c3 (diff)
cleanup (nw)
-rw-r--r--src/devices/cpu/sharc/sharcdrc.cpp5
-rw-r--r--src/devices/cpu/sharc/sharcfe.cpp51
-rw-r--r--src/devices/cpu/sharc/sharcmem.hxx5
3 files changed, 2 insertions, 59 deletions
diff --git a/src/devices/cpu/sharc/sharcdrc.cpp b/src/devices/cpu/sharc/sharcdrc.cpp
index 9fc09c87bb0..72fd6ca8749 100644
--- a/src/devices/cpu/sharc/sharcdrc.cpp
+++ b/src/devices/cpu/sharc/sharcdrc.cpp
@@ -2189,7 +2189,6 @@ int adsp21062_device::generate_opcode(drcuml_block *block, compiler_state *compi
case 0x04: // compute / modify |000|00100|
{
int cond = (opcode >> 33) & 0x1f;
-// int compute = opcode & 0x7fffff;
int g = (opcode >> 38) & 0x1;
int m = (opcode >> 27) & 0x7;
int i = (opcode >> 30) & 0x7;
@@ -2292,7 +2291,6 @@ int adsp21062_device::generate_opcode(drcuml_block *block, compiler_state *compi
int pmi = (opcode >> 30) & 0x7;
int pmm = (opcode >> 27) & 0x7;
int cond = (opcode >> 33) & 0x1f;
-// int compute = opcode & 0x7fffff;
if (e)
{
@@ -2354,7 +2352,6 @@ int adsp21062_device::generate_opcode(drcuml_block *block, compiler_state *compi
int j = (opcode >> 26) & 0x1;
int e = (opcode >> 25) & 0x1;
int cond = (opcode >> 33) & 0x1f;
-// int compute = opcode & 0x7fffff;
if (e)
{
@@ -2410,7 +2407,6 @@ int adsp21062_device::generate_opcode(drcuml_block *block, compiler_state *compi
int j = (opcode >> 26) & 0x1;
int e = (opcode >> 25) & 0x1;
//int lr = (opcode >> 24) & 0x1;
-// int compute = opcode & 0x7fffff;
// TODO: loop re-entry
@@ -2455,7 +2451,6 @@ int adsp21062_device::generate_opcode(drcuml_block *block, compiler_state *compi
int cond = (opcode >> 33) & 0x1f;
int j = (opcode >> 26) & 0x1;
int e = (opcode >> 25) & 0x1;
-// int compute = opcode & 0x7fffff;
code_label skip_pop = compiler->labelnum++;
diff --git a/src/devices/cpu/sharc/sharcfe.cpp b/src/devices/cpu/sharc/sharcfe.cpp
index 37e361a70c8..249df349c60 100644
--- a/src/devices/cpu/sharc/sharcfe.cpp
+++ b/src/devices/cpu/sharc/sharcfe.cpp
@@ -13,9 +13,6 @@
#define REG_USED(desc,x) do { (desc).regin[0] |= 1 << (x); } while(0)
#define REG_MODIFIED(desc,x) do { (desc).regout[0] |= 1 << (x); } while(0)
-//#define ASTAT_USED(desc) do { (desc).regin[0] |= 1 << 16; } while(0)
-//#define ASTAT_MODIFIED(desc) do { (desc).regout[0] |= 1 << 16; } while(0)
-
#define AZ_USED(desc) do { (desc).regin[0] |= 1 << 16; } while(0)
#define AZ_MODIFIED(desc) do { (desc).regout[0] |= 1 << 16; } while(0)
#define AV_USED(desc) do { (desc).regin[0] |= 1 << 17; } while(0)
@@ -104,7 +101,7 @@ void sharc_frontend::add_loop_entry(UINT32 pc, UINT8 type, UINT32 start_pc, UINT
map[l1].looptype != looptype ||
map[l1].condition != condition)
{
- fatalerror("sharc_frontend::add_loop_entry: existing entry does match: start_pc %08X/%08X, looptype %02X/%02X, cond %02X/%02X", start_pc, map[l1].start_pc, looptype, map[l1].looptype, condition, map[l1].condition);
+ fatalerror("sharc_frontend::add_loop_entry: existing entry does not match: start_pc %08X/%08X, looptype %02X/%02X, cond %02X/%02X", start_pc, map[l1].start_pc, looptype, map[l1].looptype, condition, map[l1].condition);
}
}
@@ -172,58 +169,12 @@ bool sharc_frontend::is_astat_delay_check(UINT32 pc)
bool sharc_frontend::describe(opcode_desc &desc, const opcode_desc *prev)
{
- //UINT64 opcode = desc.opptr.q[0] = m_sharc.m_direct->read_qword(desc.physpc, 0);
UINT64 opcode = desc.opptr.q[0] = m_sharc->pm_read48(desc.physpc);
desc.length = 1;
desc.cycles = 1;
// handle looping
- /*
- if (m_loop.size() > 0)
- {
- for (int i = 0; i < m_loop.size(); i++)
- {
- LOOP_DESCRIPTOR &loop = m_loop.at(i);
- if (loop.start_pc == desc.pc)
- {
- desc.flags |= OPFLAG_IS_BRANCH_TARGET;
- }
- if (loop.astat_check_pc == desc.pc)
- {
- if (loop.type == LOOP_TYPE_CONDITIONAL)
- {
- UINT32 flags = m_sharc->do_condition_astat_bits(loop.condition);
- if (flags & adsp21062_device::ASTAT_FLAGS::AZ) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_AZ;
- if (flags & adsp21062_device::ASTAT_FLAGS::AN) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_AN;
- if (flags & adsp21062_device::ASTAT_FLAGS::AV) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_AV;
- if (flags & adsp21062_device::ASTAT_FLAGS::AC) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_AC;
- if (flags & adsp21062_device::ASTAT_FLAGS::MN) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_MN;
- if (flags & adsp21062_device::ASTAT_FLAGS::MV) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_MV;
- if (flags & adsp21062_device::ASTAT_FLAGS::SV) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_SV;
- if (flags & adsp21062_device::ASTAT_FLAGS::SZ) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_SZ;
- if (flags & adsp21062_device::ASTAT_FLAGS::BTF) desc.userflags |= OP_USERFLAG_ASTAT_DELAY_COPY_BTF;
- }
- }
- if (loop.end_pc == desc.pc)
- {
- desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH;
- desc.targetpc = loop.start_pc;
- if (loop.type == LOOP_TYPE_COUNTER)
- {
- desc.userflags |= OP_USERFLAG_COUNTER_LOOP;
- }
- else if (loop.type == LOOP_TYPE_CONDITIONAL)
- {
- desc.userflags |= OP_USERFLAG_COND_LOOP;
- desc.userflags |= (loop.condition << 2) & OP_USERFLAG_COND_FIELD;
- }
- m_loop.erase(m_loop.begin()+i);
- break;
- }
- }
- }*/
-
if (is_astat_delay_check(desc.pc))
{
LOOP_ENTRY* map = m_loopmap.get();
diff --git a/src/devices/cpu/sharc/sharcmem.hxx b/src/devices/cpu/sharc/sharcmem.hxx
index f48c1ba3608..3b5ed63884d 100644
--- a/src/devices/cpu/sharc/sharcmem.hxx
+++ b/src/devices/cpu/sharc/sharcmem.hxx
@@ -26,7 +26,6 @@ UINT32 adsp21062_device::pm_read32(UINT32 address)
void adsp21062_device::pm_write32(UINT32 address, UINT32 data)
{
-// printf("PM Write32 %08X, %08X at %08X\n", data, address, m_core->pc);
if (address >= 0x20000 && address < 0x28000)
{
UINT32 addr = (address & 0x7fff) * 3;
@@ -45,8 +44,7 @@ void adsp21062_device::pm_write32(UINT32 address, UINT32 data)
return;
}
else {
- debugger_break(machine());
- //fatalerror("SHARC: PM Bus Write32 %08X, %08X at %08X\n", address, data, m_core->pc);
+ fatalerror("SHARC: PM Bus Write32 %08X, %08X at %08X\n", address, data, m_core->pc);
}
}
@@ -78,7 +76,6 @@ UINT64 adsp21062_device::pm_read48(UINT32 address)
void adsp21062_device::pm_write48(UINT32 address, UINT64 data)
{
-// printf("PM Write48 %08X%08X, %08X at %08X\n", (UINT32)(data >> 32), (UINT32)(data), address, m_core->pc);
if ((address >= 0x20000 && address < 0x28000))
{
UINT32 addr = (address & 0x7fff) * 3;