diff options
Diffstat (limited to 'sim/mips/gencode.c')
-rw-r--r-- | sim/mips/gencode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index 4f2044a..e264b0a 100644 --- a/sim/mips/gencode.c +++ b/sim/mips/gencode.c @@ -3320,8 +3320,9 @@ build_instruction (doisa, features, mips16, insn) prodtype, (notsigned ? "WORD64LO" : "SIGNEXTEND"), (notsigned ? "" : ",32"), prodtype, (notsigned ? "WORD64LO" : "SIGNEXTEND"), (notsigned ? "" : ",32") ); - printf("GPR[destreg] = LO%s = SIGNEXTEND(prod,32);\n", pipeline ); + printf("LO%s = SIGNEXTEND(prod,32);\n", pipeline ); printf("HI%s = SIGNEXTEND( WORD64HI(prod), 32);\n", pipeline ); + printf("if( destreg != 0 ) GPR[destreg] = LO%s;\n", pipeline ); break; } |