Index: cgen/cpu/xstormy16.cpu =================================================================== RCS file: /cvs/src/src/cgen/cpu/xstormy16.cpu,v retrieving revision 1.8 diff -c -p -r1.8 xstormy16.cpu *** cgen/cpu/xstormy16.cpu 21 Mar 2003 06:15:55 -0000 1.8 --- cgen/cpu/xstormy16.cpu 31 Mar 2003 19:41:48 -0000 *************** *** 41,46 **** --- 41,47 ---- (define-model (name xstormy16) + (mach xstormy16) (comment "Xstormy16 CPU core") (unit u-exec "Execution Unit" () 1 1 ; issue done Index: sid/component/cgen-cpu/xstormy16/Makefile.am =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/Makefile.am,v retrieving revision 1.1 diff -c -p -r1.1 Makefile.am *** sid/component/cgen-cpu/xstormy16/Makefile.am 17 Dec 2001 09:31:20 -0000 1.1 --- sid/component/cgen-cpu/xstormy16/Makefile.am 31 Mar 2003 20:29:59 -0000 *************** CXXFLAGS = $(TOP_CXXFLAGS) *** 11,17 **** pkgdata_DATA = hw-cpu-xstormy16.txt ! libxstormy16_la_SOURCES = xstormy16.cxx xstormy16-decode.cxx xstormy16-sem.cxx libxstormy16_la_LDFLAGS = libxstormy16_la_LIBADD = xstormy16-asm.lo xstormy16-dis.lo xstormy16-opc.lo xstormy16-ibld.lo xstormy16-desc.lo --- 11,17 ---- pkgdata_DATA = hw-cpu-xstormy16.txt ! libxstormy16_la_SOURCES = xstormy16.cxx xstormy16-decode.cxx xstormy16-sem.cxx xstormy16-model.cxx libxstormy16_la_LDFLAGS = libxstormy16_la_LIBADD = xstormy16-asm.lo xstormy16-dis.lo xstormy16-opc.lo xstormy16-ibld.lo xstormy16-desc.lo *************** cgen-all: $(CGEN_ALL) *** 51,55 **** cgen-xstormy16: $(SHELL) ../CGEN.sh cpu-decode $(srcdir) $(cgendir) "$(CGENFLAGS)" \ ! xstormy16 "with-scache" xstormy16 xstormy16 xstormy16 xstormy16 "xstormy16-" \ ! "desc.h cpu.h defs.h decode.h decode.cxx write.cxx semantics.cxx" --- 51,55 ---- cgen-xstormy16: $(SHELL) ../CGEN.sh cpu-decode $(srcdir) $(cgendir) "$(CGENFLAGS)" \ ! xstormy16 "with-scache with-profile=fn" xstormy16 xstormy16 xstormy16 xstormy16 "xstormy16-" \ ! "desc.h cpu.h defs.h decode.h decode.cxx model.h model.cxx write.cxx semantics.cxx" Index: sid/component/cgen-cpu/xstormy16/xstormy16.cxx =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/xstormy16.cxx,v retrieving revision 1.3 diff -c -p -r1.3 xstormy16.cxx *** sid/component/cgen-cpu/xstormy16/xstormy16.cxx 18 Feb 2003 22:57:29 -0000 1.3 --- sid/component/cgen-cpu/xstormy16/xstormy16.cxx 31 Mar 2003 20:30:00 -0000 *************** using namespace sidutil; *** 19,25 **** using namespace xstormy16; xstormy16_cpu::xstormy16_cpu () ! :engine (32768) // XXX: tune size { for (unsigned i = 0; i < 16; ++i) { --- 19,26 ---- using namespace xstormy16; xstormy16_cpu::xstormy16_cpu () ! :engine (32768), // XXX: tune size ! model (this) { for (unsigned i = 0; i < 16; ++i) { *************** xstormy16_cpu::step_insns () *** 172,177 **** --- 173,183 ---- bfd_arch_xstormy16, BFD_ENDIAN_LITTLE, "xstormy16"); } + if (UNLIKELY (trace_counter_p || final_insn_count_p)) + { + this->model.model_insn_before (true); + this->model.model_before (this, sem); + } try { sem->idesc->execute (this, sem); *************** xstormy16_cpu::step_insns () *** 184,189 **** --- 190,200 ---- catch (cpu_exception& t) { this->yield (); + } + if (UNLIKELY (trace_counter_p || final_insn_count_p)) + { + sid::host_int_4 cycles = this->model.model_after (this, sem); + this->model.model_insn_after (true, cycles); } if (trace_result_p) this->end_trace (); Index: sid/component/cgen-cpu/xstormy16/xstormy16.h =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/xstormy16.h,v retrieving revision 1.2 diff -c -p -r1.2 xstormy16.h *** sid/component/cgen-cpu/xstormy16/xstormy16.h 11 Jan 2002 07:25:03 -0000 1.2 --- sid/component/cgen-cpu/xstormy16/xstormy16.h 31 Mar 2003 20:30:00 -0000 *************** *** 8,13 **** --- 8,14 ---- #include "xstormy16-desc.h" #include "xstormy16-defs.h" #include "xstormy16-decode.h" + #include "xstormy16-model.h" namespace xstormy16 { *************** namespace xstormy16 *** 23,35 **** } protected: USI syscall_trap_num; - }; class xstormy16_cpu: public xstormy16_cpu_cgen, public cgen_bi_endian_cpu { private: scache_engine engine; void step_insns (); void flush_icache (); --- 24,36 ---- } protected: USI syscall_trap_num; }; class xstormy16_cpu: public xstormy16_cpu_cgen, public cgen_bi_endian_cpu { private: scache_engine engine; + xstormy16_xstormy16_model model; void step_insns (); void flush_icache ();