[patch][commit] Operation methods in cgen_fp_ops

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[patch][commit] Operation methods in cgen_fp_ops

Dave Brolley-2
Hi,

I've committed the attached patch which changes all of the operation
methods in cgen_fp_ops to accept 'const cgen_fpu*' where they previously
accepted 'cgen_fpu*'. This is necessary when these operations are used
in a hardware getter expression. These methods are generated as 'const'
by CGEN and thus, the pointer to the fpu passed is also const.

Tested on the internal port which exposed the problem. No other ports
currently use cgen_fpu.

Dave

2006-06-14  Dave Brolley  <[hidden email]>

        * cgen-fpu.h (cgen_fp_ops): All operations now take
        const cgen_fpu*.
        * cgen-fpu.cxx: Likewise.


Index: sid/component/cgen-cpu/cgen-fpu.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/cgen-fpu.cxx,v
retrieving revision 1.2
diff -c -p -r1.2 cgen-fpu.cxx
*** sid/component/cgen-cpu/cgen-fpu.cxx 10 May 2006 21:15:35 -0000 1.2
--- sid/component/cgen-cpu/cgen-fpu.cxx 14 Jun 2006 18:57:39 -0000
*************** namespace cgen
*** 14,20 ****
  {
  /* basic SF ops */
  SF
! cgen_fp_ops::addsf (cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) + fp (y);
    check_result (fpu, r);
--- 14,20 ----
  {
  /* basic SF ops */
  SF
! cgen_fp_ops::addsf (const cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) + fp (y);
    check_result (fpu, r);
*************** cgen_fp_ops::addsf (cgen_fpu* fpu, SF x,
*** 23,29 ****
    return tmp;
  }
 
! SF cgen_fp_ops::subsf (cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) - fp (y);
    check_result (fpu, r);
--- 23,29 ----
    return tmp;
  }
 
! SF cgen_fp_ops::subsf (const cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) - fp (y);
    check_result (fpu, r);
*************** SF cgen_fp_ops::subsf (cgen_fpu* fpu, SF
*** 32,38 ****
    return tmp;
  }
 
! SF cgen_fp_ops::mulsf (cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) * fp (y);
    check_result (fpu, r);
--- 32,38 ----
    return tmp;
  }
 
! SF cgen_fp_ops::mulsf (const cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) * fp (y);
    check_result (fpu, r);
*************** SF cgen_fp_ops::mulsf (cgen_fpu* fpu, SF
*** 41,47 ****
    return tmp;
  }
 
! SF cgen_fp_ops::divsf (cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) / fp (y);
    check_result (fpu, r);
--- 41,47 ----
    return tmp;
  }
 
! SF cgen_fp_ops::divsf (const cgen_fpu* fpu, SF x, SF y)
  {
    fp r = fp (x) / fp (y);
    check_result (fpu, r);
*************** SF cgen_fp_ops::divsf (cgen_fpu* fpu, SF
*** 50,56 ****
    return tmp;
  }
 
! SF cgen_fp_ops::negsf (cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::neg (r);
--- 50,56 ----
    return tmp;
  }
 
! SF cgen_fp_ops::negsf (const cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::neg (r);
*************** SF cgen_fp_ops::negsf (cgen_fpu* fpu, SF
*** 60,66 ****
    return tmp;
  }
 
! SF cgen_fp_ops::abssf (cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::abs (r);
--- 60,66 ----
    return tmp;
  }
 
! SF cgen_fp_ops::abssf (const cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::abs (r);
*************** SF cgen_fp_ops::abssf (cgen_fpu* fpu, SF
*** 70,76 ****
    return tmp;
  }
 
! SF cgen_fp_ops::sqrtsf (cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::sqrt (r);
--- 70,76 ----
    return tmp;
  }
 
! SF cgen_fp_ops::sqrtsf (const cgen_fpu* fpu, SF x)
  {
    fp r (x);
    r = fp::sqrt (r);
*************** SF cgen_fp_ops::sqrtsf (cgen_fpu* fpu, S
*** 82,120 ****
 
 
  #if 0 // not implemented yet
! SF cgen_fp_ops::invsf (cgen_fpu*, SF);
! SF cgen_fp_ops::cossf (cgen_fpu*, SF);
! SF cgen_fp_ops::sinsf (cgen_fpu*, SF);
! SF cgen_fp_ops::minsf (cgen_fpu*, SF, SF);
! SF cgen_fp_ops::maxsf (cgen_fpu*, SF, SF);
  #endif
 
! int cgen_fp_ops::eqsf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) == fp (y);
  }
! int cgen_fp_ops::nesf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) != fp (y);
  }
! int cgen_fp_ops::ltsf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) < fp (y);
  }
! int cgen_fp_ops::lesf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) <= fp (y);
  }
! int cgen_fp_ops::gtsf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) > fp (y);
  }
! int cgen_fp_ops::gesf (cgen_fpu*, SF x, SF y)
  {
    return fp (x) >= fp (y);
  }
 
! int cgen_fp_ops::unorderedsf (cgen_fpu*, SF x, SF y)
  {
    fp f1(x);
    fp f2(y);
--- 82,120 ----
 
 
  #if 0 // not implemented yet
! SF cgen_fp_ops::invsf (const cgen_fpu*, SF);
! SF cgen_fp_ops::cossf (const cgen_fpu*, SF);
! SF cgen_fp_ops::sinsf (const cgen_fpu*, SF);
! SF cgen_fp_ops::minsf (const cgen_fpu*, SF, SF);
! SF cgen_fp_ops::maxsf (const cgen_fpu*, SF, SF);
  #endif
 
! int cgen_fp_ops::eqsf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) == fp (y);
  }
