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