Diff for /gforth/vmgen-ex/engine.c between versions 1.10 and 1.16

version 1.10, 2002/08/20 07:59:02 version 1.16, 2007/12/31 19:02:25
Line 1 Line 1
 /* vm interpreter wrapper  /* vm interpreter wrapper
   
   Copyright (C) 2001 Free Software Foundation, Inc.    Copyright (C) 2001,2002,2003,2007 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
   Gforth is free software; you can redistribute it and/or    Gforth is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License    modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2    as published by the Free Software Foundation, either version 3
   of the License, or (at your option) any later version.    of the License, or (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,    This program is distributed in the hope that it will be useful,
Line 15 Line 15
   GNU General Public License for more details.    GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License    You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software    along with this program; if not, see http://www.gnu.org/licenses/.
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.  
 */  */
   
 #include "mini.h"  #include "mini.h"
Line 40 Line 39
   
 /* here you select the threading scheme; I have only set this up for  /* here you select the threading scheme; I have only set this up for
    386 and generic, because I don't know what preprocessor macros to     386 and generic, because I don't know what preprocessor macros to
    test for (Gforth uses config.guess instead).     test for (Gforth uses config.guess instead).  Anyway, it's probably
    Anyway, it's probably best to build them all and select the fastest     best to build them all and select the fastest instead of hardwiring
    instead of hardwiring a specific scheme for an architecture. */     a specific scheme for an architecture.  E.g., scheme 8 is fastest
      for Gforth "make bench" on a 486, whereas scheme 5 is fastest for
      "mini fib.mini" on an Athlon */
 #ifndef THREADING_SCHEME  #ifndef THREADING_SCHEME
 #ifdef i386  
 #define THREADING_SCHEME 8  
 #else  
 #define THREADING_SCHEME 5  #define THREADING_SCHEME 5
 #endif  
 #endif /* defined(THREADING_SCHEME) */  #endif /* defined(THREADING_SCHEME) */
   
 #ifdef __GNUC__  #ifdef __GNUC__
Line 80 Line 77
 /* direct threading scheme 5: early fetching (Alpha, MIPS) */  /* direct threading scheme 5: early fetching (Alpha, MIPS) */
 #  define CFA_NEXT  #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            ((Cell *)ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(Inst *)(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
 #  define NEXT_INST     ((Cell)cfa)  #  define NEXT_INST     (cfa)
 #  define INC_IP(const_inc)     ({cfa=ip[const_inc]; ip+=(const_inc);})  #  define INC_IP(const_inc)     ({cfa=ip[const_inc]; ip+=(const_inc);})
 #  define DEF_CA  #  define DEF_CA
 #  define NEXT_P1       (ip++)  #  define NEXT_P1       (ip++)
Line 165  enum { Line 162  enum {
 };  };
 #endif  #endif
   
   #if defined(__GNUC__) && ((__GNUC__==2 && defined(__GNUC_MINOR__) && __GNUC_MINOR__>=7)||(__GNUC__>2))
   #define MAYBE_UNUSED __attribute__((unused))
   #else
   #define MAYBE_UNUSED
   #endif
   
 /* the return type can be anything you want it to */  /* the return type can be anything you want it to */
 Cell engine(Inst *ip0, Cell *sp, char *fp)  Cell engine(Inst *ip0, Cell *sp, char *fp)
 {  {

Removed from v.1.10  
changed lines
  Added in v.1.16


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