! int cgen_fp_ops::nesf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) != fp (y);
  }
! int cgen_fp_ops::ltsf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) < fp (y);
  }
! int cgen_fp_ops::lesf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) <= fp (y);
  }
! int cgen_fp_ops::gtsf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) > fp (y);
  }
! int cgen_fp_ops::gesf (const cgen_fpu*, SF x, SF y)
  {
    return fp (x) >= fp (y);
  }
 
! int cgen_fp_ops::unorderedsf (const cgen_fpu*, SF x, SF y)
  {
    fp f1(x);
    fp f2(y);
*************** int cgen_fp_ops::unorderedsf (cgen_fpu*,
*** 122,128 ****
  }
 
  /* basic DF ops */
! DF cgen_fp_ops::adddf (cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) + fp (y);
    check_result (fpu, r);
--- 122,128 ----
  }
 
  /* basic DF ops */
! DF cgen_fp_ops::adddf (const cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) + fp (y);
    check_result (fpu, r);
*************** DF cgen_fp_ops::adddf (cgen_fpu *fpu, DF
*** 131,137 ****
    return tmp;
  }
 
! DF cgen_fp_ops::subdf (cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) - fp (y);
    check_result (fpu, r);
--- 131,137 ----
    return tmp;
  }
 
! DF cgen_fp_ops::subdf (const cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) - fp (y);
    check_result (fpu, r);
*************** DF cgen_fp_ops::subdf (cgen_fpu *fpu, DF
*** 140,146 ****
    return tmp;
  }
 
! DF cgen_fp_ops::muldf (cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) * fp (y);
    check_result (fpu, r);
--- 140,146 ----
    return tmp;
  }
 
! DF cgen_fp_ops::muldf (const cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) * fp (y);
    check_result (fpu, r);
*************** DF cgen_fp_ops::muldf (cgen_fpu *fpu, DF
*** 149,155 ****
    return tmp;
  }
 
! DF cgen_fp_ops::divdf (cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) / fp (y);
    check_result (fpu, r);
--- 149,155 ----
    return tmp;
  }
 
! DF cgen_fp_ops::divdf (const cgen_fpu *fpu, DF x, DF y)
  {
    fp r = fp (x) / fp (y);
    check_result (fpu, r);
*************** DF cgen_fp_ops::divdf (cgen_fpu *fpu, DF
*** 158,164 ****
    return tmp;
  }
 
! DF cgen_fp_ops::negdf (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::neg (r);
--- 158,164 ----
    return tmp;
  }
 
! DF cgen_fp_ops::negdf (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::neg (r);
*************** DF cgen_fp_ops::negdf (cgen_fpu *fpu, DF
*** 168,174 ****
    return tmp;
  }
 
! DF cgen_fp_ops::absdf (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::abs (r);
--- 168,174 ----
    return tmp;
  }
 
! DF cgen_fp_ops::absdf (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::abs (r);
*************** DF cgen_fp_ops::absdf (cgen_fpu *fpu, DF
*** 178,184 ****
    return tmp;
  }
 
! DF cgen_fp_ops::sqrtdf (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::sqrt (r);
--- 178,184 ----
    return tmp;
  }
 
! DF cgen_fp_ops::sqrtdf (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    r = fp::sqrt (r);
*************** DF cgen_fp_ops::sqrtdf (cgen_fpu *fpu, D
*** 189,228 ****
  }
 
  #if 0
! DF cgen_fp_ops::invdf (cgen_fpu*, DF);
! DF cgen_fp_ops::cosdf (cgen_fpu*, DF);
! DF cgen_fp_ops::sindf (cgen_fpu*, DF);
! DF cgen_fp_ops::mindf (cgen_fpu*, DF, DF);
! DF cgen_fp_ops::maxdf (cgen_fpu*, DF, DF);
  #endif
 
! int cgen_fp_ops::eqdf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) == fp (y);
  }
 
! int cgen_fp_ops::nedf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) == fp (y);
  }
! int cgen_fp_ops::ltdf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) < fp (y);
  }
! int cgen_fp_ops::ledf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) <= fp (y);
  }
! int cgen_fp_ops::gtdf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) > fp (y);
  }
! int cgen_fp_ops::gedf (cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) >= fp (y);
  }
 
! int cgen_fp_ops::unordereddf (cgen_fpu *fpu, DF x, DF y)
  {
    fp f1(x);
    fp f2(y);
--- 189,228 ----
  }
 
  #if 0
! DF cgen_fp_ops::invdf (const cgen_fpu*, DF);
! DF cgen_fp_ops::cosdf (const cgen_fpu*, DF);
! DF cgen_fp_ops::sindf (const cgen_fpu*, DF);
! DF cgen_fp_ops::mindf (const cgen_fpu*, DF, DF);
! DF cgen_fp_ops::maxdf (const cgen_fpu*, DF, DF);
  #endif
 
! int cgen_fp_ops::eqdf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) == fp (y);
  }
 
! int cgen_fp_ops::nedf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) == fp (y);
  }
! int cgen_fp_ops::ltdf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) < fp (y);
  }
! int cgen_fp_ops::ledf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) <= fp (y);
  }
! int cgen_fp_ops::gtdf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) > fp (y);
  }
! int cgen_fp_ops::gedf (const cgen_fpu *fpu, DF x, DF y)
  {
    return fp (x) >= fp (y);
  }
 
