Commit d22e8bc4 authored by pazsan's avatar pazsan
Browse files

Changed threading ifdefs.

Requires debugging !!!!!!
Perhaps change concepts with LONG_LATENCY
on RISCs.
Added sokoban.fs as a nice little game.
parent a7507bf9
......@@ -17,9 +17,14 @@
/* 386 and below have no cache, 486 has a shared cache, and the
Pentium probably employs hardware cache consistency, so
flush-icache is a noop */
#define FLUSH_ICACHE(addr,size) 0
#define FLUSH_ICACHE(addr,size)
#ifdef DIRECT_THREADED
#define CALL 0xe8 /* call */
#define JMP 0xe9 /* jmp */
#define GETCFA(reg) ({ asm("popl %0" : "=r" (reg)); (int)reg -= 5;});
/* PFA gives the parameter field address corresponding to a cfa */
#define PFA(cfa) (((Cell *)cfa)+2)
/* PFA1 is a special version for use just after a NEXT1 */
......@@ -30,7 +35,7 @@
/* MAKE_CF creates an appropriate code field at the cfa; ca is the code address */
#define MAKE_CF(cfa,ca) ({long _cfa = (long)(cfa); \
long _ca = (long)(ca); \
*(char *)_cfa = 0xe9; /* jmp */ \
*(char *)_cfa = CALL; \
*(long *)(_cfa+1) = _ca-(_cfa+5);})
/* this is the point where the does code starts if label points to the
......@@ -42,9 +47,15 @@
#define DOES_CODE1(label) DOES_CODE(label)
/* this stores a jump dodoes at addr */
#define MAKE_DOES_HANDLER(addr) MAKE_CF(addr,symbols[DODOES])
#define MAKE_DOES_CF(addr,doesp) ({long _addr = (long)(addr); \
long _doesp = (long)(doesp)-8; \
*(char *)_addr = CALL; \
*(long *)(_addr+1) = _doesp-(_addr+5);})
#define MAKE_DOES_CF(addr,doesp) MAKE_CF(addr,((int)(doesp)-8))
#define MAKE_DOES_HANDLER(addr) ({long _addr = (long)(addr); \
long _dodo = (long)symbols[DODOES]; \
*(char *)_addr = JMP; \
*(long *)(_addr+1) = _dodo-(_addr+5);})
#endif
#ifdef FORCE_REG
......@@ -61,6 +72,10 @@
#else /* gcc-version */
/* this works with 2.6.3 (and quite well, too) */
/* since this is not very demanding, it's the default for other gcc versions */
#if defined(USE_TOS) && !defined(CFA_NEXT)
#define IPREG asm("%ebx")
#else
#define SPREG asm("%ebx")
#endif /* USE_TOS && !CFA_NEXT */
#endif /* gcc-version */
#endif /* FORCE_REG */
......@@ -30,7 +30,7 @@ XDEFINES = @DEFS@
SWITCHES = $(XCFLAGS) $(XDEFINES) #-DNDEBUG #turn off assertions
ENGINE_FLAGS = -fno-defer-pop -fcaller-saves
DEBUGFLAG = @DEBUGFLAG@
CFLAGS = -pipe -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(datadir)/gforth/$(VERSION):$(libdir)/gforth/$(VERSION):.\"
CFLAGS = $(DEBUGFLAG) -pipe -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(datadir)/gforth/$(VERSION):$(libdir)/gforth/$(VERSION):.\"
#John Wavrik should use -Xlinker -N to get a writable text (executable)
XLDFLAGS = @LDFLAGS@
......@@ -50,7 +50,7 @@ infodir = $(prefix)/info
mandir = $(prefix)/man/man1
INCLUDES = forth.h io.h
INCLUDES = forth.h threading.h io.h
KERN_SRC = main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
errore.fs kernal.fs version.fs extend.fs tools.fs toolsext.fs
......@@ -245,12 +245,15 @@ kernl64l.fi: $(KERNLS)
gforth.fi: @kernal_fi@ gforth startup.fs glocals.fs search-order.fs hash.fs float.fs debugging.fs environ.fs wordinfo.fs look.fs vt100.fs see.fs bufio.fs debug.fs history.fs vt100key.fs assert.fs blocks.fs struct.fs dumpimage.fs
$(FORTHK) startup.fs dumpimage.fs -e "savesystem gforth.fi bye"
engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
engine.s: engine.c primitives.i prim_labels.i machine.h threading.h $(INCLUDES)
$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
engine.o: engine.c primitives.i prim_labels.i machine.h threading.h $(INCLUDES)
$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c
main.o: main.c machine.h threading.h $(INCLUDES)
$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c main.c
strtoul.o: strtoul.c strtol.c
primitives.b: primitives
......
......@@ -18,6 +18,7 @@
#include <pwd.h>
#include "forth.h"
#include "io.h"
#include "threading.h"
#ifndef SEEK_SET
/* should be defined in stdio.h, but some systems don't have it */
......@@ -50,69 +51,6 @@ typedef struct F83Name {
#define F83NAME_SMUDGE(np) (((np)->countetc & 0x40) != 0)
#define F83NAME_IMMEDIATE(np) (((np)->countetc & 0x20) != 0)
/* !!someone should organize this ifdef chaos */
#if defined(LONG_LATENCY)
#if defined(AUTO_INCREMENT)
#define NEXT_P0 (cfa=*ip++)
#define IP (ip-1)
#else /* AUTO_INCREMENT */
#define NEXT_P0 (cfa=*ip)
#define IP ip
#endif /* AUTO_INCREMENT */
#define NEXT_INST (cfa)
#define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
#else /* LONG_LATENCY */
/* NEXT and NEXT1 are split into several parts to help scheduling,
unless CISC_NEXT is defined */
#define NEXT_P0
/* in order for execute to work correctly, NEXT_P0 (or other early
fetches) should not update the ip (or should we put
compensation-code into execute? */
#define NEXT_INST (*ip)
/* the next instruction (or what is in its place, e.g., an immediate
argument */
#define INC_IP(const_inc) (ip+=(const_inc))
/* increment the ip by const_inc and perform NEXT_P0 (or prefetching) again */
#define IP ip
/* the pointer to the next instruction (i.e., NEXT_INST could be
defined as *IP) */
#endif /* LONG_LATENCY */
#if defined(CISC_NEXT) && !defined(LONG_LATENCY)
#define NEXT1_P1
#define NEXT_P1
#define DEF_CA
#ifdef DIRECT_THREADED
#define NEXT1_P2 ({goto *cfa;})
#else
#define NEXT1_P2 ({goto **cfa;})
#endif /* DIRECT_THREADED */
#define NEXT_P2 ({cfa = *ip++; NEXT1_P2;})
#else /* defined(CISC_NEXT) && !defined(LONG_LATENCY) */
#ifdef DIRECT_THREADED
#define NEXT1_P1
#define NEXT1_P2 ({goto *cfa;})
#define DEF_CA
#else /* DIRECT_THREADED */
#define NEXT1_P1 ({ca = *cfa;})
#define NEXT1_P2 ({goto *ca;})
#define DEF_CA Label ca;
#endif /* DIRECT_THREADED */
#if defined(LONG_LATENCY)
#if defined(AUTO_INCREMENT)
#define NEXT_P1 NEXT1_P1
#else /* AUTO_INCREMENT */
#define NEXT_P1 ({ip++; NEXT1_P1;})
#endif /* AUTO_INCREMENT */
#else /* LONG_LATENCY */
#define NEXT_P1 ({cfa=*ip++; NEXT1_P1;})
#endif /* LONG_LATENCY */
#define NEXT_P2 NEXT1_P2
#endif /* defined(CISC_NEXT) && !defined(LONG_LATENCY) */
#define NEXT1 ({DEF_CA NEXT1_P1; NEXT1_P2;})
#define NEXT ({DEF_CA NEXT_P1; NEXT_P2;})
#ifdef USE_TOS
#define IF_TOS(x) x
#else
......@@ -251,7 +189,9 @@ Label *engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0)
register Cell *rp RPREG = rp0;
register Float *fp FPREG = fp0;
register Address lp LPREG = lp0;
#ifdef CFA_NEXT
register Xt cfa CFAREG;
#endif
register Address up UPREG = up0;
IF_TOS(register Cell TOS TOSREG;)
IF_FTOS(register Float FTOS FTOSREG;)
......@@ -286,8 +226,12 @@ Label *engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0)
NEXT;
docol:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: col: %08x\n",(Cell)ip,(Cell)PFA1(cfa));
fprintf(stderr,"%08lx: col: %08lx\n",(Cell)ip,(Cell)PFA1(cfa));
#endif
#ifdef CISC_NEXT
/* this is the simple version */
......@@ -310,58 +254,95 @@ Label *engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0)
NEXT1_P2;
}
#endif
#ifndef CFA_NEXT
}
#endif
docon:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: con: %08x\n",(Cell)ip,*(Cell*)PFA1(cfa));
fprintf(stderr,"%08lx: con: %08lx\n",(Cell)ip,*(Cell*)PFA1(cfa));
#endif
#ifdef USE_TOS
*sp-- = TOS;
TOS = *(Cell *)PFA1(cfa);
#else
*--sp = *(Cell *)PFA1(cfa);
#endif
#ifndef CFA_NEXT
}
#endif
NEXT_P0;
NEXT;
dovar:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: var: %08x\n",(Cell)ip,(Cell)PFA1(cfa));
fprintf(stderr,"%08lx: var: %08lx\n",(Cell)ip,(Cell)PFA1(cfa));
#endif
#ifdef USE_TOS
*sp-- = TOS;
TOS = (Cell)PFA1(cfa);
#else
*--sp = (Cell)PFA1(cfa);
#endif
#ifndef CFA_NEXT
}
#endif
NEXT_P0;
NEXT;
douser:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: user: %08x\n",(Cell)ip,(Cell)PFA1(cfa));
fprintf(stderr,"%08lx: user: %08lx\n",(Cell)ip,(Cell)PFA1(cfa));
#endif
#ifdef USE_TOS
*sp-- = TOS;
TOS = (Cell)(up+*(Cell*)PFA1(cfa));
#else
*--sp = (Cell)(up+*(Cell*)PFA1(cfa));
#endif
#ifndef CFA_NEXT
}
#endif
NEXT_P0;
NEXT;
dodefer:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: defer: %08x\n",(Cell)ip,(Cell)PFA1(cfa));
fprintf(stderr,"%08lx: defer: %08lx\n",(Cell)ip,*(Cell*)PFA1(cfa));
#endif
EXEC(*(Xt *)PFA1(cfa));
#ifndef CFA_NEXT
}
#endif
cfa = *(Xt *)PFA1(cfa);
NEXT1;
dofield:
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
#endif
#ifdef DEBUG
fprintf(stderr,"%08x: field: %08x\n",(Cell)ip,(Cell)PFA1(cfa));
fprintf(stderr,"%08lx: field: %08lx\n",(Cell)ip,(Cell)PFA1(cfa));
#endif
TOS += *(Cell*)PFA1(cfa);
#ifndef CFA_NEXT
}
#endif
NEXT_P0;
NEXT;
......@@ -383,8 +364,14 @@ Label *engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0)
pfa:
*/
#ifndef CFA_NEXT
{
Xt cfa; GETCFA(cfa);
/* fprintf(stderr, "Got CFA %08lx at doescode %08lx/%08lx: does: %08lx\n",cfa,(Cell)ip,(Cell)PFA(cfa),(Cell)DOES_CODE1(cfa));*/
#endif
#ifdef DEBUG
fprintf(stderr,"%08x/%08x: does: %08x\n",(Cell)ip,(Cell)PFA(cfa),(Cell)DOES_CODE1(cfa));
fprintf(stderr,"%08lx/%08lx: does: %08lx\n",(Cell)ip,(Cell)PFA(cfa),(Cell)DOES_CODE1(cfa));
fflush(stderr);
#endif
*--rp = (Cell)ip;
......@@ -395,6 +382,10 @@ Label *engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0)
TOS = (Cell)PFA(cfa);
#else
*--sp = (Cell)PFA(cfa);
#endif
#ifndef CFA_NEXT
/* fprintf(stderr,"TOS = %08lx, IP=%08lx\n", TOS, IP);*/
}
#endif
NEXT_P0;
NEXT;
......
......@@ -65,7 +65,7 @@ Label *engine(Xt *ip, Cell *sp, Cell *rp, Float *fp, Address lp);
#endif
#ifdef DEBUG
# define NAME(string) fprintf(stderr,"%08x: "string"\n",(Cell)ip);
# define NAME(string) fprintf(stderr,"%08lx: "string"\n",(Cell)ip);
#else
# define NAME(string)
#endif
......
/*
$Id: hppa.h,v 1.10 1995-10-12 20:43:24 pazsan Exp $
$Id: hppa.h,v 1.11 1995-10-26 22:48:40 pazsan Exp $
Copyright 1992 by the ANSI figForth Development Group
This is the machine-specific part for a HPPA running HP-UX
......@@ -22,8 +22,8 @@ extern void cacheflush(void *, int, int);
({ \
fprintf(stderr,"Flushing Cache at %08x:%08x\n",(int) addr, size); \
fflush(stderr); \
fprintf(stderr,"Cache flushed, final address: %08x\n", \
(int)cacheflush((void *)(addr), (int)(size), 32)); })
cacheflush((void *)(addr), (int)(size), 32); \
fprintf(stderr,"Cache flushed\n"); })
#else
# define FLUSH_ICACHE(addr,size) \
cacheflush((void *)(addr), (int)(size), 32)
......
......@@ -1661,7 +1661,7 @@ Variable argc
: process-path ( addr1 u1 -- addr2 u2 )
\ addr1 u1 is a path string, addr2 u2 is an array of dir strings
here >r
align here >r
BEGIN
over >r [char] : scan
over r> tuck - ( rest-str this-str )
......
/*
$Id: main.c,v 1.28 1995-10-11 19:39:35 anton Exp $
$Id: main.c,v 1.29 1995-10-26 22:48:41 pazsan Exp $
Copyright 1993 by the ANSI figForth Development Group
*/
......@@ -288,27 +288,38 @@ int main(int argc, char **argv, char **env)
}
}
path1=path;
do {
char *pend=strchr(path, ':');
if (pend==NULL)
pend=path+strlen(path);
if (strlen(path)==0) {
fprintf(stderr,"%s: cannot open image file %s in path %s for reading\n",
progname, imagename, path1);
exit(1);
if(strchr(imagename, '/')==NULL)
{
do {
char *pend=strchr(path, ':');
if (pend==NULL)
pend=path+strlen(path);
if (strlen(path)==0) {
fprintf(stderr,"%s: cannot open image file %s in path %s for reading\n",
progname, imagename, path1);
exit(1);
}
{
int dirlen=pend-path;
char fullfilename[dirlen+strlen(imagename)+2];
memcpy(fullfilename, path, dirlen);
if (fullfilename[dirlen-1]!='/')
fullfilename[dirlen++]='/';
strcpy(fullfilename+dirlen,imagename);
image_file=fopen(fullfilename,"rb");
}
path=pend+(*pend==':');
} while (image_file==NULL);
}
else
{
int dirlen=pend-path;
char fullfilename[dirlen+strlen(imagename)+2];
memcpy(fullfilename, path, dirlen);
if (fullfilename[dirlen-1]!='/')
fullfilename[dirlen++]='/';
strcpy(fullfilename+dirlen,imagename);
image_file=fopen(fullfilename,"rb");
image_file=fopen(imagename,"rb");
if(image_file==NULL)
fprintf(stderr,"%s: cannot open image file %s for reading\n",
progname, imagename);
}
path=pend+(*pend==':');
} while (image_file==NULL);
{
Cell environ[]= {
(Cell)argc-(optind-1),
......
......@@ -91,9 +91,8 @@ INC_IP(1);
execute xt -- core
ip=IP;
cfa = xt;
IF_TOS(TOS = sp[0]);
NEXT1;
EXEC(xt);
branch-lp+!# -- gforth branch_lp_plus_store_number
/* this will probably not be used */
......@@ -173,7 +172,11 @@ Cell index = *rp;
/* dependent upon two's complement arithmetic */
UCell olddiff = index-rp[1];
if (olddiff>u) {
#ifdef i386
*rp -= u;
#else
*rp = index - u;
#endif
IF_TOS(TOS = sp[0]);
)
......@@ -1368,8 +1371,8 @@ sf_addr = (SFloat *)((((Cell)c_addr)+(sizeof(SFloat)-1))&~sizeof(SFloat));
dfaligned c_addr -- df_addr float-ext d_f_aligned
df_addr = (DFloat *)((((Cell)c_addr)+(sizeof(DFloat)-1))&~sizeof(DFloat));
\ The following words access machine/OS/installation-dependent ANSI
\ figForth internals
\ The following words access machine/OS/installation-dependent
\ Gforth internals
\ !! how about environmental queries DIRECT-THREADED,
\ INDIRECT-THREADED, TOS-CACHED, FTOS-CACHED, CODEFIELD-DOES */
......
This diff is collapsed.
......@@ -4,6 +4,6 @@ char *strsignal(int sig)
{
/* !! use sys_siglist; how do I find out how many sigs there are? */
static char errbuf[50];
sprintf(errbuf,"siganl %d",sig);
sprintf(errbuf,"signal %d",sig);
return errbuf;
}
/* This file defines a number of threading schemes.
To organize the former ifdef chaos, each path is separated
This gives a quite impressive number of paths, but you clearly
find things that go together. */
#ifndef GETCFA
# define CFA_NEXT
#endif
#if defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && defined(CFA_NEXT)
#warning scheme 1
# define NEXT_P0 ({cfa=*ip++;})
# define IP (ip-1)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1
# define NEXT_P2 ({goto *cfa;})
# define EXEC(XT) ({cfa=(XT); goto *cfa;})
#endif
#if defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && !defined(CFA_NEXT)
#warning scheme 2
# define NEXT_P0 (ip++)
# define IP (ip-1)
# define NEXT_INST (*(ip-1))
# define INC_IP(const_inc) ({ ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1
# define NEXT_P2 ({goto **(ip-1);})
# define EXEC(XT) ({goto *(XT);})
#endif
#if defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && defined(CFA_NEXT)
#warning scheme 3
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*ip)
# define INC_IP(const_inc) ({ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 ({cfa=*ip++;})
# define NEXT_P2 ({goto *cfa;})
# define EXEC(XT) ({cfa=(XT); goto *cfa;})
#endif
#if defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && !defined(CFA_NEXT)
#warning scheme 4
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*ip)
# define INC_IP(const_inc) ({ ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1
# define NEXT_P2 ({goto **(ip++);})
# define EXEC(XT) ({goto *(XT);})
#endif
/* without autoincrement */
#if defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && defined(CFA_NEXT)
#warning scheme 5
# define NEXT_P0 ({cfa=*ip;})
# define IP (ip)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 (ip++)
# define NEXT_P2 ({goto *cfa;})
# define EXEC(XT) ({cfa=(XT); goto *cfa;})
#endif
#if defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && !defined(CFA_NEXT)
#warning scheme 6
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*ip)
# define INC_IP(const_inc) (ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 (ip++)
# define NEXT_P2 ({goto **(ip-1);})
# define EXEC(XT) ({goto *(XT);})
#endif
#if defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && defined(CFA_NEXT)
#warning scheme 7
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*ip)
# define INC_IP(const_inc) ({ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 ({cfa=*ip++;})
# define NEXT_P2 ({goto *cfa;})
# define EXEC(XT) ({cfa=(XT); goto *cfa;})
#endif
#if defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && !defined(CFA_NEXT)
#warning scheme 8
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*IP)
# define INC_IP(const_inc) ({ ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 (ip++)
# define NEXT_P2 ({goto **(ip-1);})
# define EXEC(XT) ({goto *(XT);})
#endif
/* common settings for direct THREADED */
/* indirect THREADED */
#if !defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && defined(CISC_NEXT)
# define NEXT_P0 ({cfa=*ip++;})
# define IP (ip-1)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1
# define NEXT_P2 ({goto **cfa;})
# define EXEC(XT) ({cfa=(XT); goto **cfa;})
#endif
#if !defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && !defined(CISC_NEXT)
# define NEXT_P0 ({cfa=*ip++;})
# define IP (ip-1)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA Label ca;
# define NEXT_P1 ({ca=*cfa;})
# define NEXT_P2 ({goto *ca;})
# define EXEC(XT) ({DEF_CA cfa=(XT); ca=*cfa; goto *ca;})
#endif
#if !defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && defined(CISC_NEXT)
# define NEXT_P0
# define IP (ip)
# define NEXT_INST (*ip)
# define INC_IP(const_inc) ({ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 ({cfa=*ip++;})
# define NEXT_P2 ({goto **cfa;})
# define EXEC(XT) ({cfa=(XT); goto **cfa;})
#endif
#if !defined(DIRECT_THREADED) && defined(AUTO_INCREMENT)\
&& !defined(LONG_LATENCY) && !defined(CISC_NEXT)
# define NEXT_P0 ({cfa=*ip++;})
# define IP (ip-1)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA Label ca;
# define NEXT_P1 ({ca=*cfa;})
# define NEXT_P2 ({goto *ca;})
# define EXEC(XT) ({DEF_CA cfa=(XT); ca=*cfa; goto *ca;})
#endif
/* without autoincrement */
#if !defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && defined(CISC_NEXT)
# define NEXT_P0 ({cfa=*ip;})
# define IP (ip)
# define NEXT_INST (cfa)
# define INC_IP(const_inc) ({cfa=IP[const_inc]; ip+=(const_inc);})
# define DEF_CA
# define NEXT_P1 (ip++)
# define NEXT_P2 ({goto **cfa;})
# define EXEC(XT) ({cfa=(XT); goto **cfa;})
#endif
#if !defined(DIRECT_THREADED) && !defined(AUTO_INCREMENT)\
&& defined(LONG_LATENCY) && !defined(CISC_NEXT)
# define NEXT_P0 ({cfa=*ip;})
# define IP (ip)