Commit d65604fb authored by Russell King's avatar Russell King

[ARM] NWFPE 2: Take advantage of the CPDO functions behaviour.

SingleCPDO, DoubleCPDO and ExtendedCPDO always set the destination
register type to their operating type (single, double, extended
respectively) when they complete successfully (nRc != 0).  This
means that we know what size result will be generated, and we don't
have to fetch it from the fType array.

In fact, since we know "nType" will be the type of the operand,
we don't even need to calculate value of Fd unless we need to
convert the result to the destination type.
parent 4737ce4e
...@@ -67,13 +67,16 @@ unsigned int EmulateCPDO(const unsigned int opcode) ...@@ -67,13 +67,16 @@ unsigned int EmulateCPDO(const unsigned int opcode)
default : nRc = 0; default : nRc = 0;
} }
/* If the operation succeeded, check to see if the result in the /* The CPDO functions always set the destination type
destination register is the correct size. If not force it to be the same as their working size. */
to be. */
Fd = getFd(opcode);
nType = fpa11->fType[Fd];
if ((0 != nRc) && (nDest != nType)) if ((0 != nRc) && (nDest != nType))
{ {
/* If the operation succeeded, check to see if the result in the
destination register is the correct size. If not force it
to be. */
Fd = getFd(opcode);
switch (nDest) switch (nDest)
{ {
case typeSingle: case typeSingle:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment