Diff for /gforth/vmgen-ex2/engine.c between versions 1.1 and 1.2

version 1.1, 2002/06/02 15:46:17 version 1.2, 2002/06/02 17:02:56
Line 53 Line 53
 #endif  #endif
 #endif /* defined(THREADING_SCHEME) */  #endif /* defined(THREADING_SCHEME) */
   
   #ifdef __GNUC__
 #if THREADING_SCHEME==1  #if THREADING_SCHEME==1
 /* direct threading scheme 1: autoinc, long latency (HPPA, Sharc) */  /* direct threading scheme 1: autoinc, long latency (HPPA, Sharc) */
 #  define NEXT_P0       ({cfa=*ip++;})  #  define NEXT_P0       ({cfa=*ip++;})
Line 135 Line 136
 #define IPTOS ((Cell)(NEXT_INST))  #define IPTOS ((Cell)(NEXT_INST))
 #define CASE  #define CASE
   
   #define INST_ADDR(name) (Label)&&I_##name
   #define LABEL(name) I_##name
   #else /* !defined(__GNUC__) */
   /* use switch dispatch */
   #define DEF_CA
   #define NEXT_P0
   #define NEXT_P1
   #define NEXT_P2 goto next_inst;
   #define SET_IP(p)       (ip=(p))
   #define IP              ip
   #define NEXT_INST       (*ip)
   #define INC_IP(const_inc)       (ip+=(const_inc))
   #define IPTOS NEXT_INST
   #define INST_ADDR(name) I_##name
   #define LABEL(name) case I_##name
   
   #endif /* !defined(__GNUC__) */
   
 #ifdef VM_PROFILING  #ifdef VM_PROFILING
 #define SUPER_END  vm_count_block(IP)  #define SUPER_END  vm_count_block(IP)
 #else  #else
 #define SUPER_END  #define SUPER_END
 #endif  #endif
   
 #define INST_ADDR(name) (Label)&&I_##name  #ifndef __GNUC__
 #define LABEL(name) I_##name  enum {
   #include "mini-labels.i"
   };
   #endif
   
 /* the return type can be anything you want it to */  /* the return type can be anything you want it to */
 long engine(Cell *ip0, Cell *sp, char *fp)  long engine(Cell *ip0, Cell *sp, char *fp)
Line 175  long engine(Cell *ip0, Cell *sp, char *f Line 197  long engine(Cell *ip0, Cell *sp, char *f
   
   SET_IP(ip0);    SET_IP(ip0);
   SUPER_END;  /* count the BB starting at ip0 */    SUPER_END;  /* count the BB starting at ip0 */
   NEXT;  
   
   #ifdef __GNUC__
     NEXT;
 #include "mini-vm.i"  #include "mini-vm.i"
   #else  
    next_inst:
     switch((*ip++).inst) {
   #include "mini-vm.i"
     default:
       fprintf(stderr,"unknown instruction %d at %p\n", ip[-1], ip-1);
       exit(1);
     }
   #endif
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.2


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