[gforth] / gforth / engine / forth.h  

gforth: gforth/engine/forth.h

Diff for /gforth/engine/forth.h between version 1.77 and 1.78

version 1.77, Sun Oct 22 20:45:34 2006 UTC version 1.78, Mon Oct 30 15:29:48 2006 UTC
Line 109 
Line 109 
 /* Cell and UCell must be the same size as a pointer */  /* Cell and UCell must be the same size as a pointer */
 #define CELL_BITS       (sizeof(Cell) * CHAR_BIT)  #define CELL_BITS       (sizeof(Cell) * CHAR_BIT)
 #define CELL_MIN (((Cell)1)<<(sizeof(Cell)*CHAR_BIT-1))  #define CELL_MIN (((Cell)1)<<(sizeof(Cell)*CHAR_BIT-1))
   
   #define HALFCELL_BITS   (CELL_BITS/2)
   #define HALFCELL_MASK   ((~(UCell)0)>>HALFCELL_BITS)
   #define UH(x)           (((UCell)(x))>>HALFCELL_BITS)
   #define LH(x)           ((x)&HALFCELL_MASK)
   #define L2U(x)          (((UCell)(x))<<HALFCELL_BITS)
   #define HIGHBIT(x)      (((UCell)(x))>>(CELL_BITS-1))
   
 #define FLAG(b) (-(b))  #define FLAG(b) (-(b))
 #define FILEIO(error)   (FLAG(error) & -37)  #define FILEIO(error)   (FLAG(error) & -37)
 #define FILEEXIST(error)        (FLAG(error) & -38)  #define FILEEXIST(error)        (FLAG(error) & -38)
Line 149 
Line 157 
 #define DHI_IS(x,y) (x).hi=(y)  #define DHI_IS(x,y) (x).hi=(y)
 #define DLO_IS(x,y) (x).lo=(y)  #define DLO_IS(x,y) (x).lo=(y)
   
   #define UD2D(ud)        ({UDCell _ud=(ud); (DCell){_ud.hi,_ud.lo};})
   #define D2UD(d)         ({DCell _d=(d); (UDCell){_d.hi,_d.lo};})
   
 #if SMALL_OFF_T  #if SMALL_OFF_T
 #define OFF2UD(o) ({UDCell _ud; _ud.hi=0; _ud.lo=(Cell)(o); _ud;})  #define OFF2UD(o) ({UDCell _ud; _ud.hi=0; _ud.lo=(Cell)(o); _ud;})
 #define UD2OFF(ud) ((ud).lo)  #define UD2OFF(ud) ((ud).lo)
Line 189 
Line 200 
 #define DLO(x) ({ Double_Store _d; _d.d=(x); _d.cells.low;  })  #define DLO(x) ({ Double_Store _d; _d.d=(x); _d.cells.low;  })
   
 /* beware with the assignment: x is referenced twice! */  /* beware with the assignment: x is referenced twice! */
 #define DHI_IS(x,y) ({ Double_Store _d; _d.d=(x); _d.cells.high=(y); (x)=_d; })  #define DHI_IS(x,y) ({ Double_Store _d; _d.d=(x); _d.cells.high=(y); (x)=_d.d; })
 #define DLO_IS(x,y) ({ Double_Store _d; _d.d=(x); _d.cells.low =(y); (x)=_d; })  #define DLO_IS(x,y) ({ Double_Store _d; _d.d=(x); _d.cells.low =(y); (x)=_d.d; })
   
   #define UD2D(ud)        ((DCell)(ud))
   #define D2UD(d)         ((UDCell)(d))
 #endif  #endif
   
 #define FETCH_DCELL_T(d_,lo,hi,t_)      ({ \  #define FETCH_DCELL_T(d_,lo,hi,t_)      ({ \


Generate output suitable for use with a patch program
Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help