GDB (xrefs)
Loading...
Searching...
No Matches
m68k-tdep.h
Go to the documentation of this file.
1/* Target-dependent code for the Motorola 68000 series.
2
3 Copyright (C) 1990-2023 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#include "gdbarch.h"
24
25class frame_info_ptr;
26
27/* Register numbers of various important registers. */
28
30{
38 M68K_FP_REGNUM = 14, /* Address of executing stack frame. */
39 M68K_SP_REGNUM = 15, /* Address of top of stack. */
40 M68K_PS_REGNUM = 16, /* Processor status. */
41 M68K_PC_REGNUM = 17, /* Program counter. */
42 M68K_FP0_REGNUM = 18, /* Floating point register 0. */
43 M68K_FPC_REGNUM = 26, /* 68881 control register. */
44 M68K_FPS_REGNUM = 27, /* 68881 status register. */
46};
47
48/* Number of machine registers. */
49#define M68K_NUM_REGS (M68K_FPI_REGNUM + 1)
50
51/* Size of the largest register. */
52#define M68K_MAX_REGISTER_SIZE 12
53
54/* Convention for returning structures. */
55
56enum struct_return
57{
58 pcc_struct_return, /* Return "short" structures in memory. */
59 reg_struct_return /* Return "short" structures in registers. */
60};
61
62/* Particular flavour of m68k. */
69
70/* Target-dependent structure in gdbarch. */
71
73{
74 /* Offset to PC value in the jump buffer. If this is negative,
75 longjmp support will be disabled. */
76 int jb_pc = 0;
77 /* The size of each entry in the jump buffer. */
78 size_t jb_elt_size = 0;
79
80 /* Register in which the address to store a structure value is
81 passed to a function. */
83
84 /* Register in which a pointer value is returned. In the SVR4 ABI,
85 this is %a0, but in GCC's "embedded" ABI, this is %d0. */
87
88 /* Convention for returning structures. */
89 enum struct_return struct_return {};
90
91 /* Convention for returning floats. zero in int regs, non-zero in float. */
92 int float_return = 0;
93
94 /* The particular flavour of m68k. */
95 enum m68k_flavour flavour {};
96
97 /* Flag set if the floating point registers are present, or assumed
98 to be present. */
100
101 /* ISA-specific data types. */
102 struct type *m68k_ps_type = nullptr;
103 struct type *m68881_ext_type = nullptr;
104};
105
106/* Initialize a SVR4 architecture variant. */
107extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
108
109
110/* Functions exported from m68k-bsd-tdep.c. */
111
112extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum);
113
114#endif /* m68k-tdep.h */
int regnum
@ pcc_struct_return
Definition arm-tdep.h:85
@ reg_struct_return
Definition arm-tdep.h:86
m68k_flavour
Definition m68k-tdep.h:64
@ m68k_no_flavour
Definition m68k-tdep.h:65
@ m68k_coldfire_flavour
Definition m68k-tdep.h:66
@ m68k_fido_flavour
Definition m68k-tdep.h:67
m68k_regnum
Definition m68k-tdep.h:30
@ M68K_PC_REGNUM
Definition m68k-tdep.h:41
@ M68K_FP0_REGNUM
Definition m68k-tdep.h:42
@ M68K_FP_REGNUM
Definition m68k-tdep.h:38
@ M68K_PS_REGNUM
Definition m68k-tdep.h:40
@ M68K_A0_REGNUM
Definition m68k-tdep.h:35
@ M68K_D0_REGNUM
Definition m68k-tdep.h:31
@ M68K_A1_REGNUM
Definition m68k-tdep.h:36
@ M68K_FPS_REGNUM
Definition m68k-tdep.h:44
@ M68K_FPI_REGNUM
Definition m68k-tdep.h:45
@ M68K_D2_REGNUM
Definition m68k-tdep.h:33
@ M68K_FPC_REGNUM
Definition m68k-tdep.h:43
@ M68K_A2_REGNUM
Definition m68k-tdep.h:37
@ M68K_D1_REGNUM
Definition m68k-tdep.h:32
@ M68K_SP_REGNUM
Definition m68k-tdep.h:39
@ M68K_D7_REGNUM
Definition m68k-tdep.h:34
struct_return
Definition m68k-tdep.h:57
void m68k_svr4_init_abi(struct gdbarch_info, struct gdbarch *)
Definition m68k-tdep.c:1102
int m68kbsd_fpreg_offset(struct gdbarch *gdbarch, int regnum)
int pointer_result_regnum
Definition m68k-tdep.h:86
struct type * m68881_ext_type
Definition m68k-tdep.h:103
struct type * m68k_ps_type
Definition m68k-tdep.h:102