/* Simulator model support for xstormy16. 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. */ #include "xstormy16.h" using namespace xstormy16; // FIXME: namespace organization still wip /* The profiling data is recorded here, but is accessed via the profiling mechanism. After all, this is information for profiling. */ /* Model handlers for each insn. */ xstormy16_xstormy16_model::xstormy16_xstormy16_model (xstormy16_cpu *cpu) : cgen_model (cpu) { } UINT xstormy16_xstormy16_model::model_movlmemimm_before (xstormy16_cpu *current_cpu, xstormy16_scache *sem) { #define FLD(f) abuf->fields.sfmt_movlmemimm.f const xstormy16_scache* abuf = sem; const xstormy16_idesc* idesc = abuf->idesc; int cycles = 0; { cycles += model_u_exec_before (current_cpu, idesc, 0); } return cycles; #undef FLD } UINT xstormy16_xstormy16_model::model_movlmemimm_after (xstormy16_cpu *current_cpu, xstormy16_scache *sem) { #define FLD(f) abuf->fields.sfmt_movlmemimm.f const xstormy16_scache* abuf = sem; const xstormy16_idesc* idesc = abuf->idesc; int cycles = 0; { int referenced = 0; unsigned long long insn_referenced = abuf->written; cycles += model_u_exec_after (current_cpu, idesc, 0, referenced); } return cycles; #undef FLD } // --------------------------------------------------------- // [snip] ... two functions for each insn as above ... // --------------------------------------------------------- /* We assume UNIT_NONE == 0 because the tables don't always terminate entries with it. */ /* Model timing data for `xstormy16'. */ const xstormy16_xstormy16_model::insn_timing xstormy16_xstormy16_model::timing[] = { { XSTORMY16_INSN_X_INVALID, 0, 0, { { xstormy16_xstormy16_model::UNIT_U_EXEC, 1, 1 } } }, { XSTORMY16_INSN_MOVLMEMIMM, & xstormy16_xstormy16_model::model_movlmemimm_before, & xstormy16_xstormy16_model::model_movlmemimm_after, { { xstormy16_xstormy16_model::UNIT_U_EXEC, 1, 1 } } }, { XSTORMY16_INSN_MOVHMEMIMM, & xstormy16_xstormy16_model::model_movhmemimm_before, & xstormy16_xstormy16_model::model_movhmemimm_after, { { xstormy16_xstormy16_model::UNIT_U_EXEC, 1, 1 } } }, // --------------------------------------------------------- // [snip] ... one entry for each insn, as above // --------------------------------------------------------- };