aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/gencode.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-12-11 00:11:04 +0000
committerJeff Law <law@redhat.com>1997-12-11 00:11:04 +0000
commit23850e9219db76f82680f5162c33a40571e6f56c (patch)
tree96d87938509598dad2de83eb3aa17354a09f3320 /sim/mips/gencode.c
parent70a46de24e0e3c13ab4eb6b1f02be8a7c8d75502 (diff)
downloadbinutils-23850e9219db76f82680f5162c33a40571e6f56c.zip
binutils-23850e9219db76f82680f5162c33a40571e6f56c.tar.gz
binutils-23850e9219db76f82680f5162c33a40571e6f56c.tar.bz2
* mips.igen (MSUB): Fix to work like MADD.
* gencode.c (MSUB): Similarly.
Diffstat (limited to 'sim/mips/gencode.c')
-rw-r--r--sim/mips/gencode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c
index 7feaef2..44fac70 100644
--- a/sim/mips/gencode.c
+++ b/sim/mips/gencode.c
@@ -3585,7 +3585,12 @@ build_instruction (doisa, features, mips16, insn)
fprintf(stderr,"Error: Invalid data size %d for FPSUB operation\n",GETDATASIZEINSN(insn));
exit(1);
}
- printf(" StoreFPR(destreg,%s,%s(Sub(Multiply(ValueFPR(fs,%s),ValueFPR(ft,%s),%s),ValueFPR(fr,%s),%s),%s));\n",type,((insn->flags & NOT) ? "Negate" : ""),type,type,type,type,type,type);
+ if (insn->flags & NOT)
+ printf (" StoreFPR(destreg,%s,Negate(Sub(Multiply(ValueFPR(fs,%s),ValueFPR(ft,%s),%s),ValueFPR(fr,%s),%s),%s));\n",
+ type, type, type, type, type, type, type);
+ else
+ printf (" StoreFPR(destreg,%s,Sub(Multiply(ValueFPR(fs,%s),ValueFPR(ft,%s),%s),ValueFPR(fr,%s),%s));\n",
+ type, type, type, type, type, type);
} else {
printf(" if ((format != fmt_single) && (format != fmt_double))\n");
printf(" SignalException(ReservedInstruction,instruction);\n");