Commit 92c6da54 authored by Russell King's avatar Russell King

[ARM] NWFPE 5: Eliminate use of Fd

Slightly better performance can be obtained by eliminating Fd and
calculating it after the math operation.
parent cb56b360
......@@ -30,7 +30,7 @@ unsigned int EmulateCPDO(const unsigned int opcode)
{
FPA11 *fpa11 = GET_FPA11();
FPREG *rFd;
unsigned int Fd, nType, nDest, nRc = 1;
unsigned int nType, nDest, nRc;
//printk("EmulateCPDO(0x%08x)\n",opcode);
......@@ -60,8 +60,7 @@ unsigned int EmulateCPDO(const unsigned int opcode)
}
}
Fd = getFd(opcode);
rFd = &fpa11->fpreg[Fd];
rFd = &fpa11->fpreg[getFd(opcode)];
switch (nType)
{
......@@ -74,12 +73,16 @@ unsigned int EmulateCPDO(const unsigned int opcode)
/* The CPDO functions used to always set the destination type
to be the same as their working size. */
if ((0 != nRc) && (nDest != nType))
if (nRc != 0)
{
/* If the operation succeeded, check to see if the result in the
destination register is the correct size. If not force it
to be. */
fpa11->fType[getFd(opcode)] = nDest;
if (nDest != nType)
{
switch (nDest)
{
case typeSingle:
......@@ -110,10 +113,6 @@ unsigned int EmulateCPDO(const unsigned int opcode)
break;
}
}
if (nRc != 0)
{
fpa11->fType[Fd] = nDest;
}
return nRc;
......
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