
builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext, builtin_type_ia64_spill, builtin_type_ia64_quad): Remove. (init_float_type, init_complex_type): Add prototypes. * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double, builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext, builtin_type_ia64_spill, builtin_type_ia64_quad): Remove. (_initialize_gdbtypes): Do not initialize them. (build_flt): Rename to ... (init_float_type): ... this. Make global. (build_complex): Rename to ... (init_complex_type): ... this. Make global. Remove BIT argument. (gdbtypes_post_init): Update calls. * ada-lang.c (ada_language_arch_info): Use init_float_type. * jv-lang.c (build_java_types): Likewise. * m2-lang.c (build_m2_types): Likewise. * f-lang.c (build_fortran_types): Use init_float_type and init_complex_type. * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead of using builtin_type_ieee_single, builtin_type_ieee_double, or builtin_type_arm_ext. * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member. * ia64-tdep.c (builtin_type_ia64_ext): Remove. (_initialize_ia64_tdep): Do not initialize it. (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext): Move up. (ia64_ext_type): New function. (ia64_register_reggroup_p, ia64_convert_register_p, ia64_register_to_value, ia64_value_to_register, ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type instead of builtin_type_ia64_ext. * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member. (i387_ext_type): Add prototype. * i386-tdep.c (i387_ext_type): New function. (i386_extract_return_value, i386_store_return_value, i386_register_type): Use it instead of builtin_type_i387_ext. * amd64-tdep.c (amd64_register_type): Likewise. * i387-tdep.c (print_i387_value, i387_register_to_value, i387_value_to_register): Likewise. (print_i387_value, print_i387_ext): Add GDBARCH argument. (print_i387_ext, i387_print_float_info): Pass to subroutines. * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member. * m68k-tdep.c (m68881_ext_type): New function. (m68k_register_type, m68k_convert_register_p): Use it instead of builtin_type_m68881_ext. * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member. * arm-tdep.c (arm_ext_type): New function. (arm_register_type): Use it instead of builtin_type_arm_ext. * alpha-tdep.c (alpha_register_type): Use builtin types instead of builtin_type_ieee_double. * mips-tdep.c (mips_float_register_type, mips_double_register_type): Remove. (mips_register_type): Use builtin types instead of builtin_type_ieee_single and builtin_type_ieee_double. (mips_print_fp_register): Use builtin types instead of mips_float_register_type and mips_double_register_type. * hppa-tdep.c (hppa32_register_type, hppa64_register_type): Use builtin types instead of builtin_type_ieee_single and builtin_type_ieee_double.
108 lines
3.1 KiB
C
108 lines
3.1 KiB
C
/* Target-dependent code for the Motorola 68000 series.
|
||
|
||
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
|
||
2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||
|
||
This file is part of GDB.
|
||
|
||
This program is free software; you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation; either version 3 of the License, or
|
||
(at your option) any later version.
|
||
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||
|
||
#ifndef M68K_TDEP_H
|
||
#define M68K_TDEP_H
|
||
|
||
struct frame_info;
|
||
|
||
/* Register numbers of various important registers. */
|
||
|
||
enum m68k_regnum
|
||
{
|
||
M68K_D0_REGNUM = 0,
|
||
M68K_D1_REGNUM = 1,
|
||
M68K_D2_REGNUM = 2,
|
||
M68K_D7_REGNUM = 7,
|
||
M68K_A0_REGNUM = 8,
|
||
M68K_A1_REGNUM = 9,
|
||
M68K_A2_REGNUM = 10,
|
||
M68K_FP_REGNUM = 14, /* Address of executing stack frame. */
|
||
M68K_SP_REGNUM = 15, /* Address of top of stack. */
|
||
M68K_PS_REGNUM = 16, /* Processor status. */
|
||
M68K_PC_REGNUM = 17, /* Program counter. */
|
||
M68K_FP0_REGNUM = 18, /* Floating point register 0. */
|
||
M68K_FPC_REGNUM = 26, /* 68881 control register. */
|
||
M68K_FPS_REGNUM = 27, /* 68881 status register. */
|
||
M68K_FPI_REGNUM = 28
|
||
};
|
||
|
||
/* Number of machine registers. */
|
||
#define M68K_NUM_REGS (M68K_FPI_REGNUM + 1)
|
||
|
||
/* Size of the largest register. */
|
||
#define M68K_MAX_REGISTER_SIZE 12
|
||
|
||
/* Convention for returning structures. */
|
||
|
||
enum struct_return
|
||
{
|
||
pcc_struct_return, /* Return "short" structures in memory. */
|
||
reg_struct_return /* Return "short" structures in registers. */
|
||
};
|
||
|
||
/* Particular flavour of m68k. */
|
||
enum m68k_flavour
|
||
{
|
||
m68k_no_flavour,
|
||
m68k_coldfire_flavour,
|
||
m68k_fido_flavour
|
||
};
|
||
|
||
/* Target-dependent structure in gdbarch. */
|
||
|
||
struct gdbarch_tdep
|
||
{
|
||
/* Offset to PC value in the jump buffer. If this is negative,
|
||
longjmp support will be disabled. */
|
||
int jb_pc;
|
||
/* The size of each entry in the jump buffer. */
|
||
size_t jb_elt_size;
|
||
|
||
/* Register in which the address to store a structure value is
|
||
passed to a function. */
|
||
int struct_value_regnum;
|
||
|
||
/* Convention for returning structures. */
|
||
enum struct_return struct_return;
|
||
|
||
/* Convention for returning floats. zero in int regs, non-zero in float. */
|
||
int float_return;
|
||
|
||
/* The particular flavour of m68k. */
|
||
enum m68k_flavour flavour;
|
||
|
||
/* Flag set if the floating point registers are present, or assumed
|
||
to be present. */
|
||
int fpregs_present;
|
||
|
||
/* ISA-specific data types. */
|
||
struct type *m68881_ext_type;
|
||
};
|
||
|
||
/* Initialize a SVR4 architecture variant. */
|
||
extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
|
||
|
||
|
||
/* Functions exported from m68kbsd-tdep.c. */
|
||
|
||
extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum);
|
||
|
||
#endif /* m68k-tdep.h */
|