unsigned int SingleCPDO(const unsigned int opcode)

{

   FPA11 *fpa11 = GET_FPA11();

   float32 rFm, rFn = 0;

   unsigned int Fd, Fm, Fn, nRc = 1;



   Fm = getFm(opcode);

   if (CONSTANT_FM(opcode))

   {

     rFm = getSingleConstant(Fm);

   }

   else

   {

     switch (fpa11->fType[Fm])

     {

        case typeSingle:

          rFm = fpa11->fpreg[Fm].fSingle;

        break;



        default: return 0;

     }

   }



   if (!MONADIC_INSTRUCTION(opcode))

   {

      Fn = getFn(opcode);

      switch (fpa11->fType[Fn])

      {

        case typeSingle:

          rFn = fpa11->fpreg[Fn].fSingle;

        break;



        default: return 0;

      }

   }



   Fd = getFd(opcode);

   switch (opcode & MASK_ARITHMETIC_OPCODE)

   {

      /* dyadic opcodes */

      case ADF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_add(rFn,rFm, &fpa11->fp_status);

      break;



      case MUF_CODE:

      case FML_CODE:

        fpa11->fpreg[Fd].fSingle = float32_mul(rFn,rFm, &fpa11->fp_status);

      break;



      case SUF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sub(rFn,rFm, &fpa11->fp_status);

      break;



      case RSF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sub(rFm,rFn, &fpa11->fp_status);

      break;



      case DVF_CODE:

      case FDV_CODE:

         fpa11->fpreg[Fd].fSingle = float32_div(rFn,rFm, &fpa11->fp_status);

      break;



      case RDF_CODE:

      case FRD_CODE:

         fpa11->fpreg[Fd].fSingle = float32_div(rFm,rFn, &fpa11->fp_status);

      break;



#if 0

      case POW_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pow(rFn,rFm);

      break;



      case RPW_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pow(rFm,rFn);

      break;

#endif



      case RMF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_rem(rFn,rFm, &fpa11->fp_status);

      break;



#if 0

      case POL_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pol(rFn,rFm);

      break;

#endif



      /* monadic opcodes */

      case MVF_CODE:

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case MNF_CODE:

         rFm ^= 0x80000000;

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case ABS_CODE:

         rFm &= 0x7fffffff;

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case RND_CODE:

      case URD_CODE:

         fpa11->fpreg[Fd].fSingle = float32_round_to_int(rFm, &fpa11->fp_status);

      break;



      case SQT_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sqrt(rFm, &fpa11->fp_status);

      break;



#if 0

      case LOG_CODE:

         fpa11->fpreg[Fd].fSingle = float32_log(rFm);

      break;



      case LGN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_ln(rFm);

      break;



      case EXP_CODE:

         fpa11->fpreg[Fd].fSingle = float32_exp(rFm);

      break;



      case SIN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sin(rFm);

      break;



      case COS_CODE:

         fpa11->fpreg[Fd].fSingle = float32_cos(rFm);

      break;



      case TAN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_tan(rFm);

      break;



      case ASN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arcsin(rFm);

      break;



      case ACS_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arccos(rFm);

      break;



      case ATN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arctan(rFm);

      break;

#endif



      case NRM_CODE:

      break;



      default:

      {

        nRc = 0;

      }

   }



   if (0 != nRc) fpa11->fType[Fd] = typeSingle;

   return nRc;

}

unsigned int SingleCPDO(const unsigned int opcode)

