[BACK]Return to asmalpha.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / asm

Diff for /OpenXM_contrib2/asir2000/asm/asmalpha.c between version 1.3 and 1.9

version 1.3, 2000/08/21 08:31:17 version 1.9, 2018/03/29 01:32:50
Line 23 
Line 23 
  * shall be made on your publication or presentation in any form of the   * shall be made on your publication or presentation in any form of the
  * results obtained by use of the SOFTWARE.   * results obtained by use of the SOFTWARE.
  * (4) In the event that you modify the SOFTWARE, you shall notify FLL by   * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
  * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification   * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
  * for such modification or the source code of the modified part of the   * for such modification or the source code of the modified part of the
  * SOFTWARE.   * SOFTWARE.
  *   *
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/asm/asmalpha.c,v 1.2 2000/02/04 09:27:31 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/asm/asmalpha.c,v 1.8 2009/03/16 16:43:02 ohara Exp $
 */  */
 #if defined(__alpha)  #if defined(__alpha) || ( SIZEOF_LONG == 8 )
 typedef unsigned long UL;  typedef unsigned long UL;
 #elif defined(mips) || defined(hpux) || defined(powerpc)  #elif defined(mips) || defined(hpux) || defined(powerpc) || defined(__ppc__) || defined(_IBMR2) || defined(HAVE_UNSIGNED_LONG_LONG)
 typedef unsigned long long UL;  typedef unsigned long long UL;
 #endif  #endif
   
Line 58  typedef unsigned long long UL;
Line 58  typedef unsigned long long UL;
 unsigned int dm(a1,a2,u)  unsigned int dm(a1,a2,u)
 unsigned int a1,a2,*u;  unsigned int a1,a2,*u;
 {  {
         UL t;    UL t;
   
         t = (UL)a1*(UL)a2;    t = (UL)a1*(UL)a2;
         *u = t>>32;    *u = t>>32;
         return (unsigned int)(t&0xffffffff);    return (unsigned int)(t&0xffffffff);
 }  }
   
 unsigned int dma(a1,a2,a3,u)  unsigned int dma(a1,a2,a3,u)
 unsigned int a1,a2,a3,*u;  unsigned int a1,a2,a3,*u;
 {  {
         UL t;    UL t;
   
         t = ((UL)a1*(UL)a2)+(UL)a3;    t = ((UL)a1*(UL)a2)+(UL)a3;
         *u = t>>32;    *u = t>>32;
         return (unsigned int)(t&0xffffffff);    return (unsigned int)(t&0xffffffff);
 }  }
   
 unsigned int dma2(a1,a2,a3,a4,u)  unsigned int dma2(a1,a2,a3,a4,u)
 unsigned int a1,a2,a3,a4,*u;  unsigned int a1,a2,a3,a4,*u;
 {  {
         UL t;    UL t;
   
         t = (UL)a1*(UL)a2+(UL)a3+(UL)a4;    t = (UL)a1*(UL)a2+(UL)a3+(UL)a4;
         *u = t>>32;    *u = t>>32;
         return (unsigned int)(t&0xffffffff);    return (unsigned int)(t&0xffffffff);
 }  }
   
 unsigned int dmb(base,a1,a2,u)  unsigned int dmb(base,a1,a2,u)
 unsigned int base,a1,a2,*u;  unsigned int base,a1,a2,*u;
 {  {
         UL t;    UL t;
   
         t = (UL)a1*(UL)a2;    t = (UL)a1*(UL)a2;
         *u = t/(UL)base;    *u = t/(UL)base;
         return (unsigned int)(t-(UL)base*(UL)(*u));    return (unsigned int)(t-(UL)base*(UL)(*u));
 }  }
   
 unsigned int dmab(base,a1,a2,a3,u)  unsigned int dmab(base,a1,a2,a3,u)
 unsigned int base,a1,a2,a3,*u;  unsigned int base,a1,a2,a3,*u;
 {  {
         UL t;    UL t;
   
         t = (UL)a1*(UL)a2+(UL)a3;    t = (UL)a1*(UL)a2+(UL)a3;
         *u = t/(UL)base;    *u = t/(UL)base;
         return (unsigned int)(t-(UL)base*(UL)(*u));    return (unsigned int)(t-(UL)base*(UL)(*u));
 }  }
   
 unsigned int dmar(a1,a2,a3,d)  unsigned int dmar(a1,a2,a3,d)
 unsigned int a1,a2,a3,d;  unsigned int a1,a2,a3,d;
 {  {
         UL t;    UL t;
   
         t = (UL)a1*(UL)a2+(UL)a3;    t = (UL)a1*(UL)a2+(UL)a3;
         return (unsigned int)(t%(UL)d);    return (unsigned int)(t%(UL)d);
 }  }
   
 unsigned int dsab(base,a1,a2,u)  unsigned int dsab(base,a1,a2,u)
 unsigned int base,a1,a2,*u;  unsigned int base,a1,a2,*u;
 {  {
         UL t;    UL t;
   
         t = (((UL)a1)<<32)+(UL)a2;    t = (((UL)a1)<<32)+(UL)a2;
         *u = t/(UL)base;    *u = t/(UL)base;
         return (unsigned int)(t-(UL)base*(UL)(*u));    return (unsigned int)(t-(UL)base*(UL)(*u));
 }  }
   
 unsigned int dqr(a,b,qp)  unsigned int dqr(a,b,qp)
 unsigned int a,b,*qp;  unsigned int a,b,*qp;
 {  {
         *qp = a/b;    *qp = a/b;
         return a - b * (*qp);    return a - b * (*qp);
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.9

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>