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

Diff for /OpenXM_contrib2/asir2000/engine/Z.c between version 1.5 and 1.7

version 1.5, 2004/10/06 11:58:52 version 1.7, 2005/02/13 16:01:02
Line 2 
Line 2 
 #include "base.h"  #include "base.h"
 #include "inline.h"  #include "inline.h"
   
 inline void _addz(Z n1,Z n2,Z nr);  #if defined(__GNUC__)
 inline void _subz(Z n1,Z n2,Z nr);  #define INLINE inline
 inline void _mulz(Z n1,Z n2,Z nr);  #elif defined(VISUAL)
 inline int _addz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr);  #define INLINE __inline
 inline int _subz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr);  #else
   #define INLINE
   #endif
   
   INLINE void _addz(Z n1,Z n2,Z nr);
   INLINE void _subz(Z n1,Z n2,Z nr);
   INLINE void _mulz(Z n1,Z n2,Z nr);
   INLINE int _addz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr);
   INLINE int _subz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr);
   
 /* immediate int -> Z */  /* immediate int -> Z */
 #define UTOZ(c,n) (n)=(!((unsigned int)(c))?0:(((unsigned int)(c))<=IMM_MAX?((Z)((((unsigned int)(c))<<1)|1)):utoz((unsigned int)(c))))  #define UTOZ(c,n) (n)=(!((unsigned int)(c))?0:(((unsigned int)(c))<=IMM_MAX?((Z)((((unsigned int)(c))<<1)|1)):utoz((unsigned int)(c))))
 #define STOZ(c,n) (n)=(!((int)(c))?0:(((int)(c))>=IMM_MIN&&((int)(c))<=IMM_MAX?((Z)((((int)(c))<<1)|1)):stoz((int)(c))))  #define STOZ(c,n) (n)=(!((int)(c))?0:(((int)(c))>=IMM_MIN&&((int)(c))<=IMM_MAX?((Z)((((int)(c))<<1)|1)):stoz((int)(c))))
Line 718  int _addz_main(unsigned int *m1,int d1,unsigned int *m
Line 726  int _addz_main(unsigned int *m1,int d1,unsigned int *m
         :"m"(m1),"m"(m2),"m"(mr),"m"(d2)\          :"m"(m1),"m"(m2),"m"(mr),"m"(d2)\
         :"eax","ebx","ecx","edx","esi","edi");          :"eax","ebx","ecx","edx","esi","edi");
 #else  #else
         for ( i = 0, c = 0, mr = BD(nr); i < d2; i++, m1++, m2++, mr++ ) {          for ( i = 0, c = 0; i < d2; i++, m1++, m2++, mr++ ) {
                 tmp = *m1 + *m2;                  tmp = *m1 + *m2;
                 if ( tmp < *m1 ) {                  if ( tmp < *m1 ) {
                         tmp += c;                          tmp += c;
Line 808  int _subz_main(unsigned int *m1,int d1,unsigned int *m
Line 816  int _subz_main(unsigned int *m1,int d1,unsigned int *m
         :"m"(m1),"m"(m2),"m"(mr),"m"(d2)\          :"m"(m1),"m"(m2),"m"(mr),"m"(d2)\
         :"eax","ebx","ecx","edx","esi","edi");          :"eax","ebx","ecx","edx","esi","edi");
 #else  #else
         for ( i = 0, br = 0, mr = BD(nr); i < d2; i++, mr++ ) {          for ( i = 0, br = 0; i < d2; i++, mr++ ) {
                 t = *m1++;                  t = *m1++;
                 tmp = *m2++ + br;                  tmp = *m2++ + br;
                 if ( br > 0 && !tmp ) {                  if ( br > 0 && !tmp ) {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

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