{

   FPA11 *fpa11 = GET_FPA11();

   float32 rFm, rFn = 0;

   unsigned int Fd, Fm, Fn, nRc = 1;



   Fm = getFm(opcode);

   if (CONSTANT_FM(opcode))

   {

     rFm = getSingleConstant(Fm);

   }

   else

   {

     switch (fpa11->fType[Fm])

     {

        case typeSingle:

          rFm = fpa11->fpreg[Fm].fSingle;

        break;



        default: return 0;

     }

   }



   if (!MONADIC_INSTRUCTION(opcode))

   {

      Fn = getFn(opcode);

      switch (fpa11->fType[Fn])

      {

        case typeSingle:

          rFn = fpa11->fpreg[Fn].fSingle;

        break;



        default: return 0;

      }

   }



   Fd = getFd(opcode);

   switch (opcode & MASK_ARITHMETIC_OPCODE)

   {

      

      case ADF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_add(rFn,rFm, &fpa11->fp_status);

      break;



      case MUF_CODE:

      case FML_CODE:

        fpa11->fpreg[Fd].fSingle = float32_mul(rFn,rFm, &fpa11->fp_status);

      break;



      case SUF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sub(rFn,rFm, &fpa11->fp_status);

      break;



      case RSF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sub(rFm,rFn, &fpa11->fp_status);

      break;



      case DVF_CODE:

      case FDV_CODE:

         fpa11->fpreg[Fd].fSingle = float32_div(rFn,rFm, &fpa11->fp_status);

      break;



      case RDF_CODE:

      case FRD_CODE:

         fpa11->fpreg[Fd].fSingle = float32_div(rFm,rFn, &fpa11->fp_status);

      break;



#if 0

      case POW_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pow(rFn,rFm);

      break;



      case RPW_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pow(rFm,rFn);

      break;

#endif



      case RMF_CODE:

         fpa11->fpreg[Fd].fSingle = float32_rem(rFn,rFm, &fpa11->fp_status);

      break;



#if 0

      case POL_CODE:

         fpa11->fpreg[Fd].fSingle = float32_pol(rFn,rFm);

      break;

#endif



      

      case MVF_CODE:

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case MNF_CODE:

         rFm ^= 0x80000000;

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case ABS_CODE:

         rFm &= 0x7fffffff;

         fpa11->fpreg[Fd].fSingle = rFm;

      break;



      case RND_CODE:

      case URD_CODE:

         fpa11->fpreg[Fd].fSingle = float32_round_to_int(rFm, &fpa11->fp_status);

      break;



      case SQT_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sqrt(rFm, &fpa11->fp_status);

      break;



#if 0

      case LOG_CODE:

         fpa11->fpreg[Fd].fSingle = float32_log(rFm);

      break;



      case LGN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_ln(rFm);

      break;



      case EXP_CODE:

         fpa11->fpreg[Fd].fSingle = float32_exp(rFm);

      break;



      case SIN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_sin(rFm);

      break;



      case COS_CODE:

         fpa11->fpreg[Fd].fSingle = float32_cos(rFm);

      break;



      case TAN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_tan(rFm);

      break;



      case ASN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arcsin(rFm);

      break;



      case ACS_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arccos(rFm);

      break;



      case ATN_CODE:

         fpa11->fpreg[Fd].fSingle = float32_arctan(rFm);

      break;

#endif



      case NRM_CODE:

      break;



      default:

      {

        nRc = 0;

      }

   }



   if (0 != nRc) fpa11->fType[Fd] = typeSingle;

   return nRc;

}

unsigned int FUNC_0(const unsigned int VAR_0)

{

   FPA11 *fpa11 = GET_FPA11();

   float32 rFm, rFn = 0;

   unsigned int VAR_1, VAR_2, VAR_3, VAR_4 = 1;



   VAR_2 = getFm(VAR_0);

   if (CONSTANT_FM(VAR_0))

   {

     rFm = getSingleConstant(VAR_2);

   }

   else

   {

     switch (fpa11->fType[VAR_2])

     {

        case typeSingle:

          rFm = fpa11->fpreg[VAR_2].fSingle;

        break;



        default: return 0;

     }

   }



   if (!MONADIC_INSTRUCTION(VAR_0))

   {

      VAR_3 = getFn(VAR_0);

      switch (fpa11->fType[VAR_3])

      {

        case typeSingle:

          rFn = fpa11->fpreg[VAR_3].fSingle;

        break;



        default: return 0;

      }

   }



   VAR_1 = getFd(VAR_0);

   switch (VAR_0 & MASK_ARITHMETIC_OPCODE)

   {

      

      case ADF_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_add(rFn,rFm, &fpa11->fp_status);

      break;



      case MUF_CODE:

      case FML_CODE:

        fpa11->fpreg[VAR_1].fSingle = float32_mul(rFn,rFm, &fpa11->fp_status);

      break;



      case SUF_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_sub(rFn,rFm, &fpa11->fp_status);

      break;



      case RSF_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_sub(rFm,rFn, &fpa11->fp_status);

      break;



      case DVF_CODE:

      case FDV_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_div(rFn,rFm, &fpa11->fp_status);

      break;



      case RDF_CODE:

      case FRD_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_div(rFm,rFn, &fpa11->fp_status);

      break;



#if 0

      case POW_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_pow(rFn,rFm);

      break;



      case RPW_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_pow(rFm,rFn);

      break;

#endif



      case RMF_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_rem(rFn,rFm, &fpa11->fp_status);

      break;



#if 0

      case POL_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_pol(rFn,rFm);

      break;

#endif



      

      case MVF_CODE:

         fpa11->fpreg[VAR_1].fSingle = rFm;

      break;



      case MNF_CODE:

         rFm ^= 0x80000000;

         fpa11->fpreg[VAR_1].fSingle = rFm;

      break;



      case ABS_CODE:

         rFm &= 0x7fffffff;

         fpa11->fpreg[VAR_1].fSingle = rFm;

      break;



      case RND_CODE:

      case URD_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_round_to_int(rFm, &fpa11->fp_status);

      break;



      case SQT_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_sqrt(rFm, &fpa11->fp_status);

      break;



#if 0

      case LOG_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_log(rFm);

      break;



      case LGN_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_ln(rFm);

      break;



      case EXP_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_exp(rFm);

      break;



      case SIN_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_sin(rFm);

      break;



      case COS_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_cos(rFm);

      break;



      case TAN_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_tan(rFm);

      break;



      case ASN_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_arcsin(rFm);

      break;



      case ACS_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_arccos(rFm);

      break;



      case ATN_CODE:

         fpa11->fpreg[VAR_1].fSingle = float32_arctan(rFm);

      break;

#endif



      case NRM_CODE:

      break;



      default:

      {

        VAR_4 = 0;

      }

   }



   if (0 != VAR_4) fpa11->fType[VAR_1] = typeSingle;

   return VAR_4;

}

