mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-19 14:34:07 +08:00
2004-10-30 Andrew Cagney <cagney@gnu.org>
* config/mips/tm-mips.h (PS_REGNUM): Delete. * mips-tdep.h (MIPS_PS_REGNUM): Add. * remote-vxmips.c, mipsv4-nat.c, mips-tdep.c: Update. * mips-linux-nat.c: Update.
This commit is contained in:
parent
613e114ff9
commit
24e0595198
@ -1,5 +1,10 @@
|
||||
2004-10-30 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* config/mips/tm-mips.h (PS_REGNUM): Delete.
|
||||
* mips-tdep.h (MIPS_PS_REGNUM): Add.
|
||||
* remote-vxmips.c, mipsv4-nat.c, mips-tdep.c: Update.
|
||||
* mips-linux-nat.c: Update.
|
||||
|
||||
* mips-tdep.h: Add comments on registers.
|
||||
(MIPS_UNUSED_REGNUM): Define.
|
||||
* config/mips/tm-mips.h (ZERO_REGNUM, UNUSED_REGNUM)
|
||||
|
@ -44,7 +44,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
|
||||
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
|
||||
|
||||
#define RA_REGNUM 31 /* Contains return address value */
|
||||
#define PS_REGNUM 32 /* Contains processor status */
|
||||
#define FIRST_EMBED_REGNUM 74 /* First CP0 register for embedded use */
|
||||
#define PRID_REGNUM 89 /* Processor ID */
|
||||
#define LAST_EMBED_REGNUM 89 /* Last one */
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include "mips-tdep.h"
|
||||
|
||||
/* Pseudo registers can not be read. ptrace does not provide a way to
|
||||
read (or set) PS_REGNUM, and there's no point in reading or setting
|
||||
MIPS_ZERO_REGNUM. We also can not set BADVADDR, CAUSE, or FCRIR
|
||||
via ptrace(). */
|
||||
read (or set) MIPS_PS_REGNUM, and there's no point in reading or
|
||||
setting MIPS_ZERO_REGNUM. We also can not set BADVADDR, CAUSE, or
|
||||
FCRIR via ptrace(). */
|
||||
|
||||
int
|
||||
mips_linux_cannot_fetch_register (int regno)
|
||||
|
@ -124,7 +124,7 @@ supply_gregset (elf_gregset_t *gregsetp)
|
||||
(char *)(regp + EF_CP0_EPC));
|
||||
supply_32bit_reg (mips_regnum (current_gdbarch)->badvaddr,
|
||||
(char *)(regp + EF_CP0_BADVADDR));
|
||||
supply_32bit_reg (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
|
||||
supply_32bit_reg (MIPS_PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
|
||||
supply_32bit_reg (mips_regnum (current_gdbarch)->cause,
|
||||
(char *)(regp + EF_CP0_CAUSE));
|
||||
|
||||
@ -152,7 +152,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
|
||||
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
|
||||
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
|
||||
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
|
||||
fill_gregset (gregsetp, PS_REGNUM);
|
||||
fill_gregset (gregsetp, MIPS_PS_REGNUM);
|
||||
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
|
||||
|
||||
return;
|
||||
@ -173,7 +173,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
|
||||
regaddr = EF_CP0_EPC;
|
||||
else if (regno == mips_regnum (current_gdbarch)->badvaddr)
|
||||
regaddr = EF_CP0_BADVADDR;
|
||||
else if (regno == PS_REGNUM)
|
||||
else if (regno == MIPS_PS_REGNUM)
|
||||
regaddr = EF_CP0_STATUS;
|
||||
else if (regno == mips_regnum (current_gdbarch)->cause)
|
||||
regaddr = EF_CP0_CAUSE;
|
||||
@ -402,7 +402,7 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
|
||||
(char *)(regp + MIPS64_EF_CP0_EPC));
|
||||
regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr,
|
||||
(char *)(regp + MIPS64_EF_CP0_BADVADDR));
|
||||
regcache_raw_supply (current_regcache, PS_REGNUM,
|
||||
regcache_raw_supply (current_regcache, MIPS_PS_REGNUM,
|
||||
(char *)(regp + MIPS64_EF_CP0_STATUS));
|
||||
regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
|
||||
(char *)(regp + MIPS64_EF_CP0_CAUSE));
|
||||
@ -431,7 +431,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
|
||||
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
|
||||
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
|
||||
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
|
||||
mips64_fill_gregset (gregsetp, PS_REGNUM);
|
||||
mips64_fill_gregset (gregsetp, MIPS_PS_REGNUM);
|
||||
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
|
||||
|
||||
return;
|
||||
@ -452,7 +452,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
|
||||
regaddr = MIPS64_EF_CP0_EPC;
|
||||
else if (regno == mips_regnum (current_gdbarch)->badvaddr)
|
||||
regaddr = MIPS64_EF_CP0_BADVADDR;
|
||||
else if (regno == PS_REGNUM)
|
||||
else if (regno == MIPS_PS_REGNUM)
|
||||
regaddr = MIPS64_EF_CP0_STATUS;
|
||||
else if (regno == mips_regnum (current_gdbarch)->cause)
|
||||
regaddr = MIPS64_EF_CP0_CAUSE;
|
||||
|
@ -60,7 +60,7 @@ static const struct objfile_data *mips_pdr_data;
|
||||
|
||||
static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum);
|
||||
|
||||
/* A useful bit in the CP0 status register (PS_REGNUM). */
|
||||
/* A useful bit in the CP0 status register (MIPS_PS_REGNUM). */
|
||||
/* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip. */
|
||||
#define ST0_FR (1 << 26)
|
||||
|
||||
@ -386,7 +386,7 @@ mips2_fp_compat (void)
|
||||
/* Otherwise check the FR bit in the status register - it controls
|
||||
the FP compatiblity mode. If it is clear we are in compatibility
|
||||
mode. */
|
||||
if ((read_register (PS_REGNUM) & ST0_FR) == 0)
|
||||
if ((read_register (MIPS_PS_REGNUM) & ST0_FR) == 0)
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
@ -5313,7 +5313,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
|
||||
fprintf_unfiltered (file, "mips_dump_tdep: PROC_REG_MASK = function?\n");
|
||||
fprintf_unfiltered (file, "mips_dump_tdep: PROC_REG_OFFSET = function?\n");
|
||||
fprintf_unfiltered (file, "mips_dump_tdep: PROC_SYMBOL = function?\n");
|
||||
fprintf_unfiltered (file, "mips_dump_tdep: PS_REGNUM = %d\n", PS_REGNUM);
|
||||
#ifdef SAVED_BYTES
|
||||
fprintf_unfiltered (file,
|
||||
"mips_dump_tdep: SAVED_BYTES = %d\n", SAVED_BYTES);
|
||||
|
@ -77,6 +77,7 @@ enum
|
||||
MIPS_T9_REGNUM = 25, /* Contains address of callee in PIC. */
|
||||
MIPS_SP_REGNUM = 29,
|
||||
MIPS_RA_REGNUM = 31,
|
||||
MIPS_PS_REGNUM = 32, /* Contains processor status. */
|
||||
MIPS_EMBED_LO_REGNUM = 33,
|
||||
MIPS_EMBED_HI_REGNUM = 34,
|
||||
MIPS_EMBED_BADVADDR_REGNUM = 35,
|
||||
|
@ -63,7 +63,7 @@ supply_gregset (gregset_t *gregsetp)
|
||||
(char *) (regp + CXT_CAUSE));
|
||||
|
||||
/* Fill inaccessible registers with zero. */
|
||||
regcache_raw_supply (current_regcache, PS_REGNUM, zerobuf);
|
||||
regcache_raw_supply (current_regcache, MIPS_PS_REGNUM, zerobuf);
|
||||
regcache_raw_supply (current_regcache,
|
||||
mips_regnum (current_gdbarch)->badvaddr,
|
||||
zerobuf);
|
||||
|
@ -108,7 +108,7 @@ vx_read_register (int regno)
|
||||
|
||||
/* Copy SR, LO, HI, and PC. */
|
||||
|
||||
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
|
||||
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (MIPS_PS_REGNUM)],
|
||||
&mips_greg_packet[MIPS_R_SR],
|
||||
MIPS_GREG_SIZE);
|
||||
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
|
||||
@ -173,7 +173,7 @@ vx_write_register (int regno)
|
||||
/* Copy SR, LO, HI, and PC. */
|
||||
|
||||
memcpy (&mips_greg_packet[MIPS_R_SR],
|
||||
&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
|
||||
&deprecated_registers[DEPRECATED_REGISTER_BYTE (MIPS_PS_REGNUM)],
|
||||
MIPS_GREG_SIZE);
|
||||
memcpy (&mips_greg_packet[MIPS_R_LO],
|
||||
&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
|
||||
|
Loading…
Reference in New Issue
Block a user