Skip to content

Commit

Permalink
sharcdrc: fix Linux crash (nw)
Browse files Browse the repository at this point in the history
  • Loading branch information
villedevs committed Jun 29, 2016
1 parent 89a3bb1 commit d0cff39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/devices/cpu/sharc/sharc.cpp
Expand Up @@ -444,7 +444,7 @@ void adsp21062_device::device_start()
m_regmap[3] = uml::I7;
}

m_cache_dirty = true;
m_core->cache_dirty = 1;


m_core->delayed_iop_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(adsp21062_device::sharc_iop_delayed_write_callback), this));
Expand Down
3 changes: 1 addition & 2 deletions src/devices/cpu/sharc/sharc.h
Expand Up @@ -412,6 +412,7 @@ class adsp21062_device : public cpu_device
float fp1;

UINT32 force_recompile;
UINT32 cache_dirty;
};

sharc_internal_state* m_core;
Expand Down Expand Up @@ -447,8 +448,6 @@ class adsp21062_device : public cpu_device
uml::code_handle *m_swap_r0_7;
uml::code_handle *m_swap_r8_15;

bool m_cache_dirty;

UINT16 *m_internal_ram_block0, *m_internal_ram_block1;

address_space *m_program;
Expand Down
6 changes: 3 additions & 3 deletions src/devices/cpu/sharc/sharcdrc.cpp
Expand Up @@ -1099,10 +1099,10 @@ void adsp21062_device::execute_run_drc()
// printf("SHARC cache reset\n");

/* reset the cache if dirty */
if (m_cache_dirty)
if (m_core->cache_dirty)
flush_cache();

m_cache_dirty = false;
m_core->cache_dirty = 0;
m_core->force_recompile = 0;

/* execute */
Expand Down Expand Up @@ -1196,7 +1196,7 @@ void adsp21062_device::compile_block(offs_t pc)
// force recompilation at end of block, if needed
UML_CMP(block, mem(&m_core->force_recompile), 0);
UML_JMPc(block, COND_Z, compiler.labelnum);
UML_MOV(block, mem(&m_cache_dirty), 1);
UML_MOV(block, mem(&m_core->cache_dirty), 1);
UML_MOV(block, mem(&m_core->icount), 0);
UML_LABEL(block, compiler.labelnum++);

Expand Down

0 comments on commit d0cff39

Please sign in to comment.