unsigned int FUNC_0(const unsigned int VAR_0)
{ FPA11 *fpa11 = GET_FPA11(); float32 rFm, rFn = 0; unsigned int VAR_1, VAR_2, VAR_3, VAR_4 = 1; VAR_2 = getFm(VAR_0); if (CONSTANT_FM(VAR_0))
{ rFm = getSingleConstant(VAR_2); } else
{ switch (fpa11->fType[VAR_2])
{ case typeSingle:
rFm = fpa11->fpreg[VAR_2].fSingle; break; default: return 0; } } if (!MONADIC_INSTRUCTION(VAR_0))
{ VAR_3 = getFn(VAR_0); switch (fpa11->fType[VAR_3])
{ case typeSingle:
rFn = fpa11->fpreg[VAR_3].fSingle; break; default: return 0; } } VAR_1 = getFd(VAR_0); switch (VAR_0 & MASK_ARITHMETIC_OPCODE)
{ case ADF_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_add(rFn,rFm, &fpa11->fp_status); break; case MUF_CODE:
case FML_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_mul(rFn,rFm, &fpa11->fp_status); break; case SUF_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_sub(rFn,rFm, &fpa11->fp_status); break; case RSF_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_sub(rFm,rFn, &fpa11->fp_status); break; case DVF_CODE:
case FDV_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_div(rFn,rFm, &fpa11->fp_status); break; case RDF_CODE:
case FRD_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_div(rFm,rFn, &fpa11->fp_status); break; #if 0
case POW_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_pow(rFn,rFm); break; case RPW_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_pow(rFm,rFn); break; #endif
case RMF_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_rem(rFn,rFm, &fpa11->fp_status); break; #if 0
case POL_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_pol(rFn,rFm); break; #endif
case MVF_CODE:
fpa11->fpreg[VAR_1].fSingle = rFm; break; case MNF_CODE:
rFm ^= 0x80000000; fpa11->fpreg[VAR_1].fSingle = rFm; break; case ABS_CODE:
rFm &= 0x7fffffff; fpa11->fpreg[VAR_1].fSingle = rFm; break; case RND_CODE:
case URD_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_round_to_int(rFm, &fpa11->fp_status); break; case SQT_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_sqrt(rFm, &fpa11->fp_status); break; #if 0
case LOG_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_log(rFm); break; case LGN_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_ln(rFm); break; case EXP_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_exp(rFm); break; case SIN_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_sin(rFm); break; case COS_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_cos(rFm); break; case TAN_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_tan(rFm); break; case ASN_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_arcsin(rFm); break; case ACS_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_arccos(rFm); break; case ATN_CODE:
fpa11->fpreg[VAR_1].fSingle = float32_arctan(rFm); break; #endif
case NRM_CODE:
break; default:
{ VAR_4 = 0; } } if (0 != VAR_4) fpa11->fType[VAR_1] = typeSingle; return VAR_4; }