! int cgen_fp_ops::unordereddf (const cgen_fpu *fpu, DF x, DF y)
  {
    fp f1(x);
    fp f2(y);
*************** int cgen_fp_ops::unordereddf (cgen_fpu *
*** 230,236 ****
  }
 
  /* SF/DF conversion ops */
! DF cgen_fp_ops::fextsfdf (cgen_fpu *fpu, SF x)
  {
    fp r (x);
    DF tmp;
--- 230,236 ----
  }
 
  /* SF/DF conversion ops */
! DF cgen_fp_ops::fextsfdf (const cgen_fpu *fpu, SF x)
  {
    fp r (x);
    DF tmp;
*************** DF cgen_fp_ops::fextsfdf (cgen_fpu *fpu,
*** 238,244 ****
    return tmp;
  }
 
! SF cgen_fp_ops::ftruncdfsf (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    SF tmp;
--- 238,244 ----
    return tmp;
  }
 
! SF cgen_fp_ops::ftruncdfsf (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    SF tmp;
*************** SF cgen_fp_ops::ftruncdfsf (cgen_fpu *fp
*** 246,252 ****
    return tmp;
  }
 
! SF cgen_fp_ops::floatsisf (cgen_fpu* fpu, SI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
--- 246,252 ----
    return tmp;
  }
 
! SF cgen_fp_ops::floatsisf (const cgen_fpu* fpu, SI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
*************** SF cgen_fp_ops::floatsisf (cgen_fpu* fpu
*** 255,261 ****
    return tmp;
  }
 
! SF cgen_fp_ops::floatdisf (cgen_fpu *fpu, DI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
--- 255,261 ----
    return tmp;
  }
 
! SF cgen_fp_ops::floatdisf (const cgen_fpu *fpu, DI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
*************** SF cgen_fp_ops::floatdisf (cgen_fpu *fpu
*** 265,275 ****
  }
 
  #if 0 // not implemented yet
! SF cgen_fp_ops::ufloatsisf (cgen_fpu*, USI);
! SF cgen_fp_ops::ufloatdisf (cgen_fpu*, UDI);
  #endif // not implemented yet
 
! SI cgen_fp_ops::fixsfsi (cgen_fpu *fpu, SF x)
  {
    fp r (x);
    SI tmp;
--- 265,275 ----
  }
 
  #if 0 // not implemented yet
! SF cgen_fp_ops::ufloatsisf (const cgen_fpu*, USI);
! SF cgen_fp_ops::ufloatdisf (const cgen_fpu*, UDI);
  #endif // not implemented yet
 
! SI cgen_fp_ops::fixsfsi (const cgen_fpu *fpu, SF x)
  {
    fp r (x);
    SI tmp;
*************** SI cgen_fp_ops::fixsfsi (cgen_fpu *fpu,
*** 277,283 ****
    return tmp;
  }
 
! DI cgen_fp_ops::fixsfdi (cgen_fpu *fpu, SF x)
  {
    fp r (x);
    DI tmp;
--- 277,283 ----
    return tmp;
  }
 
! DI cgen_fp_ops::fixsfdi (const cgen_fpu *fpu, SF x)
  {
    fp r (x);
    DI tmp;
*************** DI cgen_fp_ops::fixsfdi (cgen_fpu *fpu,
*** 286,295 ****
  }
 
  #if 0 // not implemented yet
! USI cgen_fp_ops::ufixsfsi (cgen_fpu*, SF)
! UDI cgen_fp_ops::ufixsfdi (cgen_fpu*, SF);
  #endif
! DF cgen_fp_ops::floatsidf (cgen_fpu *fpu, SI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
--- 286,295 ----
  }
 
  #if 0 // not implemented yet
! USI cgen_fp_ops::ufixsfsi (const cgen_fpu*, SF)
! UDI cgen_fp_ops::ufixsfdi (const cgen_fpu*, SF);
  #endif
! DF cgen_fp_ops::floatsidf (const cgen_fpu *fpu, SI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
*************** DF cgen_fp_ops::floatsidf (cgen_fpu *fpu
*** 298,304 ****
    return tmp;
  }
 
! DF cgen_fp_ops::floatdidf (cgen_fpu *fpu, DI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
--- 298,304 ----
    return tmp;
  }
 
! DF cgen_fp_ops::floatdidf (const cgen_fpu *fpu, DI x)
  {
    fp r = fp::from_int (x);
    check_result (fpu, r);
*************** DF cgen_fp_ops::floatdidf (cgen_fpu *fpu
*** 308,317 ****
  }
 
  #if 0
! DF cgen_fp_ops::ufloatsidf (cgen_fpu*, USI);
! DF cgen_fp_ops::ufloatdidf (cgen_fpu*, UDI);
  #endif
! SI cgen_fp_ops::fixdfsi (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    SI tmp;
--- 308,317 ----
  }
 
  #if 0
! DF cgen_fp_ops::ufloatsidf (const cgen_fpu*, USI);
! DF cgen_fp_ops::ufloatdidf (const cgen_fpu*, UDI);
  #endif
! SI cgen_fp_ops::fixdfsi (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    SI tmp;
*************** SI cgen_fp_ops::fixdfsi (cgen_fpu *fpu,
*** 319,325 ****
    return tmp;
  }
 
! DI cgen_fp_ops::fixdfdi (cgen_fpu *fpu, DF x)
  {
    fp r (x);
    DI tmp;
--- 319,325 ----
    return tmp;
  }
 
! DI cgen_fp_ops::fixdfdi (const cgen_fpu *fpu, DF x)
  {
    fp r (x);
    DI tmp;
*************** DI cgen_fp_ops::fixdfdi (cgen_fpu *fpu,
*** 328,407 ****
  }
 
  #if 0
! USI cgen_fp_ops::ufixdfsi (cgen_fpu*, DF);
! UDI cgen_fp_ops::ufixdfdi (cgen_fpu*, DF);
 
  /* XF mode support (kept separate 'cus not always present) */
! XF cgen_fp_ops::addxf (cgen_fpu*, XF, XF);
! XF cgen_fp_ops::subxf (cgen_fpu*, XF, XF);
! XF cgen_fp_ops::mulxf (cgen_fpu*, XF, XF);
! XF cgen_fp_ops::divxf (cgen_fpu*, XF, XF);
! XF cgen_fp_ops::negxf (cgen_fpu*, XF);
! XF cgen_fp_ops::absxf (cgen_fpu*, XF);
! XF cgen_fp_ops::sqrtxf (cgen_fpu*, XF);
! XF cgen_fp_ops::invxf (cgen_fpu*, XF);
! XF cgen_fp_ops::cosxf (cgen_fpu*, XF);
! XF cgen_fp_ops::sinxf (cgen_fpu*, XF);
! XF cgen_fp_ops::minxf (cgen_fpu*, XF, XF);
! XF cgen_fp_ops::maxxf (cgen_fpu*, XF, XF);
!
! int cgen_fp_ops::eqxf (cgen_fpu*, XF, XF);
! int cgen_fp_ops::nexf (cgen_fpu*, XF, XF);
! int cgen_fp_ops::ltxf (cgen_fpu*, XF, XF);
! int cgen_fp_ops::lexf (cgen_fpu*, XF, XF);
! int cgen_fp_ops::gtxf (cgen_fpu*, XF, XF);
! int cgen_fp_ops::gexf (cgen_fpu*, XF, XF);
!
! XF cgen_fp_ops::extsfxf (cgen_fpu*, SF);
! XF cgen_fp_ops::extdfxf (cgen_fpu*, DF);
! SF cgen_fp_ops::truncxfsf (cgen_fpu*, XF);
! DF cgen_fp_ops::truncxfdf (cgen_fpu*, XF);
!
! XF cgen_fp_ops::floatsixf (cgen_fpu*, SI);
! XF cgen_fp_ops::floatdixf (cgen_fpu*, DI);
! XF cgen_fp_ops::ufloatsixf (cgen_fpu*, USI);
! XF cgen_fp_ops::ufloatdixf (cgen_fpu*, UDI);
!
! SI cgen_fp_ops::fixxfsi (cgen_fpu*, XF);
! DI cgen_fp_ops::fixxfdi (cgen_fpu*, XF);
! USI cgen_fp_ops::ufixxfsi (cgen_fpu*, XF);
! UDI cgen_fp_ops::ufixxfdi (cgen_fpu*, XF);
 
  /* TF mode support (kept separate 'cus not always present) */
! TF cgen_fp_ops::addtf (cgen_fpu*, TF, TF);
! TF cgen_fp_ops::subtf (cgen_fpu*, TF, TF);
! TF cgen_fp_ops::multf (cgen_fpu*, TF, TF);
! TF cgen_fp_ops::divtf (cgen_fpu*, TF, TF);
! TF cgen_fp_ops::negtf (cgen_fpu*, TF);
! TF cgen_fp_ops::abstf (cgen_fpu*, TF);
! TF cgen_fp_ops::sqrttf (cgen_fpu*, TF);
! TF cgen_fp_ops::invtf (cgen_fpu*, TF);
! TF cgen_fp_ops::costf (cgen_fpu*, TF);
! TF cgen_fp_ops::sintf (cgen_fpu*, TF);
! TF cgen_fp_ops::mintf (cgen_fpu*, TF, TF);
! TF cgen_fp_ops::maxtf (cgen_fpu*, TF, TF);
!
! int cgen_fp_ops::eqtf (cgen_fpu*, TF, TF);
! int cgen_fp_ops::netf (cgen_fpu*, TF, TF);
! int cgen_fp_ops::lttf (cgen_fpu*, TF, TF);
! int cgen_fp_ops::letf (cgen_fpu*, TF, TF);
! int cgen_fp_ops::gttf (cgen_fpu*, TF, TF);
! int cgen_fp_ops::getf (cgen_fpu*, TF, TF);
!
! TF cgen_fp_ops::extsftf (cgen_fpu*, SF);
! TF cgen_fp_ops::extdftf (cgen_fpu*, DF);
! SF cgen_fp_ops::trunctfsf (cgen_fpu*, TF);
! DF cgen_fp_ops::trunctfdf (cgen_fpu*, TF);
!
! TF cgen_fp_ops::floatsitf (cgen_fpu*, SI);
! TF cgen_fp_ops::floatditf (cgen_fpu*, DI);
! TF cgen_fp_ops::ufloatsitf (cgen_fpu*, USI);
! TF cgen_fp_ops::ufloatditf (cgen_fpu*, UDI);
!
! SI cgen_fp_ops::fixtfsi (cgen_fpu*, TF);
! DI cgen_fp_ops::fixtfdi (cgen_fpu*, TF);
! USI cgen_fp_ops::ufixtfsi (cgen_fpu*, TF);
! UDI cgen_fp_ops::ufixtfdi (cgen_fpu*, TF);
  #endif // not implemented yet
 
  }; // namespace cgen
--- 328,407 ----
  }
 
  #if 0
! USI cgen_fp_ops::ufixdfsi (const cgen_fpu*, DF);
! UDI cgen_fp_ops::ufixdfdi (const cgen_fpu*, DF);
 
  /* XF mode support (kept separate 'cus not always present) */
! XF cgen_fp_ops::addxf (const cgen_fpu*, XF, XF);
! XF cgen_fp_ops::subxf (const cgen_fpu*, XF, XF);
! XF cgen_fp_ops::mulxf (const cgen_fpu*, XF, XF);
! XF cgen_fp_ops::divxf (const cgen_fpu*, XF, XF);
! XF cgen_fp_ops::negxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::absxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::sqrtxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::invxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::cosxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::sinxf (const cgen_fpu*, XF);
! XF cgen_fp_ops::minxf (const cgen_fpu*, XF, XF);
! XF cgen_fp_ops::maxxf (const cgen_fpu*, XF, XF);
!
! int cgen_fp_ops::eqxf (const cgen_fpu*, XF, XF);
! int cgen_fp_ops::nexf (const cgen_fpu*, XF, XF);
! int cgen_fp_ops::ltxf (const cgen_fpu*, XF, XF);
! int cgen_fp_ops::lexf (const cgen_fpu*, XF, XF);
! int cgen_fp_ops::gtxf (const cgen_fpu*, XF, XF);
! int cgen_fp_ops::gexf (const cgen_fpu*, XF, XF);
!
! XF cgen_fp_ops::extsfxf (const cgen_fpu*, SF);
! XF cgen_fp_ops::extdfxf (const cgen_fpu*, DF);
! SF cgen_fp_ops::truncxfsf (const cgen_fpu*, XF);
! DF cgen_fp_ops::truncxfdf (const cgen_fpu*, XF);
!
! XF cgen_fp_ops::floatsixf (const cgen_fpu*, SI);
! XF cgen_fp_ops::floatdixf (const cgen_fpu*, DI);
! XF cgen_fp_ops::ufloatsixf (const cgen_fpu*, USI);
! XF cgen_fp_ops::ufloatdixf (const cgen_fpu*, UDI);
!
! SI cgen_fp_ops::fixxfsi (const cgen_fpu*, XF);
! DI cgen_fp_ops::fixxfdi (const cgen_fpu*, XF);
! USI cgen_fp_ops::ufixxfsi (const cgen_fpu*, XF);
! UDI cgen_fp_ops::ufixxfdi (const cgen_fpu*, XF);
 
  /* TF mode support (kept separate 'cus not always present) */
! TF cgen_fp_ops::addtf (const cgen_fpu*, TF, TF);
! TF cgen_fp_ops::subtf (const cgen_fpu*, TF, TF);
! TF cgen_fp_ops::multf (const cgen_fpu*, TF, TF);
! TF cgen_fp_ops::divtf (const cgen_fpu*, TF, TF);
! TF cgen_fp_ops::negtf (const cgen_fpu*, TF);
! TF cgen_fp_ops::abstf (const cgen_fpu*, TF);
! TF cgen_fp_ops::sqrttf (const cgen_fpu*, TF);
! TF cgen_fp_ops::invtf (const cgen_fpu*, TF);
! TF cgen_fp_ops::costf (const cgen_fpu*, TF);
! TF cgen_fp_ops::sintf (const cgen_fpu*, TF);
! TF cgen_fp_ops::mintf (const cgen_fpu*, TF, TF);
! TF cgen_fp_ops::maxtf (const cgen_fpu*, TF, TF);
!
! int cgen_fp_ops::eqtf (const cgen_fpu*, TF, TF);
! int cgen_fp_ops::netf (const cgen_fpu*, TF, TF);
! int cgen_fp_ops::lttf (const cgen_fpu*, TF, TF);
! int cgen_fp_ops::letf (const cgen_fpu*, TF, TF);
! int cgen_fp_ops::gttf (const cgen_fpu*, TF, TF);
! int cgen_fp_ops::getf (const cgen_fpu*, TF, TF);
!
! TF cgen_fp_ops::extsftf (const cgen_fpu*, SF);
! TF cgen_fp_ops::extdftf (const cgen_fpu*, DF);
! SF cgen_fp_ops::trunctfsf (const cgen_fpu*, TF);
! DF cgen_fp_ops::trunctfdf (const cgen_fpu*, TF);
!
! TF cgen_fp_ops::floatsitf (const cgen_fpu*, SI);
! TF cgen_fp_ops::floatditf (const cgen_fpu*, DI);
! TF cgen_fp_ops::ufloatsitf (const cgen_fpu*, USI);
! TF cgen_fp_ops::ufloatditf (const cgen_fpu*, UDI);
!
! SI cgen_fp_ops::fixtfsi (const cgen_fpu*, TF);
! DI cgen_fp_ops::fixtfdi (const cgen_fpu*, TF);
! USI cgen_fp_ops::ufixtfsi (const cgen_fpu*, TF);
! UDI cgen_fp_ops::ufixtfdi (const cgen_fpu*, TF);
  #endif // not implemented yet
 
  }; // namespace cgen
Index: sid/component/cgen-cpu/cgen-fpu.h
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/cgen-fpu.h,v
retrieving revision 1.2
diff -c -p -r1.2 cgen-fpu.h
*** sid/component/cgen-cpu/cgen-fpu.h 10 May 2006 21:15:35 -0000 1.2
--- sid/component/cgen-cpu/cgen-fpu.h 14 Jun 2006 18:57:39 -0000
*************** class cgen_fpu;
*** 23,176 ****
  class cgen_fp_ops {
  public:
    // default is no error checking
!   virtual void check_result (cgen_fpu*, fp &) {}
 
    /* basic SF ops */
!   virtual SF addsf (cgen_fpu*, SF, SF);
!   virtual SF subsf (cgen_fpu*, SF, SF);
!   virtual SF mulsf (cgen_fpu*, SF, SF);
!   virtual SF divsf (cgen_fpu*, SF, SF);
!   virtual SF negsf (cgen_fpu*, SF);
!   virtual SF abssf (cgen_fpu*, SF);
!   virtual SF sqrtsf (cgen_fpu*, SF);
  #if 0
!   virtual SF invsf (cgen_fpu*, SF);
!   virtual SF cossf (cgen_fpu*, SF);
!   virtual SF sinsf (cgen_fpu*, SF);
!   virtual SF minsf (cgen_fpu*, SF, SF);
!   virtual SF maxsf (cgen_fpu*, SF, SF);
  #endif
!   virtual int eqsf (cgen_fpu*, SF, SF);
!   virtual int nesf (cgen_fpu*, SF, SF);
!   virtual int ltsf (cgen_fpu*, SF, SF);
!   virtual int lesf (cgen_fpu*, SF, SF);
!   virtual int gtsf (cgen_fpu*, SF, SF);
!   virtual int gesf (cgen_fpu*, SF, SF);
!   virtual int unorderedsf (cgen_fpu*, SF, SF);
 
    /* basic DF ops */
!   virtual DF adddf (cgen_fpu*, DF, DF);
!   virtual DF subdf (cgen_fpu*, DF, DF);
!   virtual DF muldf (cgen_fpu*, DF, DF);
!   virtual DF divdf (cgen_fpu*, DF, DF);
!   virtual DF negdf (cgen_fpu*, DF);
!   virtual DF absdf (cgen_fpu*, DF);
!   virtual DF sqrtdf (cgen_fpu*, DF);
  #if 0
!   virtual DF invdf (cgen_fpu*, DF);
!   virtual DF cosdf (cgen_fpu*, DF);
!   virtual DF sindf (cgen_fpu*, DF);
!   virtual DF mindf (cgen_fpu*, DF, DF);
!   virtual DF maxdf (cgen_fpu*, DF, DF);
  #endif
!   virtual int eqdf (cgen_fpu*, DF, DF);
!   virtual int nedf (cgen_fpu*, DF, DF);
!   virtual int ltdf (cgen_fpu*, DF, DF);
!   virtual int ledf (cgen_fpu*, DF, DF);
!   virtual int gtdf (cgen_fpu*, DF, DF);
!   virtual int gedf (cgen_fpu*, DF, DF);
!   virtual int unordereddf (cgen_fpu*, DF, DF);
 
    /* SF/DF conversion ops */
!   virtual DF fextsfdf (cgen_fpu*, SF);
!   virtual SF ftruncdfsf (cgen_fpu*, DF);
 
!   virtual SF floatsisf (cgen_fpu*, SI);
!   virtual SF floatdisf (cgen_fpu*, DI);
  #if 0 // not implemented yet
!   virtual SF ufloatsisf (cgen_fpu*, USI);
!   virtual SF ufloatdisf (cgen_fpu*, UDI);
  #endif // not implemented yet
 
!   virtual SI fixsfsi (cgen_fpu*, SF);
!   virtual DI fixsfdi (cgen_fpu*, SF);
  #if 0 // not implemented yet
!   virtual USI ufixsfsi (cgen_fpu*, SF);
!   virtual UDI ufixsfdi (cgen_fpu*, SF);
  #endif
!   virtual DF floatsidf (cgen_fpu*, SI);
!   virtual DF floatdidf (cgen_fpu*, DI);
  #if 0
!   virtual DF ufloatsidf (cgen_fpu*, USI);
!   virtual DF ufloatdidf (cgen_fpu*, UDI);
  #endif
!   virtual SI fixdfsi (cgen_fpu*, DF);
!   virtual DI fixdfdi (cgen_fpu*, DF);
  #if 0
!   virtual USI ufixdfsi (cgen_fpu*, DF);
!   virtual UDI ufixdfdi (cgen_fpu*, DF);
 
    /* XF mode support (kept separate 'cus not always present) */
!   virtual XF addxf (cgen_fpu*, XF, XF);
!   virtual XF subxf (cgen_fpu*, XF, XF);
!   virtual XF mulxf (cgen_fpu*, XF, XF);
!   virtual XF divxf (cgen_fpu*, XF, XF);
!   virtual XF negxf (cgen_fpu*, XF);
!   virtual XF absxf (cgen_fpu*, XF);
!   virtual XF sqrtxf (cgen_fpu*, XF);
!   virtual XF invxf (cgen_fpu*, XF);
!   virtual XF cosxf (cgen_fpu*, XF);
!   virtual XF sinxf (cgen_fpu*, XF);
!   virtual XF minxf (cgen_fpu*, XF, XF);
!   virtual XF maxxf (cgen_fpu*, XF, XF);
!
!   virtual int eqxf (cgen_fpu*, XF, XF);
!   virtual int nexf (cgen_fpu*, XF, XF);
!   virtual int ltxf (cgen_fpu*, XF, XF);
!   virtual int lexf (cgen_fpu*, XF, XF);
!   virtual int gtxf (cgen_fpu*, XF, XF);
!   virtual int gexf (cgen_fpu*, XF, XF);
!
!   virtual XF extsfxf (cgen_fpu*, SF);
!   virtual XF extdfxf (cgen_fpu*, DF);
!   virtual SF truncxfsf (cgen_fpu*, XF);
!   virtual DF truncxfdf (cgen_fpu*, XF);
!
!   virtual XF floatsixf (cgen_fpu*, SI);
!   virtual XF floatdixf (cgen_fpu*, DI);
!   virtual XF ufloatsixf (cgen_fpu*, USI);
!   virtual XF ufloatdixf (cgen_fpu*, UDI);
!
!   virtual SI fixxfsi (cgen_fpu*, XF);
!   virtual DI fixxfdi (cgen_fpu*, XF);
!   virtual USI ufixxfsi (cgen_fpu*, XF);
!   virtual UDI ufixxfdi (cgen_fpu*, XF);
 
    /* TF mode support (kept separate 'cus not always present) */
!   virtual TF addtf (cgen_fpu*, TF, TF);
!   virtual TF subtf (cgen_fpu*, TF, TF);
!   virtual TF multf (cgen_fpu*, TF, TF);
!   virtual TF divtf (cgen_fpu*, TF, TF);
!   virtual TF negtf (cgen_fpu*, TF);
!   virtual TF abstf (cgen_fpu*, TF);
!   virtual TF sqrttf (cgen_fpu*, TF);
!   virtual TF invtf (cgen_fpu*, TF);
!   virtual TF costf (cgen_fpu*, TF);
!   virtual TF sintf (cgen_fpu*, TF);
!   virtual TF mintf (cgen_fpu*, TF, TF);
!   virtual TF maxtf (cgen_fpu*, TF, TF);
!
!   virtual int eqtf (cgen_fpu*, TF, TF);
!   virtual int netf (cgen_fpu*, TF, TF);
!   virtual int lttf (cgen_fpu*, TF, TF);
!   virtual int letf (cgen_fpu*, TF, TF);
!   virtual int gttf (cgen_fpu*, TF, TF);
!   virtual int getf (cgen_fpu*, TF, TF);
!
!   virtual TF extsftf (cgen_fpu*, SF);
!   virtual TF extdftf (cgen_fpu*, DF);
!   virtual SF trunctfsf (cgen_fpu*, TF);
!   virtual DF trunctfdf (cgen_fpu*, TF);
!
!   virtual TF floatsitf (cgen_fpu*, SI);
!   virtual TF floatditf (cgen_fpu*, DI);
!   virtual TF ufloatsitf (cgen_fpu*, USI);
!   virtual TF ufloatditf (cgen_fpu*, UDI);
!
!   virtual SI fixtfsi (cgen_fpu*, TF);
!   virtual DI fixtfdi (cgen_fpu*, TF);
!   virtual USI ufixtfsi (cgen_fpu*, TF);
!   virtual UDI ufixtfdi (cgen_fpu*, TF);
  #endif // not implemented yet
  };
 
--- 23,176 ----
  class cgen_fp_ops {
  public:
    // default is no error checking
!   virtual void check_result (const cgen_fpu*, fp &) {}
 
    /* basic SF ops */
!   virtual SF addsf (const cgen_fpu*, SF, SF);
!   virtual SF subsf (const cgen_fpu*, SF, SF);
!   virtual SF mulsf (const cgen_fpu*, SF, SF);
!   virtual SF divsf (const cgen_fpu*, SF, SF);
!   virtual SF negsf (const cgen_fpu*, SF);
!   virtual SF abssf (const cgen_fpu*, SF);
!   virtual SF sqrtsf (const cgen_fpu*, SF);
  #if 0
!   virtual SF invsf (const cgen_fpu*, SF);
!   virtual SF cossf (const cgen_fpu*, SF);
!   virtual SF sinsf (const cgen_fpu*, SF);
!   virtual SF minsf (const cgen_fpu*, SF, SF);
!   virtual SF maxsf (const cgen_fpu*, SF, SF);
  #endif
!   virtual int eqsf (const cgen_fpu*, SF, SF);
!   virtual int nesf (const cgen_fpu*, SF, SF);
!   virtual int ltsf (const cgen_fpu*, SF, SF);
!   virtual int lesf (const cgen_fpu*, SF, SF);
!   virtual int gtsf (const cgen_fpu*, SF, SF);
!   virtual int gesf (const cgen_fpu*, SF, SF);
!   virtual int unorderedsf (const cgen_fpu*, SF, SF);
 
    /* basic DF ops */
!   virtual DF adddf (const cgen_fpu*, DF, DF);
!   virtual DF subdf (const cgen_fpu*, DF, DF);
!   virtual DF muldf (const cgen_fpu*, DF, DF);
!   virtual DF divdf (const cgen_fpu*, DF, DF);
!   virtual DF negdf (const cgen_fpu*, DF);
!   virtual DF absdf (const cgen_fpu*, DF);
!   virtual DF sqrtdf (const cgen_fpu*, DF);
  #if 0
!   virtual DF invdf (const cgen_fpu*, DF);
!   virtual DF cosdf (const cgen_fpu*, DF);
!   virtual DF sindf (const cgen_fpu*, DF);
!   virtual DF mindf (const cgen_fpu*, DF, DF);
!   virtual DF maxdf (const cgen_fpu*, DF, DF);
  #endif
!   virtual int eqdf (const cgen_fpu*, DF, DF);
!   virtual int nedf (const cgen_fpu*, DF, DF);
!   virtual int ltdf (const cgen_fpu*, DF, DF);
!   virtual int ledf (const cgen_fpu*, DF, DF);
!   virtual int gtdf (const cgen_fpu*, DF, DF);
!   virtual int gedf (const cgen_fpu*, DF, DF);
!   virtual int unordereddf (const cgen_fpu*, DF, DF);
 
    /* SF/DF conversion ops */
!   virtual DF fextsfdf (const cgen_fpu*, SF);
!   virtual SF ftruncdfsf (const cgen_fpu*, DF);
 
!   virtual SF floatsisf (const cgen_fpu*, SI);
!   virtual SF floatdisf (const cgen_fpu*, DI);
  #if 0 // not implemented yet
!   virtual SF ufloatsisf (const cgen_fpu*, USI);
!   virtual SF ufloatdisf (const cgen_fpu*, UDI);
  #endif // not implemented yet
 
!   virtual SI fixsfsi (const cgen_fpu*, SF);
!   virtual DI fixsfdi (const cgen_fpu*, SF);
  #if 0 // not implemented yet
!   virtual USI ufixsfsi (const cgen_fpu*, SF);
!   virtual UDI ufixsfdi (const cgen_fpu*, SF);
  #endif
!   virtual DF floatsidf (const cgen_fpu*, SI);
!   virtual DF floatdidf (const cgen_fpu*, DI);
  #if 0
!   virtual DF ufloatsidf (const cgen_fpu*, USI);
!   virtual DF ufloatdidf (const cgen_fpu*, UDI);
  #endif
!   virtual SI fixdfsi (const cgen_fpu*, DF);
!   virtual DI fixdfdi (const cgen_fpu*, DF);
  #if 0
!   virtual USI ufixdfsi (const cgen_fpu*, DF);
!   virtual UDI ufixdfdi (const cgen_fpu*, DF);
 
    /* XF mode support (kept separate 'cus not always present) */
!   virtual XF addxf (const cgen_fpu*, XF, XF);
!   virtual XF subxf (const cgen_fpu*, XF, XF);
!   virtual XF mulxf (const cgen_fpu*, XF, XF);
!   virtual XF divxf (const cgen_fpu*, XF, XF);
!   virtual XF negxf (const cgen_fpu*, XF);
!   virtual XF absxf (const cgen_fpu*, XF);
!   virtual XF sqrtxf (const cgen_fpu*, XF);
!   virtual XF invxf (const cgen_fpu*, XF);
!   virtual XF cosxf (const cgen_fpu*, XF);
!   virtual XF sinxf (const cgen_fpu*, XF);
!   virtual XF minxf (const cgen_fpu*, XF, XF);
!   virtual XF maxxf (const cgen_fpu*, XF, XF);
!
!   virtual int eqxf (const cgen_fpu*, XF, XF);
!   virtual int nexf (const cgen_fpu*, XF, XF);
!   virtual int ltxf (const cgen_fpu*, XF, XF);
!   virtual int lexf (const cgen_fpu*, XF, XF);
!   virtual int gtxf (const cgen_fpu*, XF, XF);
!   virtual int gexf (const cgen_fpu*, XF, XF);
!
!   virtual XF extsfxf (const cgen_fpu*, SF);
!   virtual XF extdfxf (const cgen_fpu*, DF);
!   virtual SF truncxfsf (const cgen_fpu*, XF);
!   virtual DF truncxfdf (const cgen_fpu*, XF);
!
!   virtual XF floatsixf (const cgen_fpu*, SI);
!   virtual XF floatdixf (const cgen_fpu*, DI);
!   virtual XF ufloatsixf (const cgen_fpu*, USI);
!   virtual XF ufloatdixf (const cgen_fpu*, UDI);
!
!   virtual SI fixxfsi (const cgen_fpu*, XF);
!   virtual DI fixxfdi (const cgen_fpu*, XF);
!   virtual USI ufixxfsi (const cgen_fpu*, XF);
!   virtual UDI ufixxfdi (const cgen_fpu*, XF);
 
    /* TF mode support (kept separate 'cus not always present) */
!   virtual TF addtf (const cgen_fpu*, TF, TF);
!   virtual TF subtf (const cgen_fpu*, TF, TF);
!   virtual TF multf (const cgen_fpu*, TF, TF);
!   virtual TF divtf (const cgen_fpu*, TF, TF);
!   virtual TF negtf (const cgen_fpu*, TF);
!   virtual TF abstf (const cgen_fpu*, TF);
!   virtual TF sqrttf (const cgen_fpu*, TF);
!   virtual TF invtf (const cgen_fpu*, TF);
!   virtual TF costf (const cgen_fpu*, TF);
!   virtual TF sintf (const cgen_fpu*, TF);
!   virtual TF mintf (const cgen_fpu*, TF, TF);
!   virtual TF maxtf (const cgen_fpu*, TF, TF);
!
!   virtual int eqtf (const cgen_fpu*, TF, TF);
!   virtual int netf (const cgen_fpu*, TF, TF);
!   virtual int lttf (const cgen_fpu*, TF, TF);
!   virtual int letf (const cgen_fpu*, TF, TF);
!   virtual int gttf (const cgen_fpu*, TF, TF);
!   virtual int getf (const cgen_fpu*, TF, TF);
!
!   virtual TF extsftf (const cgen_fpu*, SF);
!   virtual TF extdftf (const cgen_fpu*, DF);
!   virtual SF trunctfsf (const cgen_fpu*, TF);
!   virtual DF trunctfdf (const cgen_fpu*, TF);
!
!   virtual TF floatsitf (const cgen_fpu*, SI);
!   virtual TF floatditf (const cgen_fpu*, DI);
!   virtual TF ufloatsitf (const cgen_fpu*, USI);
!   virtual TF ufloatditf (const cgen_fpu*, UDI);
!
!   virtual SI fixtfsi (const cgen_fpu*, TF);
!   virtual DI fixtfdi (const cgen_fpu*, TF);
!   virtual USI ufixtfsi (const cgen_fpu*, TF);
!   virtual UDI ufixtfdi (const cgen_fpu*, TF);
  #endif // not implemented yet
  };