Commit | Line | Data |
---|---|---|
748894bf MK |
1 | /* Target-dependent code for the Motorola 68000 series. |
2 | ||
6aba47ca | 3 | Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, |
4c38e0a4 | 4 | 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
32eeb91a AS |
5 | |
6 | This file is part of GDB. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 10 | the Free Software Foundation; either version 3 of the License, or |
32eeb91a AS |
11 | (at your option) any later version. |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
32eeb91a AS |
20 | |
21 | #ifndef M68K_TDEP_H | |
22 | #define M68K_TDEP_H | |
23 | ||
8de307e0 AS |
24 | struct frame_info; |
25 | ||
748894bf | 26 | /* Register numbers of various important registers. */ |
32eeb91a | 27 | |
748894bf | 28 | enum m68k_regnum |
32eeb91a AS |
29 | { |
30 | M68K_D0_REGNUM = 0, | |
8de307e0 | 31 | M68K_D1_REGNUM = 1, |
c0c2b0db MK |
32 | M68K_D2_REGNUM = 2, |
33 | M68K_D7_REGNUM = 7, | |
32eeb91a AS |
34 | M68K_A0_REGNUM = 8, |
35 | M68K_A1_REGNUM = 9, | |
c0c2b0db | 36 | M68K_A2_REGNUM = 10, |
748894bf MK |
37 | M68K_FP_REGNUM = 14, /* Address of executing stack frame. */ |
38 | M68K_SP_REGNUM = 15, /* Address of top of stack. */ | |
39 | M68K_PS_REGNUM = 16, /* Processor status. */ | |
40 | M68K_PC_REGNUM = 17, /* Program counter. */ | |
41 | M68K_FP0_REGNUM = 18, /* Floating point register 0. */ | |
42 | M68K_FPC_REGNUM = 26, /* 68881 control register. */ | |
43 | M68K_FPS_REGNUM = 27, /* 68881 status register. */ | |
32eeb91a AS |
44 | M68K_FPI_REGNUM = 28 |
45 | }; | |
46 | ||
748894bf MK |
47 | /* Number of machine registers. */ |
48 | #define M68K_NUM_REGS (M68K_FPI_REGNUM + 1) | |
8de307e0 AS |
49 | |
50 | /* Size of the largest register. */ | |
51 | #define M68K_MAX_REGISTER_SIZE 12 | |
52 | ||
c481dac7 AS |
53 | /* Convention for returning structures. */ |
54 | ||
55 | enum struct_return | |
56 | { | |
57 | pcc_struct_return, /* Return "short" structures in memory. */ | |
58 | reg_struct_return /* Return "short" structures in registers. */ | |
59 | }; | |
60 | ||
8ed86d01 VP |
61 | /* Particular flavour of m68k. */ |
62 | enum m68k_flavour | |
63 | { | |
64 | m68k_no_flavour, | |
65 | m68k_coldfire_flavour, | |
66 | m68k_fido_flavour | |
67 | }; | |
68 | ||
eb2e12d7 | 69 | /* Target-dependent structure in gdbarch. */ |
748894bf | 70 | |
eb2e12d7 AS |
71 | struct gdbarch_tdep |
72 | { | |
73 | /* Offset to PC value in the jump buffer. If this is negative, | |
74 | longjmp support will be disabled. */ | |
75 | int jb_pc; | |
76 | /* The size of each entry in the jump buffer. */ | |
77 | size_t jb_elt_size; | |
8de307e0 | 78 | |
f595cb19 MK |
79 | /* Register in which the address to store a structure value is |
80 | passed to a function. */ | |
81 | int struct_value_regnum; | |
82 | ||
c481dac7 AS |
83 | /* Convention for returning structures. */ |
84 | enum struct_return struct_return; | |
8ed86d01 VP |
85 | |
86 | /* Convention for returning floats. zero in int regs, non-zero in float. */ | |
87 | int float_return; | |
88 | ||
89 | /* The particular flavour of m68k. */ | |
90 | enum m68k_flavour flavour; | |
91 | ||
92 | /* Flag set if the floating point registers are present, or assumed | |
93 | to be present. */ | |
94 | int fpregs_present; | |
27067745 UW |
95 | |
96 | /* ISA-specific data types. */ | |
209bd28e | 97 | struct type *m68k_ps_type; |
27067745 | 98 | struct type *m68881_ext_type; |
eb2e12d7 AS |
99 | }; |
100 | ||
f595cb19 MK |
101 | /* Initialize a SVR4 architecture variant. */ |
102 | extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *); | |
103 | \f | |
104 | ||
511dd2cd MK |
105 | /* Functions exported from m68kbsd-tdep.c. */ |
106 | ||
6ba38425 | 107 | extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum); |
511dd2cd | 108 | |
748894bf | 109 | #endif /* m68k-tdep.h */ |