Back to index

cell-binutils  2.17cvs20070401
sim-h8300.h
Go to the documentation of this file.
00001 /* This file defines the interface between the h8300 simulator and gdb.
00002    Copyright (C) 2002, 2007 Free Software Foundation, Inc.
00003 
00004 This file is part of GDB.
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00019 
00020 #if !defined (SIM_H8300_H)
00021 #define SIM_H8300_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" { //}
00025 #endif
00026 
00027 /* The simulator makes use of the following register information. */
00028 
00029   enum sim_h8300_regs
00030   {
00031     /* Registers common to all the H8 variants. */
00032     /* Start here: */
00033     SIM_H8300_R0_REGNUM,
00034     SIM_H8300_R1_REGNUM,
00035     SIM_H8300_R2_REGNUM,
00036     SIM_H8300_R3_REGNUM,
00037     SIM_H8300_R4_REGNUM,
00038     SIM_H8300_R5_REGNUM,
00039     SIM_H8300_R6_REGNUM,
00040     SIM_H8300_R7_REGNUM,
00041 
00042     SIM_H8300_CCR_REGNUM,  /* Contains processor status */
00043     SIM_H8300_PC_REGNUM,   /* Contains program counter */
00044     /* End here */
00045 
00046     SIM_H8300_EXR_REGNUM,  /* Contains extended processor status
00047                               H8S and higher */
00048     SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
00049     SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
00050 
00051     SIM_H8300_CYCLE_REGNUM,
00052     SIM_H8300_INST_REGNUM,
00053     SIM_H8300_TICK_REGNUM
00054   };
00055 
00056   enum
00057   {
00058     SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
00059                                                          may be passed */
00060     SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM,  /* last  reg in which an arg
00061                                                          may be passed */
00062     SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
00063                                                   stack frame */
00064     SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM  /* Contains address of top of stack */
00065   };
00066 
00067   enum
00068   {
00069     SIM_H8300_NUM_COMMON_REGS = 10,
00070     SIM_H8300_S_NUM_REGS = 13,
00071     SIM_H8300_NUM_REGS = 16
00072   };
00073 
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077 
00078 #endif                      /* SIM_H8300_H */