1*d2201f2fSdrahn /* This file defines the interface between the h8300 simulator and gdb. 2*d2201f2fSdrahn Copyright (C) 2002 Free Software Foundation, Inc. 3*d2201f2fSdrahn 4*d2201f2fSdrahn This file is part of GDB. 5*d2201f2fSdrahn 6*d2201f2fSdrahn This program is free software; you can redistribute it and/or modify 7*d2201f2fSdrahn it under the terms of the GNU General Public License as published by 8*d2201f2fSdrahn the Free Software Foundation; either version 2 of the License, or 9*d2201f2fSdrahn (at your option) any later version. 10*d2201f2fSdrahn 11*d2201f2fSdrahn This program is distributed in the hope that it will be useful, 12*d2201f2fSdrahn but WITHOUT ANY WARRANTY; without even the implied warranty of 13*d2201f2fSdrahn MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*d2201f2fSdrahn GNU General Public License for more details. 15*d2201f2fSdrahn 16*d2201f2fSdrahn You should have received a copy of the GNU General Public License 17*d2201f2fSdrahn along with this program; if not, write to the Free Software 18*d2201f2fSdrahn Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19*d2201f2fSdrahn 20*d2201f2fSdrahn #if !defined (SIM_H8300_H) 21*d2201f2fSdrahn #define SIM_H8300_H 22*d2201f2fSdrahn 23*d2201f2fSdrahn #ifdef __cplusplus 24*d2201f2fSdrahn extern "C" { //} 25*d2201f2fSdrahn #endif 26*d2201f2fSdrahn 27*d2201f2fSdrahn /* The simulator makes use of the following register information. */ 28*d2201f2fSdrahn 29*d2201f2fSdrahn enum sim_h8300_regs 30*d2201f2fSdrahn { 31*d2201f2fSdrahn /* Registers common to all the H8 variants. */ 32*d2201f2fSdrahn /* Start here: */ 33*d2201f2fSdrahn SIM_H8300_R0_REGNUM, 34*d2201f2fSdrahn SIM_H8300_R1_REGNUM, 35*d2201f2fSdrahn SIM_H8300_R2_REGNUM, 36*d2201f2fSdrahn SIM_H8300_R3_REGNUM, 37*d2201f2fSdrahn SIM_H8300_R4_REGNUM, 38*d2201f2fSdrahn SIM_H8300_R5_REGNUM, 39*d2201f2fSdrahn SIM_H8300_R6_REGNUM, 40*d2201f2fSdrahn SIM_H8300_R7_REGNUM, 41*d2201f2fSdrahn 42*d2201f2fSdrahn SIM_H8300_CCR_REGNUM, /* Contains processor status */ 43*d2201f2fSdrahn SIM_H8300_PC_REGNUM, /* Contains program counter */ 44*d2201f2fSdrahn /* End here */ 45*d2201f2fSdrahn 46*d2201f2fSdrahn SIM_H8300_EXR_REGNUM, /* Contains extended processor status 47*d2201f2fSdrahn H8S and higher */ 48*d2201f2fSdrahn SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/ 49*d2201f2fSdrahn SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */ 50*d2201f2fSdrahn 51*d2201f2fSdrahn SIM_H8300_CYCLE_REGNUM, 52*d2201f2fSdrahn SIM_H8300_INST_REGNUM, 53*d2201f2fSdrahn SIM_H8300_TICK_REGNUM 54*d2201f2fSdrahn }; 55*d2201f2fSdrahn 56*d2201f2fSdrahn enum 57*d2201f2fSdrahn { 58*d2201f2fSdrahn SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg 59*d2201f2fSdrahn may be passed */ 60*d2201f2fSdrahn SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg 61*d2201f2fSdrahn may be passed */ 62*d2201f2fSdrahn SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing 63*d2201f2fSdrahn stack frame */ 64*d2201f2fSdrahn SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM /* Contains address of top of stack */ 65*d2201f2fSdrahn }; 66*d2201f2fSdrahn 67*d2201f2fSdrahn enum 68*d2201f2fSdrahn { 69*d2201f2fSdrahn SIM_H8300_NUM_COMMON_REGS = 10, 70*d2201f2fSdrahn SIM_H8300_S_NUM_REGS = 13, 71*d2201f2fSdrahn SIM_H8300_NUM_REGS = 16 72*d2201f2fSdrahn }; 73*d2201f2fSdrahn 74*d2201f2fSdrahn #ifdef __cplusplus 75*d2201f2fSdrahn } 76*d2201f2fSdrahn #endif 77*d2201f2fSdrahn 78*d2201f2fSdrahn #endif /* SIM_H8300_H */ 79