1*88241920Schristos /* AVR Simulator definition. 2*88241920Schristos Copyright (C) 2009-2024 Free Software Foundation, Inc. 3*88241920Schristos 4*88241920Schristos This file is part of the GNU simulators. 5*88241920Schristos 6*88241920Schristos This program is free software; you can redistribute it and/or modify 7*88241920Schristos it under the terms of the GNU General Public License as published by 8*88241920Schristos the Free Software Foundation; either version 3 of the License, or 9*88241920Schristos (at your option) any later version. 10*88241920Schristos 11*88241920Schristos This program is distributed in the hope that it will be useful, 12*88241920Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 13*88241920Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*88241920Schristos GNU General Public License for more details. 15*88241920Schristos 16*88241920Schristos You should have received a copy of the GNU General Public License 17*88241920Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18*88241920Schristos 19*88241920Schristos #ifndef AVR_SIM_H 20*88241920Schristos #define AVR_SIM_H 21*88241920Schristos 22*88241920Schristos #include <stdint.h> 23*88241920Schristos 24*88241920Schristos struct avr_sim_cpu { 25*88241920Schristos /* The only real register. */ 26*88241920Schristos uint32_t pc; 27*88241920Schristos 28*88241920Schristos /* We update a cycle counter. */ 29*88241920Schristos uint32_t cycles; 30*88241920Schristos }; 31*88241920Schristos 32*88241920Schristos #define AVR_SIM_CPU(cpu) ((struct avr_sim_cpu *) CPU_ARCH_DATA (cpu)) 33*88241920Schristos 34*88241920Schristos struct avr_sim_state { 35*88241920Schristos /* If true, the pc needs more than 2 bytes. */ 36*88241920Schristos int avr_pc22; 37*88241920Schristos }; 38*88241920Schristos 39*88241920Schristos #define AVR_SIM_STATE(sd) ((struct avr_sim_state *) STATE_ARCH_DATA (sd)) 40*88241920Schristos 41*88241920Schristos #endif 42