2002-12-05 13:17:39 +08:00
|
|
|
/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
|
|
|
|
|
2003-11-16 06:09:07 +08:00
|
|
|
Copyright 2002, 2003 Free Software Foundation, Inc.
|
2002-12-05 13:17:39 +08:00
|
|
|
|
|
|
|
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 2 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, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
|
|
|
#ifndef MIPS_TDEP_H
|
|
|
|
#define MIPS_TDEP_H
|
|
|
|
|
2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
* gdbarch.h: Regnerate.
* symtab.h: Add missing opaque declarations.
* value.h, target.h, symfile.h, stabsread.h: Ditto.
* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-13 01:41:26 +08:00
|
|
|
struct gdbarch;
|
|
|
|
|
2002-12-05 13:17:39 +08:00
|
|
|
/* All the possible MIPS ABIs. */
|
|
|
|
enum mips_abi
|
|
|
|
{
|
|
|
|
MIPS_ABI_UNKNOWN = 0,
|
|
|
|
MIPS_ABI_N32,
|
|
|
|
MIPS_ABI_O32,
|
|
|
|
MIPS_ABI_N64,
|
|
|
|
MIPS_ABI_O64,
|
|
|
|
MIPS_ABI_EABI32,
|
|
|
|
MIPS_ABI_EABI64,
|
|
|
|
MIPS_ABI_LAST
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Return the MIPS ABI associated with GDBARCH. */
|
|
|
|
enum mips_abi mips_abi (struct gdbarch *gdbarch);
|
|
|
|
|
2003-06-13 02:01:28 +08:00
|
|
|
/* For wince :-(. */
|
|
|
|
extern CORE_ADDR mips_next_pc (CORE_ADDR pc);
|
|
|
|
|
2004-04-30 02:28:43 +08:00
|
|
|
/* Return the MIPS ISA's register size. Just a short cut to the BFD
|
2003-11-16 06:09:07 +08:00
|
|
|
architecture's word size. */
|
2004-04-30 02:28:43 +08:00
|
|
|
extern int mips_isa_regsize (struct gdbarch *gdbarch);
|
2003-11-16 06:09:07 +08:00
|
|
|
|
2003-11-16 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
(mips_fpa0_regnum, mips_regnum): New function.
(mips_gdbarch_init): Fill in the "regnum" fields.
* mips-tdep.h (struct mips_regnum): Define.
(mips_regnum): Declare.
* config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
(LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
(CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
(FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
* config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* remote-mips.c: Include "mips-tdep.h". Update.
* mipsnbsd-tdep.c: Update.
* mipsv4-nat.c: Update.
* mips-tdep.c: Update.
* mips-nat.c: Update.
* mips-linux-tdep.c: Update.
* mips-linux-nat.c: Update.
* irix5-nat.c: Update.
* dve3900-rom.c: Include "mips-tdep.h". Update.
(ignore_packet): Supress GCC warning.
* config/mips/nm-riscos.h: Update.
* Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
2003-11-17 03:24:05 +08:00
|
|
|
/* Return the current index for various MIPS registers. */
|
|
|
|
struct mips_regnum
|
|
|
|
{
|
|
|
|
int pc;
|
|
|
|
int fp0;
|
|
|
|
int fp_implementation_revision;
|
|
|
|
int fp_control_status;
|
|
|
|
int badvaddr; /* Bad vaddr for addressing exception. */
|
|
|
|
int cause; /* Describes last exception. */
|
|
|
|
int hi; /* Multiply/divide temp. */
|
|
|
|
int lo; /* ... */
|
|
|
|
};
|
|
|
|
extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
|
|
|
|
|
|
|
|
enum {
|
2004-06-22 08:01:04 +08:00
|
|
|
MIPS_SP_REGNUM = 29,
|
2003-11-16 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
(mips_fpa0_regnum, mips_regnum): New function.
(mips_gdbarch_init): Fill in the "regnum" fields.
* mips-tdep.h (struct mips_regnum): Define.
(mips_regnum): Declare.
* config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
(LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
(CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
(FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
* config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* remote-mips.c: Include "mips-tdep.h". Update.
* mipsnbsd-tdep.c: Update.
* mipsv4-nat.c: Update.
* mips-tdep.c: Update.
* mips-nat.c: Update.
* mips-linux-tdep.c: Update.
* mips-linux-nat.c: Update.
* irix5-nat.c: Update.
* dve3900-rom.c: Include "mips-tdep.h". Update.
(ignore_packet): Supress GCC warning.
* config/mips/nm-riscos.h: Update.
* Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
2003-11-17 03:24:05 +08:00
|
|
|
MIPS_EMBED_LO_REGNUM = 33,
|
|
|
|
MIPS_EMBED_HI_REGNUM = 34,
|
|
|
|
MIPS_EMBED_BADVADDR_REGNUM = 35,
|
|
|
|
MIPS_EMBED_CAUSE_REGNUM = 36,
|
|
|
|
MIPS_EMBED_PC_REGNUM = 37,
|
|
|
|
MIPS_EMBED_FP0_REGNUM = 38
|
|
|
|
};
|
|
|
|
|
2003-11-17 06:46:49 +08:00
|
|
|
/* Defined in mips-tdep.c and used in remote-mips.c */
|
|
|
|
extern void deprecated_mips_set_processor_regs_hack (void);
|
|
|
|
|
|
|
|
|
2002-12-05 13:17:39 +08:00
|
|
|
#endif /* MIPS_TDEP_H */
|