// util.h -- misc utilities (macros and static inline functions)
//
// Author: Ian.Piumarta@inria.fr
//
// last edited: Fri Jan  8 01:55:56 1999 by piumarta (Ian Piumarta) on clotho

#ifndef _util_h_
#define _util_h_


// this should be made platdep: postinc is better on some machines
// *** areas may overlap only if dest < source ***
#define	wordCopy(dest, source, nWords) \
  { \
    assert(nWords >= 0); \
    register oop *dst= ((oop *)(dest)) - 1; \
    register oop *src= ((oop *)(source)) - 1; \
    register int  cnt= (nWords); \
    while (cnt--) *++dst= *++src; \
  }
		     
#define	wordFill(dest, source, nWords) \
  { \
    assert(nWords >= 0); \
    register oop *dst= ((oop *)(dest)) - 1; \
    register int  cnt= (nWords); \
    while (cnt--) *++dst= (source); \
  }
		     

#ifdef TRACE
# define PRINTF(FMT_ARGS) printf FMT_ARGS
#else
# define PRINTF(FMT_ARGS)
#endif


#endif _util_h_

