gdb/m68k-tdep.h - gdb

Data types defined

Macros defined

Source code

  1. /* Target-dependent code for the Motorola 68000 series.

  2.    Copyright (C) 1990-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef M68K_TDEP_H
  15. #define M68K_TDEP_H

  16. struct frame_info;

  17. /* Register numbers of various important registers.  */

  18. enum m68k_regnum
  19. {
  20.   M68K_D0_REGNUM = 0,
  21.   M68K_D1_REGNUM = 1,
  22.   M68K_D2_REGNUM = 2,
  23.   M68K_D7_REGNUM = 7,
  24.   M68K_A0_REGNUM = 8,
  25.   M68K_A1_REGNUM = 9,
  26.   M68K_A2_REGNUM = 10,
  27.   M68K_FP_REGNUM = 14,                /* Address of executing stack frame.  */
  28.   M68K_SP_REGNUM = 15,                /* Address of top of stack.  */
  29.   M68K_PS_REGNUM = 16,                /* Processor status.  */
  30.   M68K_PC_REGNUM = 17,                /* Program counter.  */
  31.   M68K_FP0_REGNUM = 18,                /* Floating point register 0.  */
  32.   M68K_FPC_REGNUM = 26,                /* 68881 control register.  */
  33.   M68K_FPS_REGNUM = 27,                /* 68881 status register.  */
  34.   M68K_FPI_REGNUM = 28
  35. };

  36. /* Number of machine registers.  */
  37. #define M68K_NUM_REGS        (M68K_FPI_REGNUM + 1)

  38. /* Size of the largest register.  */
  39. #define M68K_MAX_REGISTER_SIZE        12

  40. /* Convention for returning structures.  */

  41. enum struct_return
  42. {
  43.   pcc_struct_return,                /* Return "short" structures in memory.  */
  44.   reg_struct_return                /* Return "short" structures in registers.  */
  45. };

  46. /* Particular flavour of m68k.  */
  47. enum m68k_flavour
  48.   {
  49.     m68k_no_flavour,
  50.     m68k_coldfire_flavour,
  51.     m68k_fido_flavour
  52.   };

  53. /* Target-dependent structure in gdbarch.  */

  54. struct gdbarch_tdep
  55. {
  56.   /* Offset to PC value in the jump buffer.  If this is negative,
  57.      longjmp support will be disabled.  */
  58.   int jb_pc;
  59.   /* The size of each entry in the jump buffer.  */
  60.   size_t jb_elt_size;

  61.   /* Register in which the address to store a structure value is
  62.      passed to a function.  */
  63.   int struct_value_regnum;

  64.   /* Convention for returning structures.  */
  65.   enum struct_return struct_return;

  66.   /* Convention for returning floats.  zero in int regs, non-zero in float.  */
  67.   int float_return;

  68.   /* The particular flavour of m68k.  */
  69.   enum m68k_flavour flavour;

  70.   /* Flag set if the floating point registers are present, or assumed
  71.      to be present.  */
  72.   int fpregs_present;

  73.    /* ISA-specific data types.  */
  74.   struct type *m68k_ps_type;
  75.   struct type *m68881_ext_type;
  76. };

  77. /* Initialize a SVR4 architecture variant.  */
  78. extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);


  79. /* Functions exported from m68kbsd-tdep.c.  */

  80. extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum);

  81. #endif /* m68k-tdep.h */