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

Annotation of OpenXM_contrib2/asir2000/engine-27/asmalpha-27.c, Revision 1.1.1.1

1.1       noro        1: /* $OpenXM: OpenXM/src/asir99/engine-27/asmalpha-27.c,v 1.1.1.1 1999/11/10 08:12:27 noro Exp $ */
                      2: #if defined(__alpha)
                      3: typedef unsigned long UL;
                      4: #elif defined(mips) || defined(hpux)
                      5: typedef unsigned long long UL;
                      6: #endif
                      7:
                      8: #include "base.h"
                      9:
                     10: unsigned int dm_27(a1,a2,u)
                     11: unsigned int a1,a2,*u;
                     12: {
                     13:        UL t;
                     14:
                     15:        t = (UL)a1*(UL)a2;
                     16:        *u = t>>27;
                     17:        return (unsigned int)(t&0x7ffffff);
                     18: }
                     19:
                     20: unsigned int dma_27(a1,a2,a3,u)
                     21: unsigned int a1,a2,a3,*u;
                     22: {
                     23:        UL t;
                     24:
                     25:        t = (UL)a1*(UL)a2+(UL)a3;
                     26:        *u = t>>27;
                     27:        return (unsigned int)(t&0x7ffffff);
                     28: }
                     29:
                     30: unsigned int dmb_27(base,a1,a2,u)
                     31: unsigned int base,a1,a2,*u;
                     32: {
                     33:        UL t;
                     34:
                     35:        t = (UL)a1*(UL)a2;
                     36:        *u = t/(UL)base;
                     37:        return (unsigned int)(t%(UL)base);
                     38: }
                     39:
                     40: unsigned int dmab_27(base,a1,a2,a3,u)
                     41: unsigned int base,a1,a2,a3,*u;
                     42: {
                     43:        UL t;
                     44:
                     45:        t = (UL)a1*(UL)a2+(UL)a3;
                     46:        *u = t/(UL)base;
                     47:        return (unsigned int)(t%(UL)base);
                     48: }
                     49:
                     50: unsigned int dmar_27(a1,a2,a3,d)
                     51: unsigned int a1,a2,a3,d;
                     52: {
                     53:        UL t;
                     54:
                     55:        t = (UL)a1*(UL)a2+(UL)a3;
                     56:        return (unsigned int)(t%(UL)d);
                     57: }
                     58:
                     59: unsigned int dsab_27(base,a1,a2,u)
                     60: unsigned int base,a1,a2,*u;
                     61: {
                     62:        UL t;
                     63:
                     64:        t = (((UL)a1)<<27)+(UL)a2;
                     65:        *u = t/(UL)base;
                     66:        return (unsigned int)(t%(UL)base);
                     67: }
                     68:
                     69: unsigned int dqr_27(a,b,qp)
                     70: unsigned int a,b,*qp;
                     71: {
                     72:        *qp = a/b;
                     73:        return a - b * (*qp);
                     74: }

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