Add handling for 3900's SDBBP, DERET, and RFE insns.

* gencode.c (SDBBP,DERET): Added (3900) insns.
	(RFE): Turn on for 3900.
	* interp.c (DebugBreakPoint,DEPC,Debug,Debug_*): Added.
	(dsstate): Made global.
	(SUBTARGET_R3900): Added.
	(CANCELDELAYSLOT): New.
	(SignalException): Ignore SystemCall rather than ignore and
	terminate.  Add DebugBreakPoint handling.
	(decode_coproc): New insns RFE, DERET; and new registers Debug
	and DEPC protected by SUBTARGET_R3900.
	(sim_engine_run): Use CANCELDELAYSLOT rather than clearing
	bits explicitly.
	* Makefile.in,configure.in: Add mips subtarget option.
	* configure: Update.
This commit is contained in:
Gavin Romig-Koch 1997-09-20 18:22:22 +00:00
parent 20b32dc554
commit c476ac5560
2 changed files with 15 additions and 7 deletions

View File

@ -27,6 +27,14 @@ case "${target}" in
esac
AC_SUBST(SIMCONF)
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
# end-sanitize-tx19
*) SIM_SUBTARGET="";;
esac
AC_SUBST(SIM_SUBTARGET)
AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h)
AC_CHECK_LIB(m, fabs)
AC_CHECK_FUNCS(aint anint sqrt)

View File

@ -290,6 +290,7 @@ typedef enum {
SHIFT, /* perform a logical or arithmetic shift */
TRAP, /* system exception generation */
BREAK, /* system breakpoint exception generation */
SDBBP, /* software debug breakpoint exception generation */
SYSCALL, /* system exception generation */
SYNC, /* system cache control */
DECODE, /* co-processor instruction */
@ -823,6 +824,7 @@ struct instruction MIPS_DECODE[] = {
{"SCD", 3,"111100sssssgggggeeeeeeeeeeeeeeee",NORMAL, STORE, (DOUBLEWORD | ATOMIC)},
{"SD", 3,"111111sssssgggggeeeeeeeeeeeeeeee",NORMAL, STORE, (DOUBLEWORD)},
{"SDC1", 2,"111101sssssttttteeeeeeeeeeeeeeee",NORMAL, STORE, (DOUBLEWORD | COPROC)},
{"SDBBP", T3,"000000????????????????????001110",SPECIAL,SDBBP, (NOARG)},
{"SDC2", 2,"111110sssssttttteeeeeeeeeeeeeeee",NORMAL, STORE, (DOUBLEWORD | COPROC)},
{"SDL", 3,"101100sssssgggggyyyyyyyyyyyyyyyy",NORMAL, STORE, (DOUBLEWORD | LEFT)},
{"SDR", 3,"101101sssssgggggyyyyyyyyyyyyyyyy",NORMAL, STORE, (DOUBLEWORD | RIGHT)},
@ -941,6 +943,7 @@ static const struct instruction MIPS16_DECODE[] = {
{"NOT", 1, "11101dddyyy01111Z", RR, OR, NOT },
{"OR", 1, "11101wwwyyy01101", RR, OR, NONE },
{"SB", 1, "11000xxxyyy55555", RRI, STORE, BYTE },
{"SDBBP", T3, "11100??????00001", RR, SDBBP, NOARG },
{"SD", 3, "01111xxxyyyDDDDD", RRI, STORE, DOUBLEWORD },
{"SDSP", 3, "11111001yyyDDDDDs", RI64, STORE, DOUBLEWORD },
{"SDRASP", 3, "11111010CCCCCCCCsQ", I64, STORE, DOUBLEWORD },
@ -2418,6 +2421,10 @@ build_instruction (doisa, features, mips16, insn)
printf(" SignalException(BreakPoint,instruction);\n");
break ;
case SDBBP:
printf(" SignalException(DebugBreakPoint,instruction);\n");
break ;
case TRAP:
{
int boolNOT = (insn->flags & NOT);
@ -4493,10 +4500,3 @@ my_strtoul(nptr, endptr, base)
/*---------------------------------------------------------------------------*/
/*> EOF gencode.c <*/