GDB (xrefs)

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