aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/mips
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-11-16 19:24:05 +0000
committerAndrew Cagney <cagney@redhat.com>2003-11-16 19:24:05 +0000
commit56cea623828ea5eea0cc592f7f55157b4b902bb4 (patch)
tree82c70cf0ac60b3dd7337465ef6f42739d704f633 /gdb/config/mips
parent719ec22109a4b447266214fadba2fbb878192c96 (diff)
downloadgdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.zip
gdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.tar.gz
gdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.tar.bz2
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.
Diffstat (limited to 'gdb/config/mips')
-rw-r--r--gdb/config/mips/nm-riscos.h16
-rw-r--r--gdb/config/mips/tm-irix5.h24
-rw-r--r--gdb/config/mips/tm-irix6.h24
-rw-r--r--gdb/config/mips/tm-mips.h9
4 files changed, 8 insertions, 65 deletions
diff --git a/gdb/config/mips/nm-riscos.h b/gdb/config/mips/nm-riscos.h
index 7f68b67..f65b7c7 100644
--- a/gdb/config/mips/nm-riscos.h
+++ b/gdb/config/mips/nm-riscos.h
@@ -35,21 +35,21 @@
addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
else if (regno == PS_REGNUM) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
- else if (regno == BADVADDR_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->badvaddr) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
- else if (regno == LO_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->lo) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
- else if (regno == HI_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->hi) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
- else if (regno == CAUSE_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->cause) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
- else if (regno == PC_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->pc) \
addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
- else if (regno < FCRCS_REGNUM) \
+ else if (regno < mips_regnum (current_gdbarch)->fp_control_status) \
addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
- else if (regno == FCRCS_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status) \
addr = PCB_OFFSET(pcb_fpc_csr); \
- else if (regno == FCRIR_REGNUM) \
+ else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) \
addr = PCB_OFFSET(pcb_fpc_eir); \
else \
addr = 0;
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index 5faf7e5..f1fbc2b 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -24,14 +24,6 @@
/* Redefine register numbers for SGI. */
#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
/* Initializer for an array of names for registers 32 and above.
There should be NUM_REGS-32 strings in this initializer. */
@@ -44,22 +36,6 @@
"pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
}
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
/* Offsets for register values in _sigtramp frame.
sigcontext is immediately above the _sigtramp frame on Irix. */
#define SIGFRAME_BASE 0x0
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index bf4842a..3da7b86 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -25,14 +25,6 @@
/* Redefine register numbers for SGI. */
#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
/* Initializer for an array of names for registers 32 and above.
There should be NUM_REGS-32 strings in this initializer. */
@@ -45,22 +37,6 @@
"pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
}
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
/* The signal handler trampoline is called _sigtramp. */
#undef IN_SIGTRAMP
#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 331ab09..a48e0bd 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -75,15 +75,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define SP_REGNUM 29 /* Contains address of top of stack */
#define RA_REGNUM 31 /* Contains return address value */
#define PS_REGNUM 32 /* Contains processor status */
-#define HI_REGNUM 34 /* Multiple/divide temp */
-#define LO_REGNUM 33 /* ... */
-#define BADVADDR_REGNUM 35 /* bad vaddr for addressing exception */
-#define CAUSE_REGNUM 36 /* describes last exception */
-#define PC_REGNUM 37 /* Contains program counter */
-#define FP0_REGNUM 38 /* Floating point register 0 (single float) */
-#define FPA0_REGNUM (FP0_REGNUM+12) /* First float argument register */
-#define FCRCS_REGNUM 70 /* FP control/status */
-#define FCRIR_REGNUM 71 /* FP implementation/revision */
#define UNUSED_REGNUM 73 /* Never used, FIXME */
#define FIRST_EMBED_REGNUM 74 /* First CP0 register for embedded use */
#define PRID_REGNUM 89 /* Processor ID */