Index: sid/component/cgen-cpu/xstormy16/xstormy16-decode.h =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/xstormy16-decode.h,v retrieving revision 1.3 diff -c -p -r1.3 xstormy16-decode.h *** sid/component/cgen-cpu/xstormy16/xstormy16-decode.h 21 Mar 2003 06:16:29 -0000 1.3 --- sid/component/cgen-cpu/xstormy16/xstormy16-decode.h 31 Mar 2003 19:42:04 -0000 *************** *** 2,8 **** THIS FILE IS MACHINE GENERATED WITH CGEN. ! Copyright (C) 2000, 2001, 2002 Red Hat, Inc. This file is part of the Red Hat simulators. --- 2,8 ---- THIS FILE IS MACHINE GENERATED WITH CGEN. ! Copyright (C) 2000, 2001, 2002, 2003 Red Hat, Inc. This file is part of the Red Hat simulators. *************** struct xstormy16_scache { *** 208,213 **** --- 208,218 ---- // argument buffer xstormy16_sem_fields fields; + + // writeback flags + // Only used if profiling or parallel execution support enabled during + // file generation. + unsigned long long written; // decode given instruction Index: sid/component/cgen-cpu/xstormy16/xstormy16-sem.cxx =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/xstormy16-sem.cxx,v retrieving revision 1.5 diff -c -p -r1.5 xstormy16-sem.cxx *** sid/component/cgen-cpu/xstormy16/xstormy16-sem.cxx 21 Mar 2003 06:16:29 -0000 1.5 --- sid/component/cgen-cpu/xstormy16/xstormy16-sem.cxx 31 Mar 2003 19:42:06 -0000 *************** *** 2,8 **** THIS FILE IS MACHINE GENERATED WITH CGEN. ! Copyright (C) 2000, 2001, 2002 Red Hat, Inc. This file is part of the Red Hat simulators. --- 2,8 ---- THIS FILE IS MACHINE GENERATED WITH CGEN. ! Copyright (C) 2000, 2001, 2002, 2003 Red Hat, Inc. This file is part of the Red Hat simulators. *************** xstormy16_sem_x_invalid (xstormy16_cpu* *** 25,30 **** --- 25,31 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 0; *************** xstormy16_sem_movlmemimm (xstormy16_cpu* *** 47,52 **** --- 48,54 ---- #define FLD(f) abuf->fields.sfmt_movlmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 57,68 **** --- 59,72 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { HI opval = tmp_nvalue; current_cpu->SETMEMHI (pc, ANDSI (FLD (f_lmem8), 65534), opval); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (FLD (f_lmem8), 65534) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 74,91 **** --- 78,98 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { QI opval = tmp_nvalue; current_cpu->SETMEMQI (pc, FLD (f_lmem8), opval); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) FLD (f_lmem8) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movhmemimm (xstormy16_cpu* *** 99,104 **** --- 106,112 ---- #define FLD(f) abuf->fields.sfmt_movhmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 109,120 **** --- 117,130 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { HI opval = tmp_nvalue; current_cpu->SETMEMHI (pc, ANDSI (FLD (f_hmem8), 65534), opval); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (FLD (f_hmem8), 65534) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 126,143 **** --- 136,156 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { QI opval = tmp_nvalue; current_cpu->SETMEMQI (pc, FLD (f_hmem8), opval); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) FLD (f_hmem8) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movlgrmem (xstormy16_cpu* *** 151,156 **** --- 164,170 ---- #define FLD(f) abuf->fields.sfmt_movlgrmem.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 161,172 **** --- 175,188 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 178,195 **** --- 194,214 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movhgrmem (xstormy16_cpu* *** 203,208 **** --- 222,228 ---- #define FLD(f) abuf->fields.sfmt_movhgrmem.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 213,224 **** --- 233,246 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 230,247 **** --- 252,272 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movlmemgr (xstormy16_cpu* *** 255,260 **** --- 280,286 ---- #define FLD(f) abuf->fields.sfmt_movlgrmem.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 265,276 **** --- 291,304 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { HI opval = tmp_nvalue; current_cpu->SETMEMHI (pc, ANDSI (FLD (f_lmem8), 65534), opval); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (FLD (f_lmem8), 65534) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 282,299 **** --- 310,330 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { QI opval = tmp_nvalue; current_cpu->SETMEMQI (pc, FLD (f_lmem8), opval); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) FLD (f_lmem8) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movhmemgr (xstormy16_cpu* *** 307,312 **** --- 338,344 ---- #define FLD(f) abuf->fields.sfmt_movlgrmem.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 317,328 **** --- 349,362 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { HI opval = tmp_nvalue; current_cpu->SETMEMHI (pc, ANDSI (FLD (f_lmem8), 65534), opval); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (FLD (f_lmem8), 65534) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 334,351 **** --- 368,388 ---- { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 65436), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6)))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } { QI opval = tmp_nvalue; current_cpu->SETMEMQI (pc, FLD (f_lmem8), opval); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) FLD (f_lmem8) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgri (xstormy16_cpu* c *** 359,364 **** --- 396,402 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 369,380 **** --- 407,420 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 386,403 **** --- 426,446 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgripostinc (xstormy16 *** 411,416 **** --- 454,460 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 422,433 **** --- 466,479 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 439,450 **** --- 485,498 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 458,463 **** --- 506,512 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgripredec (xstormy16_ *** 471,476 **** --- 520,526 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 488,499 **** --- 538,551 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 505,516 **** --- 557,570 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 518,523 **** --- 572,578 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrigr (xstormy16_cpu* c *** 531,536 **** --- 586,592 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 551,556 **** --- 607,613 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 559,564 **** --- 616,622 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, current_cpu->h_gr_get (FLD (f_Rs)), opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) current_cpu->h_gr_get (FLD (f_Rs)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 575,580 **** --- 633,639 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgripostincgr (xstormy16 *** 588,593 **** --- 647,653 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 608,613 **** --- 668,674 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 616,621 **** --- 677,683 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, current_cpu->h_gr_get (FLD (f_Rs)), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) current_cpu->h_gr_get (FLD (f_Rs)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 638,643 **** --- 700,706 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgripredecgr (xstormy16_ *** 651,656 **** --- 714,720 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 687,692 **** --- 751,757 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 695,706 **** --- 760,773 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, current_cpu->h_gr_get (FLD (f_Rs)), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) current_cpu->h_gr_get (FLD (f_Rs)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgrii (xstormy16_cpu* *** 714,719 **** --- 781,787 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 724,735 **** --- 792,805 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 741,758 **** --- 811,831 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgriipostinc (xstormy1 *** 766,771 **** --- 839,845 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 777,788 **** --- 851,864 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 794,805 **** --- 870,883 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 813,818 **** --- 891,897 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgriipredec (xstormy16 *** 826,831 **** --- 905,911 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 843,854 **** --- 923,936 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 860,871 **** --- 942,955 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 873,878 **** --- 957,963 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgriigr (xstormy16_cpu* *** 886,891 **** --- 971,977 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (ANDSI (tmp_nwhere, 1)) { *** 906,911 **** --- 992,998 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 914,919 **** --- 1001,1007 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 930,935 **** --- 1018,1024 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgriipostincgr (xstormy1 *** 943,948 **** --- 1032,1038 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (ANDSI (tmp_nwhere, 1)) { *** 963,968 **** --- 1053,1059 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 971,976 **** --- 1062,1068 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 993,998 **** --- 1085,1091 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgriipredecgr (xstormy16 *** 1006,1011 **** --- 1099,1105 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (ANDSI (tmp_nwhere, 1)) { *** 1042,1047 **** --- 1136,1142 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1050,1061 **** --- 1145,1158 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movgrgr (xstormy16_cpu* cu *** 1069,1074 **** --- 1166,1172 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_movwimm8 (xstormy16_cpu* c *** 1102,1107 **** --- 1200,1206 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_movwgrimm8 (xstormy16_cpu* *** 1135,1140 **** --- 1234,1240 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_movwgrimm16 (xstormy16_cpu *** 1168,1173 **** --- 1268,1274 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_movlowgr (xstormy16_cpu* c *** 1201,1206 **** --- 1302,1308 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_movhighgr (xstormy16_cpu* *** 1234,1239 **** --- 1336,1342 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_movfgrgri (xstormy16_cpu* *** 1267,1272 **** --- 1370,1376 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 1277,1288 **** --- 1381,1394 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1294,1311 **** --- 1400,1420 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrgripostinc (xstormy1 *** 1319,1324 **** --- 1428,1434 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 1330,1341 **** --- 1440,1453 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1347,1358 **** --- 1459,1472 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1366,1371 **** --- 1480,1486 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrgripredec (xstormy16 *** 1379,1384 **** --- 1494,1500 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (FLD (f_op2m)) { *** 1396,1407 **** --- 1512,1525 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1413,1424 **** --- 1531,1544 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1426,1431 **** --- 1546,1552 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrigr (xstormy16_cpu* *** 1439,1444 **** --- 1560,1566 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 1459,1464 **** --- 1581,1587 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 6); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1467,1472 **** --- 1590,1596 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1483,1488 **** --- 1607,1613 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgripostincgr (xstormy1 *** 1496,1501 **** --- 1621,1627 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 1516,1521 **** --- 1642,1648 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1524,1529 **** --- 1651,1657 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1546,1551 **** --- 1674,1680 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgripredecgr (xstormy16 *** 1559,1564 **** --- 1688,1694 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (ANDSI (tmp_nwhere, 1)) { *** 1595,1600 **** --- 1725,1731 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, tmp_nwhere, opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) tmp_nwhere << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (ANDSI (tmp_nwhere, 1)) { *** 1603,1614 **** --- 1734,1747 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) JOINHISI (current_cpu->h_gr_get (((UINT) 8)), current_cpu->h_gr_get (FLD (f_Rs))) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrgrii (xstormy16_cpu* *** 1622,1627 **** --- 1755,1761 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1632,1643 **** --- 1766,1779 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1649,1666 **** --- 1785,1805 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrgriipostinc (xstormy *** 1674,1679 **** --- 1813,1819 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1685,1696 **** --- 1825,1838 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 11); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1702,1713 **** --- 1844,1857 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 11); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1721,1726 **** --- 1865,1871 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgrgriipredec (xstormy1 *** 1734,1739 **** --- 1879,1885 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1751,1762 **** --- 1897,1910 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 11); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1768,1779 **** --- 1916,1929 ---- { HI opval = tmp_nvalue; current_cpu->h_gr_set (FLD (f_Rdm), opval); + written |= (1ULL << 10); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << FLD (f_Rdm) << ']' << ":=0x" << hex << opval << dec << " "; } { SI opval = ORSI (ANDSI (current_cpu->h_gr_get (((UINT) 14)), 3996), ORSI (SLLSI (FLD (f_Rdm), 12), ORBI (ORBI (EQHI (ANDHI (tmp_nvalue, 255), 0), SLLHI (EQHI (tmp_nvalue, 0), 1)), ORHI (SLLHI (current_cpu->parity (tmp_nvalue), 5), SLLHI (LTQI (SRLHI (tmp_nvalue, MULSI (FLD (f_op2m), 8)), 0), 6))))); current_cpu->h_gr_set (((UINT) 14), opval); + written |= (1ULL << 11); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "gr" << '[' << ((UINT) 14) << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1781,1786 **** --- 1931,1937 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgriigr (xstormy16_cpu* *** 1794,1799 **** --- 1945,1951 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1802,1807 **** --- 1954,1960 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe), opval); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1809,1814 **** --- 1962,1968 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1825,1830 **** --- 1979,1985 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgriipostincgr (xstormy *** 1838,1843 **** --- 1993,1999 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1846,1851 **** --- 2002,2008 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1853,1858 **** --- 2010,2016 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1875,1880 **** --- 2033,2039 ---- } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_movfgriipredecgr (xstormy1 *** 1888,1893 **** --- 2047,2053 ---- #define FLD(f) abuf->fields.sfmt_movfgrgrii.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (FLD (f_op2m)) { *** 1912,1917 **** --- 2072,2078 ---- { HI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMHI (pc, ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe), opval); + written |= (1ULL << 8); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ANDSI (ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), 0xfffffffe) << dec << ']' << ":=0x" << hex << opval << dec << " "; } *************** if (FLD (f_op2m)) { *** 1919,1930 **** --- 2080,2093 ---- { QI opval = current_cpu->h_gr_get (FLD (f_Rdm)); current_cpu->SETMEMQI (pc, ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)), opval); + written |= (1ULL << 9); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "memory" << '[' << "0x" << hex << (UDI) ADDSI (JOINHISI (current_cpu->h_Rb_get (FLD (f_Rb)), current_cpu->h_gr_get (FLD (f_Rs))), FLD (f_imm12)) << dec << ']' << ":=0x" << hex << (SI) opval << dec << " "; } } } + abuf->written = written; current_cpu->done_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_maskgrgr (xstormy16_cpu* c *** 1938,1943 **** --- 2101,2107 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_maskgrimm16 (xstormy16_cpu *** 1971,1976 **** --- 2135,2141 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_pushgr (xstormy16_cpu* cur *** 2004,2009 **** --- 2169,2175 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_popgr (xstormy16_cpu* curr *** 2035,2040 **** --- 2201,2207 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_swpn (xstormy16_cpu* curre *** 2066,2071 **** --- 2233,2239 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_swpb (xstormy16_cpu* curre *** 2099,2104 **** --- 2267,2273 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_swpw (xstormy16_cpu* curre *** 2132,2137 **** --- 2301,2307 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_andgrgr (xstormy16_cpu* cu *** 2175,2180 **** --- 2345,2351 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_andimm8 (xstormy16_cpu* cu *** 2208,2213 **** --- 2379,2385 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_andgrimm16 (xstormy16_cpu* *** 2241,2246 **** --- 2413,2419 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_orgrgr (xstormy16_cpu* cur *** 2274,2279 **** --- 2447,2453 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_orimm8 (xstormy16_cpu* cur *** 2307,2312 **** --- 2481,2487 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_orgrimm16 (xstormy16_cpu* *** 2340,2345 **** --- 2515,2521 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_xorgrgr (xstormy16_cpu* cu *** 2373,2378 **** --- 2549,2555 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_xorimm8 (xstormy16_cpu* cu *** 2406,2411 **** --- 2583,2589 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_xorgrimm16 (xstormy16_cpu* *** 2439,2444 **** --- 2617,2623 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_notgr (xstormy16_cpu* curr *** 2472,2477 **** --- 2651,2657 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_addgrgr (xstormy16_cpu* cu *** 2505,2510 **** --- 2685,2691 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_addgrimm4 (xstormy16_cpu* *** 2540,2545 **** --- 2721,2727 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_addimm8 (xstormy16_cpu* cu *** 2575,2580 **** --- 2757,2763 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_addgrimm16 (xstormy16_cpu* *** 2610,2615 **** --- 2793,2799 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_adcgrgr (xstormy16_cpu* cu *** 2645,2650 **** --- 2829,2835 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_adcgrimm4 (xstormy16_cpu* *** 2680,2685 **** --- 2865,2871 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_adcimm8 (xstormy16_cpu* cu *** 2715,2720 **** --- 2901,2907 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_adcgrimm16 (xstormy16_cpu* *** 2750,2755 **** --- 2937,2943 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_subgrgr (xstormy16_cpu* cu *** 2785,2790 **** --- 2973,2979 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_subgrimm4 (xstormy16_cpu* *** 2820,2825 **** --- 3009,3015 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_subimm8 (xstormy16_cpu* cu *** 2855,2860 **** --- 3045,3051 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_subgrimm16 (xstormy16_cpu* *** 2890,2895 **** --- 3081,3087 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_sbcgrgr (xstormy16_cpu* cu *** 2925,2930 **** --- 3117,3123 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_sbcgrimm4 (xstormy16_cpu* *** 2960,2965 **** --- 3153,3159 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_sbcgrimm8 (xstormy16_cpu* *** 2995,3000 **** --- 3189,3195 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_sbcgrimm16 (xstormy16_cpu* *** 3030,3035 **** --- 3225,3231 ---- #define FLD(f) abuf->fields.sfmt_movwgrimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_incgrimm2 (xstormy16_cpu* *** 3065,3070 **** --- 3261,3267 ---- #define FLD(f) abuf->fields.sfmt_incgrimm2.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_decgrimm2 (xstormy16_cpu* *** 3098,3103 **** --- 3295,3301 ---- #define FLD(f) abuf->fields.sfmt_incgrimm2.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_rrcgrgr (xstormy16_cpu* cu *** 3131,3136 **** --- 3329,3335 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_rrcgrimm4 (xstormy16_cpu* *** 3171,3176 **** --- 3370,3376 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_rlcgrgr (xstormy16_cpu* cu *** 3211,3216 **** --- 3411,3417 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_rlcgrimm4 (xstormy16_cpu* *** 3251,3256 **** --- 3452,3458 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_shrgrgr (xstormy16_cpu* cu *** 3291,3296 **** --- 3493,3499 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_shrgrimm (xstormy16_cpu* c *** 3326,3331 **** --- 3529,3535 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_shlgrgr (xstormy16_cpu* cu *** 3361,3366 **** --- 3565,3571 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_shlgrimm (xstormy16_cpu* c *** 3396,3401 **** --- 3601,3607 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_asrgrgr (xstormy16_cpu* cu *** 3431,3436 **** --- 3637,3643 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_asrgrimm (xstormy16_cpu* c *** 3466,3471 **** --- 3673,3679 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_set1grimm (xstormy16_cpu* *** 3501,3506 **** --- 3709,3715 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_set1grgr (xstormy16_cpu* c *** 3534,3539 **** --- 3743,3749 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_set1lmemimm (xstormy16_cpu *** 3567,3572 **** --- 3777,3783 ---- #define FLD(f) abuf->fields.sfmt_set1lmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_set1hmemimm (xstormy16_cpu *** 3600,3605 **** --- 3811,3817 ---- #define FLD(f) abuf->fields.sfmt_set1hmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_clr1grimm (xstormy16_cpu* *** 3633,3638 **** --- 3845,3851 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_clr1grgr (xstormy16_cpu* c *** 3666,3671 **** --- 3879,3885 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_clr1lmemimm (xstormy16_cpu *** 3699,3704 **** --- 3913,3919 ---- #define FLD(f) abuf->fields.sfmt_set1lmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_clr1hmemimm (xstormy16_cpu *** 3732,3737 **** --- 3947,3953 ---- #define FLD(f) abuf->fields.sfmt_set1hmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_cbwgr (xstormy16_cpu* curr *** 3765,3770 **** --- 3981,3987 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_revgr (xstormy16_cpu* curr *** 3798,3803 **** --- 4015,4021 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_bccgrgr (xstormy16_cpu* cu *** 3831,3836 **** --- 4049,4055 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (tmp_tmp) { *** 3918,3923 **** --- 4137,4143 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 13); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } *************** if (tmp_tmp) { *** 3925,3930 **** --- 4145,4151 ---- } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bccgrimm8 (xstormy16_cpu* *** 3938,3943 **** --- 4159,4165 ---- #define FLD(f) abuf->fields.sfmt_bccgrimm8.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (tmp_tmp) { *** 4025,4030 **** --- 4247,4253 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 13); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } *************** if (tmp_tmp) { *** 4032,4037 **** --- 4255,4261 ---- } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bccimm16 (xstormy16_cpu* c *** 4045,4050 **** --- 4269,4275 ---- #define FLD(f) abuf->fields.sfmt_bccimm16.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (tmp_tmp) { *** 4132,4137 **** --- 4357,4363 ---- { USI opval = FLD (f_rel8_4); current_cpu->branch (opval, npc, status); + written |= (1ULL << 12); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } *************** if (tmp_tmp) { *** 4139,4144 **** --- 4365,4371 ---- } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bngrimm4 (xstormy16_cpu* c *** 4152,4157 **** --- 4379,4385 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (EQSI (ANDSI (current_cpu->h_gr_get ( *** 4166,4177 **** --- 4394,4407 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bngrgr (xstormy16_cpu* cur *** 4185,4190 **** --- 4415,4421 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (EQSI (ANDSI (current_cpu->h_gr_get ( *** 4199,4210 **** --- 4430,4443 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bnlmemimm (xstormy16_cpu* *** 4218,4223 **** --- 4451,4457 ---- #define FLD(f) abuf->fields.sfmt_bnlmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (EQQI (ANDQI (current_cpu->GETMEMQI ( *** 4225,4235 **** --- 4459,4471 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bnhmemimm (xstormy16_cpu* *** 4243,4248 **** --- 4479,4485 ---- #define FLD(f) abuf->fields.sfmt_bnhmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (EQQI (ANDQI (current_cpu->GETMEMQI ( *** 4250,4260 **** --- 4487,4499 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bpgrimm4 (xstormy16_cpu* c *** 4268,4273 **** --- 4507,4513 ---- #define FLD(f) abuf->fields.sfmt_bngrimm4.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (NESI (ANDSI (current_cpu->h_gr_get ( *** 4282,4293 **** --- 4522,4535 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bpgrgr (xstormy16_cpu* cur *** 4301,4306 **** --- 4543,4549 ---- #define FLD(f) abuf->fields.sfmt_bccgrgr.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (NESI (ANDSI (current_cpu->h_gr_get ( *** 4315,4326 **** --- 4558,4571 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 5); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bplmemimm (xstormy16_cpu* *** 4334,4339 **** --- 4579,4585 ---- #define FLD(f) abuf->fields.sfmt_bnlmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (NEQI (ANDQI (current_cpu->GETMEMQI ( *** 4341,4351 **** --- 4587,4599 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bphmemimm (xstormy16_cpu* *** 4359,4364 **** --- 4607,4613 ---- #define FLD(f) abuf->fields.sfmt_bnhmemimm.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** if (NEQI (ANDQI (current_cpu->GETMEMQI ( *** 4366,4376 **** --- 4615,4627 ---- { USI opval = FLD (f_rel12); current_cpu->branch (opval, npc, status); + written |= (1ULL << 4); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bcc (xstormy16_cpu* curren *** 4384,4389 **** --- 4635,4641 ---- #define FLD(f) abuf->fields.sfmt_bcc.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** if (tmp_tmp) { *** 4460,4471 **** --- 4712,4725 ---- { USI opval = FLD (f_rel8_2); current_cpu->branch (opval, npc, status); + written |= (1ULL << 7); if (UNLIKELY(current_cpu->trace_result_p)) current_cpu->trace_stream << "pc" << ":=0x" << hex << opval << dec << " "; } } } + abuf->written = written; current_cpu->done_cti_insn (npc, status); return status; #undef FLD *************** xstormy16_sem_bgr (xstormy16_cpu* curren *** 4479,4484 **** --- 4733,4739 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_br (xstormy16_cpu* current *** 4502,4507 **** --- 4757,4763 ---- #define FLD(f) abuf->fields.sfmt_br.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_jmp (xstormy16_cpu* curren *** 4525,4530 **** --- 4781,4787 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_jmpf (xstormy16_cpu* curre *** 4548,4553 **** --- 4805,4811 ---- #define FLD(f) abuf->fields.sfmt_jmpf.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_callrgr (xstormy16_cpu* cu *** 4571,4576 **** --- 4829,4835 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_callrimm (xstormy16_cpu* c *** 4608,4613 **** --- 4867,4873 ---- #define FLD(f) abuf->fields.sfmt_br.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_callgr (xstormy16_cpu* cur *** 4645,4650 **** --- 4905,4911 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_callfimm (xstormy16_cpu* c *** 4682,4687 **** --- 4943,4949 ---- #define FLD(f) abuf->fields.sfmt_jmpf.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_icallrgr (xstormy16_cpu* c *** 4719,4724 **** --- 4981,4987 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_icallgr (xstormy16_cpu* cu *** 4762,4767 **** --- 5025,5031 ---- #define FLD(f) abuf->fields.sfmt_jmp.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_icallfimm (xstormy16_cpu* *** 4805,4810 **** --- 5069,5075 ---- #define FLD(f) abuf->fields.sfmt_jmpf.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 4; *************** xstormy16_sem_iret (xstormy16_cpu* curre *** 4848,4853 **** --- 5113,5119 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_ret (xstormy16_cpu* curren *** 4885,4890 **** --- 5151,5157 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_mul (xstormy16_cpu* curren *** 4916,4921 **** --- 5183,5189 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_div (xstormy16_cpu* curren *** 4955,4960 **** --- 5223,5229 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_sdiv (xstormy16_cpu* curre *** 4996,5001 **** --- 5265,5271 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_sdivlh (xstormy16_cpu* cur *** 5037,5042 **** --- 5307,5313 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_divlh (xstormy16_cpu* curr *** 5080,5085 **** --- 5351,5357 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_reset (xstormy16_cpu* curr *** 5123,5128 **** --- 5395,5401 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_nop (xstormy16_cpu* curren *** 5141,5146 **** --- 5414,5420 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_halt (xstormy16_cpu* curre *** 5159,5164 **** --- 5433,5439 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_hold (xstormy16_cpu* curre *** 5177,5182 **** --- 5452,5458 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_holdx (xstormy16_cpu* curr *** 5195,5200 **** --- 5471,5477 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_brk (xstormy16_cpu* curren *** 5213,5218 **** --- 5490,5496 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2; *************** xstormy16_sem_syscall (xstormy16_cpu* cu *** 5231,5236 **** --- 5509,5515 ---- #define FLD(f) abuf->fields.fmt_empty.f sem_status status = SEM_STATUS_NORMAL; xstormy16_scache* abuf = sem; + unsigned long long written = 0; PCADDR pc = abuf->addr; PCADDR npc = pc + 2;