* 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.
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)
#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 */
#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)
(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));
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;
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;
(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));
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;
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;
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)
/* 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
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);
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,
(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);
/* 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)],
/* 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)],