rm -f *.o ${ADD_FILES} *~
rm -f version.c
rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
- rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
+ rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c
rm -f reg-ppc.c reg-sh.c reg-spu.c reg-x86-64.c reg-i386-linux.c
- rm -f reg-cris.c reg-crisv32.c reg-x86-64-linux.c reg-mips64.c
- rm -f arm-with-iwmmxt.c
+ rm -f reg-cris.c reg-crisv32.c reg-x86-64-linux.c
+ rm -f arm-with-iwmmxt.c mips-linux.c mips64-linux.c
rm -f xml-builtin.c stamp-xml target.xml
maintainer-clean realclean distclean: clean
reg-m68k.o : reg-m68k.c $(regdef_h)
reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
-reg-mips.o : reg-mips.c $(regdef_h)
-reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
- sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
-reg-mips64.o : reg-mips64.c $(regdef_h)
-reg-mips64.c : $(srcdir)/../regformats/reg-mips64.dat $(regdat_sh)
- sh $(regdat_sh) $(srcdir)/../regformats/reg-mips64.dat reg-mips64.c
+mips-linux.o : mips-linux.c $(regdef_h)
+mips-linux.c : $(srcdir)/../regformats/mips-linux.dat $(regdat_sh)
+ sh $(regdat_sh) $(srcdir)/../regformats/mips-linux.dat mips-linux.c
+mips64-linux.o : mips64-linux.c $(regdef_h)
+mips64-linux.c : $(srcdir)/../regformats/mips64-linux.dat $(regdat_sh)
+ sh $(regdat_sh) $(srcdir)/../regformats/mips64-linux.dat mips64-linux.c
reg-ppc.o : reg-ppc.c $(regdef_h)
reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
#include <sys/reg.h>
#endif
-#define mips_num_regs 90
+#define mips_num_regs 73
#include <asm/ptrace.h>
/* Return the ptrace ``address'' of register REGNO. */
-/* Matches mips_generic32_regs */
static int mips_regmap[] = {
- 0, 1, 2, 3, 4, 5, 6, 7,
+ -1, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
FPR_BASE + 28, FPR_BASE + 29, FPR_BASE + 30, FPR_BASE + 31,
FPC_CSR, FPC_EIR,
- -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
+ 0
};
/* From mips-linux-nat.c. */
if (mips_regmap[regno] == -1)
return 1;
- if (find_regno ("zero") == regno)
+ if (find_regno ("r0") == regno)
return 1;
return 0;
if (mips_regmap[regno] == -1)
return 1;
- if (find_regno ("zero") == regno)
+ if (find_regno ("r0") == regno)
return 1;
if (find_regno ("cause") == regno)
return 1;
- if (find_regno ("bad") == regno)
+ if (find_regno ("badvaddr") == regno)
return 1;
if (find_regno ("fir") == regno)
mips_reinsert_addr ()
{
union mips_register ra;
- collect_register_by_name ("ra", ra.buf);
+ collect_register_by_name ("r31", ra.buf);
return register_size (0) == 4 ? ra.reg32 : ra.reg64;
}
use_64bit = (register_size (0) == 8);
- for (i = 0; i < 32; i++)
+ for (i = 1; i < 32; i++)
mips_collect_register (use_64bit, i, regset + i);
mips_collect_register (use_64bit, find_regno ("lo"), regset + 32);
mips_collect_register (use_64bit, find_regno ("hi"), regset + 33);
mips_collect_register (use_64bit, find_regno ("pc"), regset + 34);
- mips_collect_register (use_64bit, find_regno ("bad"), regset + 35);
- mips_collect_register (use_64bit, find_regno ("sr"), regset + 36);
+ mips_collect_register (use_64bit, find_regno ("badvaddr"), regset + 35);
+ mips_collect_register (use_64bit, find_regno ("status"), regset + 36);
mips_collect_register (use_64bit, find_regno ("cause"), regset + 37);
+
+ mips_collect_register (use_64bit, find_regno ("restart"), regset + 0);
}
static void
mips_supply_register (use_64bit, find_regno ("lo"), regset + 32);
mips_supply_register (use_64bit, find_regno ("hi"), regset + 33);
mips_supply_register (use_64bit, find_regno ("pc"), regset + 34);
- mips_supply_register (use_64bit, find_regno ("bad"), regset + 35);
- mips_supply_register (use_64bit, find_regno ("sr"), regset + 36);
+ mips_supply_register (use_64bit, find_regno ("badvaddr"), regset + 35);
+ mips_supply_register (use_64bit, find_regno ("status"), regset + 36);
mips_supply_register (use_64bit, find_regno ("cause"), regset + 37);
+
+ mips_supply_register (use_64bit, find_regno ("restart"), regset + 0);
}
static void
collect_register (first_fp + i,
regset[i & ~1].buf + 4 * (big_endian != (i & 1)));
- mips_collect_register_32bit (use_64bit, find_regno ("fsr"), regset[32].buf);
+ mips_collect_register_32bit (use_64bit, find_regno ("fcsr"), regset[32].buf);
mips_collect_register_32bit (use_64bit, find_regno ("fir"),
regset[32].buf + 4);
}
supply_register (first_fp + i,
regset[i & ~1].buf + 4 * (big_endian != (i & 1)));
- mips_supply_register_32bit (use_64bit, find_regno ("fsr"), regset[32].buf);
+ mips_supply_register_32bit (use_64bit, find_regno ("fcsr"), regset[32].buf);
mips_supply_register_32bit (use_64bit, find_regno ("fir"),
regset[32].buf + 4);
}