diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-06-02 15:00:43 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-06-02 15:00:43 +0000 |
commit | c7cebfa32ccb9b7485b7ddc78431c1064254f62a (patch) | |
tree | 2fb4e6020d8667dcb2bd2ac013170ac354269ae8 /sim/mips/gencode.c | |
parent | e08eb976ab377f8c5eab2e30fa8c6ec73e71bc15 (diff) | |
download | gdb-c7cebfa32ccb9b7485b7ddc78431c1064254f62a.zip gdb-c7cebfa32ccb9b7485b7ddc78431c1064254f62a.tar.gz gdb-c7cebfa32ccb9b7485b7ddc78431c1064254f62a.tar.bz2 |
o Fix padd insn
o Take an interrupt when an int event occures.
Diffstat (limited to 'sim/mips/gencode.c')
-rw-r--r-- | sim/mips/gencode.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index bdd8802..57e7891 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; } |