Diff for /gforth/engine/engine.c between versions 1.94 and 1.98

version 1.94, 2006/10/27 21:47:02 version 1.98, 2007/03/17 19:14:57
Line 1 Line 1
 /* Gforth virtual machine (aka inner interpreter)  /* Gforth virtual machine (aka inner interpreter)
   
   Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005 Free Software Foundation, Inc.    Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
Line 54 Line 54
 #include "fnmatch.h"  #include "fnmatch.h"
 #endif  #endif
 #else  #else
 #include "systypes.h"  /* #include <systypes.h> */
 #endif  #endif
   
 #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) /* what else? */  #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) /* what else? */
Line 225  extern int gforth_memcmp(const char * s1 Line 225  extern int gforth_memcmp(const char * s1
 #endif  #endif
 #define SUPER_CONTINUE  #define SUPER_CONTINUE
   
   #ifdef ASMCOMMENT
   /* an individualized asm statement so that (hopefully) gcc's optimizer
      does not do cross-jumping */
   #define asmcomment(string) asm(ASMCOMMENT string)
   #else
   /* we don't know how to do an asm comment, so we just do an empty asm */
   #define asmcomment(string) asm("")
   #endif
   
 #ifdef GFORTH_DEBUGGING  #ifdef GFORTH_DEBUGGING
 #if DEBUG  #if DEBUG
 #define NAME(string) { saved_ip=ip; asm("# "string); fprintf(stderr,"%08lx depth=%3ld: "string"\n",(Cell)ip,sp0+3-sp);}  #define NAME(string) { saved_ip=ip; asmcomment(string); fprintf(stderr,"%08lx depth=%3ld: "string"\n",(Cell)ip,sp0+3-sp);}
 #else /* !DEBUG */  #else /* !DEBUG */
 #define NAME(string) { saved_ip=ip; asm(""); }  #define NAME(string) { saved_ip=ip; asm(""); }
 /* the asm here is to avoid reordering of following stuff above the  /* the asm here is to avoid reordering of following stuff above the
Line 239  extern int gforth_memcmp(const char * s1 Line 248  extern int gforth_memcmp(const char * s1
 #elif DEBUG  #elif DEBUG
 #       define  NAME(string)    {Cell __depth=sp0+3-sp; int i; fprintf(stderr,"%08lx depth=%3ld: "string,(Cell)ip,sp0+3-sp); for (i=__depth-1; i>0; i--) fprintf(stderr, " $%lx",sp[i]); fprintf(stderr, " $%lx\n",spTOS); }  #       define  NAME(string)    {Cell __depth=sp0+3-sp; int i; fprintf(stderr,"%08lx depth=%3ld: "string,(Cell)ip,sp0+3-sp); for (i=__depth-1; i>0; i--) fprintf(stderr, " $%lx",sp[i]); fprintf(stderr, " $%lx\n",spTOS); }
 #else  #else
 #       define  NAME(string) asm("# "string);  #       define  NAME(string) asmcomment(string);
 #endif  #endif
   
 #ifdef DEBUG  #ifdef DEBUG
Line 359  Label *gforth_engine(Xt *ip0, Cell *sp0, Line 368  Label *gforth_engine(Xt *ip0, Cell *sp0,
 #include PRIM_LAB_I  #include PRIM_LAB_I
 #undef INST_ADDR  #undef INST_ADDR
   };    };
   #ifdef INCLUDE_IMAGE
   #define INST_ADDR(name) ((Label)&&I_##name)
   #include "image.i"
   #undef INST_ADDR
   #endif
 #ifdef CPU_DEP2  #ifdef CPU_DEP2
   CPU_DEP2    CPU_DEP2
 #endif  #endif

Removed from v.1.94  
changed lines
  Added in v.1.98


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