From: Andrew Cagney Date: Mon, 2 Jun 1997 15:00:43 +0000 (+0000) Subject: o Fix padd insn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7cebfa32ccb9b7485b7ddc78431c1064254f62a;p=binutils-gdb.git o Fix padd insn o Take an interrupt when an int event occures. --- diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index bdd88028fac..57e789153ff 100644 --- a/sim/mips/gencode.c +++ b/sim/mips/gencode.c @@ -3359,11 +3359,13 @@ build_instruction (doisa, features, mips16, insn) char* maximum; char* minimum; char* signedness; + char* signletter; if ( insn->flags & UNSIGNED ) { tmptype = type_for_data_len( insn ); signedness = "unsigned"; + signletter = "U"; maximum = umax_for_data_len( insn ); minimum = 0; } @@ -3371,29 +3373,31 @@ build_instruction (doisa, features, mips16, insn) { tmptype = type_for_data_len( insn ); signedness = ""; - maximum = 0; - minimum = 0; + signletter = "S"; + maximum = max_for_data_len( insn ); + minimum = min_for_data_len( insn ); } else { tmptype = type_for_data_len( insn ); signedness = ""; - maximum = max_for_data_len( insn ); - minimum = min_for_data_len( insn ); + signletter = "S"; + maximum = 0; + minimum = 0; } printf("int i;\n"); printf("for(i=0;i<%sS_IN_MMI_REGS;i++)\n", name ); printf(" {\n"); - printf(" %s %s r = RS_S%s(i) %s RT_S%s(i);\n", signedness, tmptype, letter, op, letter ); + printf(" %s %s r = RS_%s%s(i) %s RT_%s%s(i);\n", signedness, tmptype, signletter, letter, op, signletter, letter ); if ( maximum ) { - printf(" if (r > %s) GPR_S%s(destreg,i) = %s;\n", maximum, letter, maximum ); + printf(" if (r > %s) GPR_%s%s(destreg,i) = %s;\n", maximum, signletter, letter, maximum ); if ( minimum ) - printf(" else if (r < %s) GPR_S%s(destreg,i) = %s;\n", minimum, letter, minimum ); + printf(" else if (r < %s) GPR_%s%s(destreg,i) = %s;\n", minimum, signletter, letter, minimum ); printf(" else "); } - printf("GPR_S%s(destreg,i) = r;\n", letter ); + printf("GPR_%s%s(destreg,i) = r;\n", signletter, letter ); printf(" }\n"); break; }