convert into MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

can anyone help me converting this little piece of x86 code to MIPS.

here it is...

#define fixfixmul(a,b) \
   ( { long __result = (a), __arg = (b); \
       asm("imul %2;" \
           "shrd %3,%2,%0;" \
          : "=a" (__result) \
          : "0"  (__result), "d"  (__arg) , "I" (FX_PRECIS) ); \
       assert( \
             ((fix2float(__result) - fix2float(a)*fix2float(b) > -0.2) \
               && \
              (fix2float(__result) - fix2float(a)*fix2float(b) <  0.2)) \
              || \
              (printf("fixfixmul %f %f = %f, should be %f\n", \
                      fix2float(a),fix2float(b),fix2float(__result), \
                      fix2float(a)*fix2float(b)) \
              && 0) \
             ); \
       __result; \
      } \
   )


thanks, Yogesh


--------------------------------------------------------------------------
Yogesh Chaudhary
Advanced Micro Devices,Inc ( PCS )
9500 Arboretum Blvd., Suite 400                       Phone:  512.602.5422
Austin, TX 78759                                       Fax: 512.602.5051




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux