cherry-pick more boilerplate, also missing emu.h inclusions (nw)

This commit is contained in:
Vas Crabb 2018-03-22 19:54:39 +11:00
parent 53b83781b4
commit d4b59a7994
3 changed files with 33 additions and 1 deletions

View File

@ -6,6 +6,7 @@
***************************************************************************/
#include "emu.h"
#include "dsp16core.h"

View File

@ -17,6 +17,8 @@
calculate them on-demand rather than preemptively.
* The same code will rarely be run with different AUC modes, so it's
cheaper to make assumptions and recompile if they break.
* The SIO and PIO modes are rarely changed, so we can invalidate the
entire cache when this happens.
There are some more complex optimisations that give good gains:
* Multiplication is free with F1, so code will sometimes multiply
@ -26,7 +28,9 @@
***************************************************************************/
#include "emu.h"
#include "dsp16rc.h"
#include "dsp16core.h"
#include "cpu/drcumlsh.h"
@ -41,8 +45,34 @@ dsp16_device_base::recompiler::recompiler(dsp16_device_base &host, u32 flags)
, m_frontend(host, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, COMPILE_MAX_SEQUENCE)
, m_uml(host, host.m_drc_cache, flags, 2, 16, 0)
{
m_uml.symbol_add(&m_core.xaau_pc, sizeof(m_core.xaau_pc), "pc");
m_uml.symbol_add(&m_core.xaau_pt, sizeof(m_core.xaau_pt), "pt");
m_uml.symbol_add(&m_core.xaau_pr, sizeof(m_core.xaau_pr), "pr");
m_uml.symbol_add(&m_core.xaau_pi, sizeof(m_core.xaau_pi), "pi");
m_uml.symbol_add(&m_core.xaau_i, sizeof(m_core.xaau_i), "i");
m_uml.symbol_add(&m_core.yaau_r[0], sizeof(m_core.yaau_r[0]), "r0");
m_uml.symbol_add(&m_core.yaau_r[1], sizeof(m_core.yaau_r[1]), "r1");
m_uml.symbol_add(&m_core.yaau_r[2], sizeof(m_core.yaau_r[2]), "r2");
m_uml.symbol_add(&m_core.yaau_r[3], sizeof(m_core.yaau_r[3]), "r3");
m_uml.symbol_add(&m_core.yaau_rb, sizeof(m_core.yaau_rb), "rb");
m_uml.symbol_add(&m_core.yaau_re, sizeof(m_core.yaau_re), "re");
m_uml.symbol_add(&m_core.yaau_j, sizeof(m_core.yaau_j), "j");
m_uml.symbol_add(&m_core.yaau_k, sizeof(m_core.yaau_k), "k");
m_uml.symbol_add(&m_core.dau_x, sizeof(m_core.dau_x), "x");
m_uml.symbol_add(&m_core.dau_y, sizeof(m_core.dau_y), "y");
m_uml.symbol_add(&m_core.dau_p, sizeof(m_core.dau_p), "p");
m_uml.symbol_add(&m_core.dau_a[0], sizeof(m_core.dau_a[0]), "a0");
m_uml.symbol_add(&m_core.dau_a[1], sizeof(m_core.dau_a[1]), "a1");
m_uml.symbol_add(&m_core.dau_c[0], sizeof(m_core.dau_c[0]), "c0");
m_uml.symbol_add(&m_core.dau_c[1], sizeof(m_core.dau_c[1]), "c1");
m_uml.symbol_add(&m_core.dau_c[2], sizeof(m_core.dau_c[2]), "c2");
m_uml.symbol_add(&m_core.dau_auc, sizeof(m_core.dau_auc), "auc");
m_uml.symbol_add(&m_core.dau_psw, sizeof(m_core.dau_psw), "psw");
m_uml.symbol_add(&m_core.dau_temp, sizeof(m_core.dau_temp), "temp");
(void)m_host;
(void)m_core;
}
dsp16_device_base::recompiler::~recompiler()

View File

@ -33,6 +33,7 @@ private:
COMPILE_MAX_SEQUENCE = 64
};
// exit codes for recompiled blocks
enum : int
{
EXEC_OUT_OF_CYCLES,