GDB (API)
/home/stan/gdb/src/gdb/m68k-tdep.h
Go to the documentation of this file.
00001 /* Target-dependent code for the Motorola 68000 series.
00002 
00003    Copyright (C) 1990-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 #ifndef M68K_TDEP_H
00021 #define M68K_TDEP_H
00022 
00023 struct frame_info;
00024 
00025 /* Register numbers of various important registers.  */
00026 
00027 enum m68k_regnum
00028 {
00029   M68K_D0_REGNUM = 0,
00030   M68K_D1_REGNUM = 1,
00031   M68K_D2_REGNUM = 2,
00032   M68K_D7_REGNUM = 7,
00033   M68K_A0_REGNUM = 8,
00034   M68K_A1_REGNUM = 9,
00035   M68K_A2_REGNUM = 10,
00036   M68K_FP_REGNUM = 14,          /* Address of executing stack frame.  */
00037   M68K_SP_REGNUM = 15,          /* Address of top of stack.  */
00038   M68K_PS_REGNUM = 16,          /* Processor status.  */
00039   M68K_PC_REGNUM = 17,          /* Program counter.  */
00040   M68K_FP0_REGNUM = 18,         /* Floating point register 0.  */
00041   M68K_FPC_REGNUM = 26,         /* 68881 control register.  */
00042   M68K_FPS_REGNUM = 27,         /* 68881 status register.  */
00043   M68K_FPI_REGNUM = 28
00044 };
00045 
00046 /* Number of machine registers.  */
00047 #define M68K_NUM_REGS   (M68K_FPI_REGNUM + 1)
00048 
00049 /* Size of the largest register.  */
00050 #define M68K_MAX_REGISTER_SIZE  12
00051 
00052 /* Convention for returning structures.  */
00053 
00054 enum struct_return
00055 {
00056   pcc_struct_return,            /* Return "short" structures in memory.  */
00057   reg_struct_return             /* Return "short" structures in registers.  */
00058 };
00059 
00060 /* Particular flavour of m68k.  */
00061 enum m68k_flavour
00062   {
00063     m68k_no_flavour,
00064     m68k_coldfire_flavour,
00065     m68k_fido_flavour
00066   };
00067 
00068 /* Target-dependent structure in gdbarch.  */
00069 
00070 struct gdbarch_tdep
00071 {
00072   /* Offset to PC value in the jump buffer.  If this is negative,
00073      longjmp support will be disabled.  */
00074   int jb_pc;
00075   /* The size of each entry in the jump buffer.  */
00076   size_t jb_elt_size;
00077 
00078   /* Register in which the address to store a structure value is
00079      passed to a function.  */
00080   int struct_value_regnum;
00081 
00082   /* Convention for returning structures.  */
00083   enum struct_return struct_return;
00084 
00085   /* Convention for returning floats.  zero in int regs, non-zero in float.  */
00086   int float_return;
00087 
00088   /* The particular flavour of m68k.  */
00089   enum m68k_flavour flavour;
00090 
00091   /* Flag set if the floating point registers are present, or assumed
00092      to be present.  */
00093   int fpregs_present;
00094 
00095    /* ISA-specific data types.  */
00096   struct type *m68k_ps_type;
00097   struct type *m68881_ext_type;
00098 };
00099 
00100 /* Initialize a SVR4 architecture variant.  */
00101 extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
00102 
00103 
00104 /* Functions exported from m68kbsd-tdep.c.  */
00105 
00106 extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum);
00107 
00108 #endif /* m68k-tdep.h */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines