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