mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-11 23:43:19 +00:00
Begin to modernize optimized dispatch. (#271)
This feature was controlled by the compilation flag `OPDISP` which would enable some bits of assembler on the x86 (ISC or DOS) or some other specialized code on SPARC. On SPARC hardware, there was a special compilation process that would preprocess the code and generate dispatch tables. We do this now when this feature is enabled using gcc's computed gotos feature. This is available in clang and some other compilers. Notably, it isn't present in Visual Studio. This doesn't decrease our portability at all as this feature is optional and it replaces specialized assembler code with C using compiler extensions (making it cross-platform). In doing this, we've removed a bunch of related code, however, it is likely that other pieces yet remain and will be removed in subsequent commits as we clean things up and refine them. This feature remains disabled by default for now.
This commit is contained in:
parent
61a0c02681
commit
b7e9529322
@ -40,7 +40,6 @@ SUN3_OS3_OR_OS4_IL Try asm optimizations for 68K & either sunOS. This is
|
||||
turned on whenever either of SUN3_OS3_IL or SUN3_OS4_IL is on.
|
||||
|
||||
OPDISP Use "fast-opcode-dispatch" macros
|
||||
SPARCDISP Use fast-opcode-dispatch macros on SPARC
|
||||
|
||||
|
||||
|
||||
@ -74,7 +73,7 @@ INIT Used when compiling an emulator to build a loadup. Use it
|
||||
to dike out code that deals with network initialization, e.g.
|
||||
|
||||
MYOPTRACE Used to check the stack's validity on each opcode execution.
|
||||
Requires NOASM, and the absence of SUN..._IL and SPARCDISP &c.
|
||||
Requires NOASM, and the absence of SUN..._IL &c.
|
||||
|
||||
PCTRACE When true, compiles in a 100-long ring buffer that holds the
|
||||
last 100 PCs, Function-blocks, and Opcodes executed. "pccounter"
|
||||
|
||||
@ -13,7 +13,7 @@ LDFLAGS = -g graphics.lib binmode.lib mouse.lib
|
||||
|
||||
RM = del
|
||||
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c find-dsp.l dsphack.l xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
|
||||
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES)
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ LDFLAGS = -g graphics.lib binmode.lib mouse.lib
|
||||
|
||||
RM = del
|
||||
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c find-dsp.l dsphack.l xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
|
||||
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES)
|
||||
|
||||
|
||||
@ -67,60 +67,6 @@ BYTESWAPFILES = $(OBJECTDIR)byteswap.o
|
||||
|
||||
default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
|
||||
|
||||
# Special rules to create xc.c on Sun4
|
||||
|
||||
#run cpp to expand macros
|
||||
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
|
||||
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
||||
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
||||
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
|
||||
$(INCDIR)arith.h $(INCDIR)stream.h \
|
||||
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
||||
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
|
||||
$(INCDIR)inln68k.h
|
||||
$(CC) -Qproduce .i $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.i
|
||||
|
||||
#run c compiler to produce first pass assembly
|
||||
$(OBJECTDIR)xc.s1: $(OBJECTDIR)xc.i
|
||||
rm -f $(OBJECTDIR)xc.s1
|
||||
/lib/ccom - $(FPFLAGS) <$(OBJECTDIR)xc.i >$(OBJECTDIR)xc.s1
|
||||
|
||||
#generate C program to remove dispatch loop, optimize
|
||||
$(OBJECTDIR)dsphack.c: $(SRCDIR)dsphack.lex
|
||||
rm -f $(OBJECTDIR)dsphack.c
|
||||
lex -t $(SRCDIR)dsphack.lex > $(OBJECTDIR)dsphack.c
|
||||
|
||||
#uses this program to find dispatch
|
||||
$(OBJECTDIR)find-dsp.c: $(SRCDIR)find-dsp.lex
|
||||
rm -f $(OBJECTDIR)find-dsp.c
|
||||
lex -t $(SRCDIR)find-dsp.lex > $(OBJECTDIR)find-dsp.c
|
||||
|
||||
$(OBJECTDIR)find-dsp: $(OBJECTDIR)find-dsp.c
|
||||
$(CC) -o $(OBJECTDIR)find-dsp $(OBJECTDIR)find-dsp.c -ll
|
||||
|
||||
$(OBJECTDIR)dispatch-label.c: $(OBJECTDIR)find-dsp $(OBJECTDIR)xc.s1
|
||||
rm -f $(OBJECTDIR)dispatch-label.c
|
||||
$(OBJECTDIR)find-dsp < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)dispatch-label.c
|
||||
|
||||
$(OBJECTDIR)dsphack: $(OBJECTDIR)dsphack.c $(OBJECTDIR)dispatch-label.c
|
||||
$(CC) -o $(OBJECTDIR)dsphack $(OBJECTDIR)dispatch-label.c $(OBJECTDIR)dsphack.c -ll
|
||||
rm -f $(OBJECTDIR)dispatch-label.o $(OBJECTDIR)dsphack.o
|
||||
|
||||
$(OBJECTDIR)xc.s2: $(OBJECTDIR)xc.s1 $(OBJECTDIR)dsphack
|
||||
rm -f $(OBJECTDIR)xc.s2
|
||||
$(OBJECTDIR)dsphack < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)xc.s2
|
||||
|
||||
$(OBJECTDIR)xc.s3: $(OBJECTDIR)xc.s2 $(INLINE)
|
||||
rm -f $(OBJECTDIR)xc.s3
|
||||
/usr/lib/inline -i $(INLINE) < $(OBJECTDIR)xc.s2 > $(OBJECTDIR)xc.s3
|
||||
|
||||
#$(OBJECTDIR)xc.o: $(OBJECTDIR)xc.s3
|
||||
# /bin/as -o $(OBJECTDIR)xc.o -O1 $(OBJECTDIR)xc.s3
|
||||
|
||||
|
||||
########### debugging version of xc maker
|
||||
|
||||
|
||||
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
|
||||
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
||||
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
||||
@ -128,4 +74,4 @@ $(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDI
|
||||
$(INCDIR)arith.h $(INCDIR)stream.h \
|
||||
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
||||
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
|
||||
$(CC) $(DISPRFLAGS) -USPARCDISP -UOPDISP -DNOASM $(INLINE) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
|
||||
$(CC) $(DISPRFLAGS) $(INLINE) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
|
||||
|
||||
@ -75,60 +75,6 @@ BYTESWAPFILES = $(OBJECTDIR)byteswap.o
|
||||
|
||||
default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
|
||||
|
||||
# Special rules to create xc.c on Sun4
|
||||
|
||||
#run cpp to expand macros
|
||||
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
|
||||
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
||||
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
||||
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
|
||||
$(INCDIR)arith.h $(INCDIR)stream.h \
|
||||
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
||||
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
|
||||
$(INCDIR)inln68k.h
|
||||
$(CC) -Qproduce .i $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.i
|
||||
|
||||
#run c compiler to produce first pass assembly
|
||||
$(OBJECTDIR)xc.s1: $(OBJECTDIR)xc.i
|
||||
rm -f $(OBJECTDIR)xc.s1
|
||||
/lib/ccom - $(FPFLAGS) <$(OBJECTDIR)xc.i >$(OBJECTDIR)xc.s1
|
||||
|
||||
#generate C program to remove dispatch loop, optimize
|
||||
$(OBJECTDIR)dsphack.c: $(SRCDIR)dsphack.lex
|
||||
rm -f $(OBJECTDIR)dsphack.c
|
||||
lex -t $(SRCDIR)dsphack.lex > $(OBJECTDIR)dsphack.c
|
||||
|
||||
#uses this program to find dispatch
|
||||
$(OBJECTDIR)find-dsp.c: $(SRCDIR)find-dsp.lex
|
||||
rm -f $(OBJECTDIR)find-dsp.c
|
||||
lex -t $(SRCDIR)find-dsp.lex > $(OBJECTDIR)find-dsp.c
|
||||
|
||||
$(OBJECTDIR)find-dsp: $(OBJECTDIR)find-dsp.c
|
||||
$(CC) -o $(OBJECTDIR)find-dsp $(OBJECTDIR)find-dsp.c -ll
|
||||
|
||||
$(OBJECTDIR)dispatch-label.c: $(OBJECTDIR)find-dsp $(OBJECTDIR)xc.s1
|
||||
rm -f $(OBJECTDIR)dispatch-label.c
|
||||
$(OBJECTDIR)find-dsp < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)dispatch-label.c
|
||||
|
||||
$(OBJECTDIR)dsphack: $(OBJECTDIR)dsphack.c $(OBJECTDIR)dispatch-label.c
|
||||
$(CC) -o $(OBJECTDIR)dsphack $(OBJECTDIR)dispatch-label.c $(OBJECTDIR)dsphack.c -ll
|
||||
rm -f $(OBJECTDIR)dispatch-label.o $(OBJECTDIR)dsphack.o
|
||||
|
||||
$(OBJECTDIR)xc.s2: $(OBJECTDIR)xc.s1 $(OBJECTDIR)dsphack
|
||||
rm -f $(OBJECTDIR)xc.s2
|
||||
$(OBJECTDIR)dsphack < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)xc.s2
|
||||
|
||||
$(OBJECTDIR)xc.s3: $(OBJECTDIR)xc.s2 $(INLINE)
|
||||
rm -f $(OBJECTDIR)xc.s3
|
||||
/usr/lib/inline -i $(INLINE) < $(OBJECTDIR)xc.s2 > $(OBJECTDIR)xc.s3
|
||||
|
||||
#$(OBJECTDIR)xc.o: $(OBJECTDIR)xc.s3
|
||||
# /bin/as -o $(OBJECTDIR)xc.o -O1 $(OBJECTDIR)xc.s3
|
||||
|
||||
|
||||
########### debugging version of xc maker
|
||||
|
||||
|
||||
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
|
||||
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
||||
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
||||
@ -136,4 +82,4 @@ $(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDI
|
||||
$(INCDIR)arith.h $(INCDIR)stream.h \
|
||||
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
||||
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
|
||||
$(CC) $(DISPRFLAGS) -USPARCDISP -UOPDISP -DNOASM $(INLINE) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
|
||||
$(CC) $(DISPRFLAGS) $(INLINE) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
|
||||
|
||||
@ -12,7 +12,7 @@ LDFLAGS = -g graphics.lib binmode.lib mouse.lib
|
||||
|
||||
RM = del
|
||||
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c find-dsp.l dsphack.l xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
|
||||
|
||||
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES)
|
||||
|
||||
|
||||
@ -68,7 +68,6 @@ SRCFILES = $(SRCDIR)conspage.c $(SRCDIR)gcoflow.c $(SRCDIR)shift.c $(SRCDIR)dbgt
|
||||
$(SRCDIR)rawcolor.c $(SRCDIR)vars3.c $(SRCDIR)gcfinal.c $(SRCDIR)ldsout.c $(SRCDIR)return.c \
|
||||
$(SRCDIR)vmemsave.c $(SRCDIR)chardev.c $(SRCDIR)gchtfind.c $(SRCDIR)lineblt8.c $(SRCDIR)rpc.c \
|
||||
$(SRCDIR)xc.c $(SRCDIR)common.c $(SRCDIR)gcmain3.c $(SRCDIR)lisp2c.c $(SRCDIR)rplcons.c $(SRCDIR)z2.c \
|
||||
$(SRCDIR)find-dsp.l $(SRCDIR)dsphack.l \
|
||||
$(SRCDIR)xmkicon.c $(SRCDIR)xbbt.c $(SRCDIR)xinit.c $(SRCDIR)xscroll.c $(SRCDIR)xcursor.c $(SRCDIR)xlspwin.c \
|
||||
$(SRCDIR)xrdopt.c $(SRCDIR)xwinman.c \
|
||||
$(SRCDIR)dosmouse.c $(SRCDIR)vesafns.asm $(SRCDIR)vesainit.c $(SRCDIR)vgainit.c $(SRCDIR)kbdif.c \
|
||||
|
||||
@ -73,7 +73,6 @@ SRCFILES = SRCDIR/conspage.c SRCDIR/gcoflow.c SRCDIR/shift.c SRCDIR/dbgtool.c SR
|
||||
SRCDIR/rawcolor.c SRCDIR/vars3.c SRCDIR/gcfinal.c SRCDIR/ldsout.c SRCDIR/return.c \
|
||||
SRCDIR/vmemsave.c SRCDIR/chardev.c SRCDIR/gchtfind.c SRCDIR/lineblt8.c SRCDIR/rpc.c \
|
||||
SRCDIR/xc.c SRCDIR/common.c SRCDIR/gcmain3.c SRCDIR/lisp2c.c SRCDIR/rplcons.c SRCDIR/z2.c \
|
||||
SRCDIR/find-dsp.l SRCDIR/dsphack.l \
|
||||
SRCDIR/xmkicon.c SRCDIR/xbbt.c SRCDIR/xinit.c SRCDIR/xscroll.c SRCDIR/xcursor.c SRCDIR/xlspwin.c \
|
||||
SRCDIR/xrdopt.c SRCDIR/xwinman.c \
|
||||
SRCDIR/dosmouse.c SRCDIR/vesafns.asm SRCDIR/vesainit.c SRCDIR/vgainit.c SRCDIR/kbdif.c \
|
||||
|
||||
@ -73,7 +73,6 @@ SRCFILES = SRCDIR/conspage.c SRCDIR/gcoflow.c SRCDIR/shift.c SRCDIR/dbgtool.c SR
|
||||
SRCDIR/rawcolor.c SRCDIR/vars3.c SRCDIR/gcfinal.c SRCDIR/ldsout.c SRCDIR/return.c \
|
||||
SRCDIR/vmemsave.c SRCDIR/chardev.c SRCDIR/gchtfind.c SRCDIR/lineblt8.c SRCDIR/rpc.c \
|
||||
SRCDIR/xc.c SRCDIR/common.c SRCDIR/gcmain3.c SRCDIR/lisp2c.c SRCDIR/rplcons.c SRCDIR/z2.c \
|
||||
SRCDIR/find-dsp.l SRCDIR/dsphack.l \
|
||||
SRCDIR/xmkicon.c SRCDIR/xbbt.c SRCDIR/xinit.c SRCDIR/xscroll.c SRCDIR/xcursor.c SRCDIR/xlspwin.c \
|
||||
SRCDIR/xrdopt.c SRCDIR/xwinman.c \
|
||||
SRCDIR/dosmouse.c SRCDIR/vesafns.asm SRCDIR/vesainit.c SRCDIR/vgainit.c SRCDIR/kbdif.c \
|
||||
|
||||
@ -26,7 +26,7 @@ CFLAGS = -I. -DDOS -DBYTESWAP -DKBINT -DNOPIXRECT -O2
|
||||
|
||||
LDFLAGS = -O2 graphics.lib binmode.lib mouse.lib
|
||||
|
||||
SRCFILES = ./conspage.c ./gcoflow.c ./shift.c ./dbgtool.c ./gcr.c ./llcolor.c ./gcrcell.c ./llstk.c ./gcscan.c ./loopsops.c ./storage.c ./allocmds.c ./dir.c ./gvar2.c ./lowlev1.c ./subr.c ./arith2.c ./lowlev2.c ./subr0374.c ./arith3.c ./doscomm.c ./hardrtn.c ./lsthandl.c ./sxhash.c ./arith4.c ./draw.c ./main.c ./testtool.c ./array.c ./dsk.c ./inet.c ./misc7.c ./timer.c ./array2.c ./dspif.c ./initdsp.c ./miscn.c ./typeof.c ./array3.c ./initkbd.c ./ubf1.c ./array4.c ./dspsubrs.c ./initsout.c ./mkatom.c ./ubf2.c ./array5.c ./eqf.c ./intcall.c ./mkcell.c ./ubf3.c ./array6.c ./ether.c ./mkvdate.c ./ufn.c ./atom.c ./findkey.c ./kbdsubrs.c ./mouseif.c ./ufs.c ./bbtsub.c ./foreign.c ./keyevent.c ./unixcomm.c ./bin.c ./fp.c ./binds.c ./asmbbt.c ./fvar.c ./mvs.c ./unwind.c ./bitblt.c ./gc.c ./uraid.c ./blt.c ./gc2.c ./kprint.c ./osmsg.c usrsubr.c ./byteswap.c ./gcarray.c ./perrno.c ./ldeboot.c ./ldeether.c ./uutils.c ./carcdr.c ./gccode.c ./rawcolor.c ./vars3.c ./gcfinal.c ./ldsout.c ./return.c ./vmemsave.c ./chardev.c ./gchtfind.c ./lineblt8.c ./rpc.c ./xc.c ./common.c ./gcmain3.c ./lisp2c.c ./rplcons.c ./z2.c ./find-dsp.l ./dsphack.l ./xmkicon.c ./xbbt.c ./xinit.c ./xscroll.c ./xcursor.c ./xlspwin.c ./xrdopt.c ./xwinman.c ./dosmouse.c ./vesafns.asm ./vesainit.c ./vgainit.c ./kbdif.c ./dspsparc.il ./copyright ./launch.asm
|
||||
SRCFILES = ./conspage.c ./gcoflow.c ./shift.c ./dbgtool.c ./gcr.c ./llcolor.c ./gcrcell.c ./llstk.c ./gcscan.c ./loopsops.c ./storage.c ./allocmds.c ./dir.c ./gvar2.c ./lowlev1.c ./subr.c ./arith2.c ./lowlev2.c ./subr0374.c ./arith3.c ./doscomm.c ./hardrtn.c ./lsthandl.c ./sxhash.c ./arith4.c ./draw.c ./main.c ./testtool.c ./array.c ./dsk.c ./inet.c ./misc7.c ./timer.c ./array2.c ./dspif.c ./initdsp.c ./miscn.c ./typeof.c ./array3.c ./initkbd.c ./ubf1.c ./array4.c ./dspsubrs.c ./initsout.c ./mkatom.c ./ubf2.c ./array5.c ./eqf.c ./intcall.c ./mkcell.c ./ubf3.c ./array6.c ./ether.c ./mkvdate.c ./ufn.c ./atom.c ./findkey.c ./kbdsubrs.c ./mouseif.c ./ufs.c ./bbtsub.c ./foreign.c ./keyevent.c ./unixcomm.c ./bin.c ./fp.c ./binds.c ./asmbbt.c ./fvar.c ./mvs.c ./unwind.c ./bitblt.c ./gc.c ./uraid.c ./blt.c ./gc2.c ./kprint.c ./osmsg.c usrsubr.c ./byteswap.c ./gcarray.c ./perrno.c ./ldeboot.c ./ldeether.c ./uutils.c ./carcdr.c ./gccode.c ./rawcolor.c ./vars3.c ./gcfinal.c ./ldsout.c ./return.c ./vmemsave.c ./chardev.c ./gchtfind.c ./lineblt8.c ./rpc.c ./xc.c ./common.c ./gcmain3.c ./lisp2c.c ./rplcons.c ./z2.c ./xmkicon.c ./xbbt.c ./xinit.c ./xscroll.c ./xcursor.c ./xlspwin.c ./xrdopt.c ./xwinman.c ./dosmouse.c ./vesafns.asm ./vesainit.c ./vgainit.c ./kbdif.c ./dspsparc.il ./copyright ./launch.asm
|
||||
|
||||
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj llcolor.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES)
|
||||
|
||||
|
||||
209
inc/fast_dsp.h
209
inc/fast_dsp.h
@ -41,216 +41,11 @@
|
||||
|
||||
#ifdef OPDISP /* Only do any of this if OPDISP is set. */
|
||||
|
||||
/* Sun 3 */
|
||||
#ifdef mc68020
|
||||
/* We only need to redefine nextop0 as the others build upon it. */
|
||||
#undef nextop0
|
||||
#undef nextop1
|
||||
#undef nextop2
|
||||
#undef nextop3
|
||||
#undef nextop4
|
||||
/* JRB - fast case is now nextop1 */
|
||||
#define nextop0 { fast0_dispatcher(); goto nextopcode; }
|
||||
#define nextop1 { fast1_dispatcher(); goto nextopcode; }
|
||||
#define nextop2 { fast1_dispatcher2(); }
|
||||
#define nextop3 { PCMACL += 2; nextop1; }
|
||||
#define nextop4 { PCMACL += 3; nextop1; }
|
||||
#endif
|
||||
|
||||
/* Sun 386i */
|
||||
#ifdef I386
|
||||
#undef nextop0
|
||||
#undef nextop1
|
||||
#undef nextop2
|
||||
#undef nextop3
|
||||
#undef nextop4
|
||||
/* JRB - fast case is now nextop1 */
|
||||
#define nextop0 { fast0_dispatcher(); goto nextopcode; }
|
||||
#define nextop1 { fast1_dispatcher(); goto nextopcode; }
|
||||
#define nextop2 { fast2_dispatcher(); }
|
||||
#define nextop3 { PCMACL += 2; nextop1; }
|
||||
#define nextop4 { PCMACL += 3; nextop1; }
|
||||
#endif
|
||||
|
||||
|
||||
/* ISC 386 using gcc */
|
||||
#ifdef ISC
|
||||
#undef nextop0
|
||||
#undef nextop1
|
||||
#undef nextop2
|
||||
#undef nextop3
|
||||
#undef nextop4
|
||||
|
||||
#define nextop0 { fast0_dispatcher(); goto nextopcode; }
|
||||
#define nextop1 { fast1_dispatcher(); goto nextopcode; }
|
||||
#define nextop2 { fast2_dispatcher(); goto nextopcode;}
|
||||
#define nextop3 { fast3_dispatcher(); goto nextopcode;}
|
||||
#define nextop4 { fast4_dispatcher(); goto nextopcode;}
|
||||
|
||||
#define fast0_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
// leal -1(%0),%%eax \n\
|
||||
/ xorb $3,%%al \n\
|
||||
/ movzbl (%%eax),%%eax \n\
|
||||
movzbl -1(%0),%%eax \n\
|
||||
jmp *optable(,%%eax,4)" : : "r" (pccache): "ax");
|
||||
|
||||
#define fast1_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
/ movl %0,%%eax \n\
|
||||
/ xorb $3,%%al \n\
|
||||
movzbl (%0),%%eax \n\
|
||||
incl %0 \n\
|
||||
/ movzbl (%%eax),%%eax \n\
|
||||
jmp *optable(,%%eax,4)" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast2_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
/ leal 1(%0),%%eax \n\
|
||||
movzbl 1(%0),%%eax \n\
|
||||
addl $2,%0 \n\
|
||||
/ xorb $3,%%al \n\
|
||||
/ movzbl (%%eax),%%eax \n\
|
||||
jmp *optable(,%%eax,4)" :"=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast3_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
/ leal 2(%0),%%eax \n\
|
||||
movzbl 2(%0),%%eax \n\
|
||||
addl $3,%0 \n\
|
||||
/ xorb $3,%%al \n\
|
||||
/ movzbl (%%eax),%%eax \n\
|
||||
jmp *optable(,%%eax,4)" :"=r" (pccache) : "0" (pccache): "ax");
|
||||
#define fast4_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
/ leal 3(%0),%%eax \n\
|
||||
movzbl 3(%0),%%eax \n\
|
||||
addl $4,%0 \n\
|
||||
/ xorb $3,%%al \n\
|
||||
/ movzbl (%%eax),%%eax \n\
|
||||
jmp *optable(,%%eax,4)" :"=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#endif
|
||||
#define nextop0 goto *optable[Get_BYTE_PCMAC0]
|
||||
|
||||
#endif /* OPDISP */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ISC 386 using gcc with turbo assembler (DOS version) */
|
||||
#ifdef DOS
|
||||
#undef nextop0
|
||||
#undef nextop1
|
||||
#undef nextop2
|
||||
#undef nextop3
|
||||
#undef nextop4
|
||||
|
||||
#define nextop0 { fast0_dispatcher(); goto nextopcode; }
|
||||
#define nextop1 { fast1_dispatcher(); goto nextopcode; }
|
||||
#define nextop2 { fast2_dispatcher(); goto nextopcode;}
|
||||
#define nextop3 { fast3_dispatcher(); goto nextopcode;}
|
||||
#define nextop4 { fast4_dispatcher(); goto nextopcode;}
|
||||
|
||||
#define fast0_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
lea eax,-1[%0] \n\
|
||||
xor al,3 \n\
|
||||
movzx eax, BYTE PTR [eax] \n\
|
||||
; mov dword ptr save_opcode, eax \n\
|
||||
; mov dword ptr save_pc, esi \n\
|
||||
; mov dword ptr save_tos, ebx \n\
|
||||
; mov dword ptr save_tsptr, edi \n\
|
||||
; mov dword ptr save_esp, esp \n\
|
||||
; mov dword ptr save_ebp, ebp \n\
|
||||
jmp OFFSET CODE32:optable[eax*4]" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast1_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
mov eax,%0 \n\
|
||||
xor al,3 \n\
|
||||
inc %0 \n\
|
||||
movzx eax, BYTE PTR [eax] \n\
|
||||
; mov dword ptr save_opcode, eax \n\
|
||||
; mov dword ptr save_pc, esi \n\
|
||||
; mov dword ptr save_tos, ebx \n\
|
||||
; mov dword ptr save_tsptr, edi \n\
|
||||
; mov dword ptr save_esp, esp \n\
|
||||
; mov dword ptr save_ebp, ebp \n\
|
||||
jmp OFFSET CODE32:optable[eax*4]" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast2_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
lea eax,1[%0] \n\
|
||||
add %0,2 \n\
|
||||
xor al,3 \n\
|
||||
movzx eax, BYTE PTR [eax] \n\
|
||||
; mov dword ptr save_opcode, eax \n\
|
||||
; mov dword ptr save_pc, esi \n\
|
||||
; mov dword ptr save_tos, ebx \n\
|
||||
; mov dword ptr save_tsptr, edi \n\
|
||||
; mov dword ptr save_esp, esp \n\
|
||||
; mov dword ptr save_ebp, ebp \n\
|
||||
jmp OFFSET CODE32:optable[eax*4]" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast3_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
lea eax,2[%0] \n\
|
||||
add %0,3 \n\
|
||||
xor al,3 \n\
|
||||
movzx eax, BYTE PTR [eax] \n\
|
||||
; mov dword ptr save_opcode, eax \n\
|
||||
; mov dword ptr save_pc, esi \n\
|
||||
; mov dword ptr save_tos, ebx \n\
|
||||
; mov dword ptr save_tsptr, edi \n\
|
||||
; mov dword ptr save_esp, esp \n\
|
||||
; mov dword ptr save_ebp, ebp \n\
|
||||
jmp OFFSET CODE32:optable[eax*4]" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#define fast4_dispatcher() \
|
||||
asm volatile(" \n\
|
||||
lea eax,3[%0] \n\
|
||||
add %0,4 \n\
|
||||
xor al,3 \n\
|
||||
movzx eax, BYTE PTR [eax] \n\
|
||||
; mov dword ptr save_opcode, eax \n\
|
||||
; mov dword ptr save_pc, esi \n\
|
||||
; mov dword ptr save_tos, ebx \n\
|
||||
; mov dword ptr save_tsptr, edi \n\
|
||||
; mov dword ptr save_esp, esp \n\
|
||||
; mov dword ptr save_ebp, ebp \n\
|
||||
jmp OFFSET CODE32:optable[eax*4]" : "=r" (pccache) : "0" (pccache): "ax");
|
||||
|
||||
#endif /* DOS */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef SPARCDISP
|
||||
#undef nextop0
|
||||
#undef nextop1
|
||||
#undef nextop2
|
||||
#undef nextop3
|
||||
#undef nextop4
|
||||
#define nextop0 { fast_dispatcher(table, Get_BYTE(PCMAC)); goto nextopcode; }
|
||||
#define nextop_n(n) { \
|
||||
PCMACL += n; \
|
||||
nextop0; \
|
||||
}
|
||||
#define nextop1 { nextop_n(1); }
|
||||
#define nextop2 { nextop_n(2); }
|
||||
#define nextop3 { nextop_n(3); }
|
||||
#define nextop4 { nextop_n(4); }
|
||||
#endif /* SPARCDISP */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FAST_DSP_H */
|
||||
|
||||
@ -34,32 +34,6 @@ lispemul.h: #define Get_BYTE(byteptr) (((BYTECODE *)(byteptr))->code)
|
||||
lispemul.h: typedef struct {unsigned code : 8;} BYTECODE;
|
||||
*/
|
||||
|
||||
/* shuffle loads to go faster */
|
||||
#undef IVARMACRO
|
||||
#define IVARMACRO(x) { \
|
||||
register LispPTR *var = (LispPTR *)IVar; \
|
||||
\
|
||||
HARD_PUSH(TOPOFSTACK); \
|
||||
{register unsigned char opcode; \
|
||||
opcode = *(unsigned char *)(PCMAC+1); \
|
||||
TOPOFSTACK = *(var + x); \
|
||||
PCMACL += 1; \
|
||||
fast_dispatcher(table, opcode);} \
|
||||
goto nextopcode; }
|
||||
|
||||
#undef PVARMACRO
|
||||
#define PVARMACRO(x) { \
|
||||
register LispPTR *var = (LispPTR *)PVar; \
|
||||
\
|
||||
HARD_PUSH(TOPOFSTACK); \
|
||||
{register unsigned char opcode; \
|
||||
opcode = *(unsigned char *)(PCMAC+1); \
|
||||
TOPOFSTACK = *(var + x); \
|
||||
PCMACL += 1; \
|
||||
fast_dispatcher(table, opcode);} \
|
||||
goto nextopcode; }
|
||||
|
||||
|
||||
#define NSMALLP(x) (((x) >> 17) ^ 7)
|
||||
#define NSMALLP_RANGE(x) (((x << 15) >>15) ^ x)
|
||||
|
||||
|
||||
526
inc/profile.h
526
inc/profile.h
@ -15,274 +15,260 @@
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifdef PROFILE
|
||||
#define ASM(OPT,OPT2) asm(OPT2); asm(OPT)
|
||||
#else
|
||||
#ifdef ISC
|
||||
/* ISC 386 version needs assembler labels to make the dispatch table */
|
||||
#define ASM(OPT,OPT2) asm(OPT)
|
||||
#else
|
||||
#define ASM(OPT,OPT2)
|
||||
#endif /* ISC */
|
||||
|
||||
#endif /* PROFILE */
|
||||
|
||||
|
||||
|
||||
#define CASE000 ASM("_op000:", " .globl _op000"); case000
|
||||
#define CASE001 ASM("_op001:", " .globl _op001"); case001
|
||||
#define CASE002 ASM("_op002:", " .globl _op002"); case002
|
||||
#define CASE003 ASM("_op003:", " .globl _op003"); case003
|
||||
#define CASE004 ASM("_op004:", " .globl _op004"); case004
|
||||
#define CASE005 ASM("_op005:", " .globl _op005"); case005
|
||||
#define CASE006 ASM("_op006:", " .globl _op006"); case006
|
||||
#define CASE007 ASM("_op007:", " .globl _op007"); case007
|
||||
#define CASE010 ASM("_op010:", " .globl _op010"); case010
|
||||
#define CASE011 ASM("_op011:", " .globl _op011"); case011
|
||||
#define CASE012 ASM("_op012:", " .globl _op012"); case012
|
||||
#define CASE013 ASM("_op013:", " .globl _op013"); case013
|
||||
#define CASE014 ASM("_op014:", " .globl _op014"); case014
|
||||
#define CASE015 ASM("_op015:", " .globl _op015"); case015
|
||||
#define CASE016 ASM("_op016:", " .globl _op016"); case016
|
||||
#define CASE017 ASM("_op017:", " .globl _op017"); case017
|
||||
#define CASE020 ASM("_op020:", " .globl _op020"); case020
|
||||
#define CASE021 ASM("_op021:", " .globl _op021"); case021
|
||||
#define CASE022 ASM("_op022:", " .globl _op022"); case022
|
||||
#define CASE023 ASM("_op023:", " .globl _op023"); case023
|
||||
#define CASE024 ASM("_op024:", " .globl _op024"); case024
|
||||
#define CASE025 ASM("_op025:", " .globl _op025"); case025
|
||||
#define CASE026 ASM("_op026:", " .globl _op026"); case026
|
||||
#define CASE027 ASM("_op027:", " .globl _op027"); case027
|
||||
#define CASE030 ASM("_op030:", " .globl _op030"); case030
|
||||
#define CASE031 ASM("_op031:", " .globl _op031"); case031
|
||||
#define CASE032 ASM("_op032:", " .globl _op032"); case032
|
||||
#define CASE033 ASM("_op033:", " .globl _op033"); case033
|
||||
#define CASE034 ASM("_op034:", " .globl _op034"); case034
|
||||
#define CASE035 ASM("_op035:", " .globl _op035"); case035
|
||||
#define CASE036 ASM("_op036:", " .globl _op036"); case036
|
||||
#define CASE037 ASM("_op037:", " .globl _op037"); case037
|
||||
#define CASE040 ASM("_op040:", " .globl _op040"); case040
|
||||
#define CASE041 ASM("_op041:", " .globl _op041"); case041
|
||||
#define CASE042 ASM("_op042:", " .globl _op042"); case042
|
||||
#define CASE043 ASM("_op043:", " .globl _op043"); case043
|
||||
#define CASE044 ASM("_op044:", " .globl _op044"); case044
|
||||
#define CASE045 ASM("_op045:", " .globl _op045"); case045
|
||||
#define CASE046 ASM("_op046:", " .globl _op046"); case046
|
||||
#define CASE047 ASM("_op047:", " .globl _op047"); case047
|
||||
#define CASE050 ASM("_op050:", " .globl _op050"); case050
|
||||
#define CASE051 ASM("_op051:", " .globl _op051"); case051
|
||||
#define CASE052 ASM("_op052:", " .globl _op052"); case052
|
||||
#define CASE053 ASM("_op053:", " .globl _op053"); case053
|
||||
#define CASE054 ASM("_op054:", " .globl _op054"); case054
|
||||
#define CASE055 ASM("_op055:", " .globl _op055"); case055
|
||||
#define CASE056 ASM("_op056:", " .globl _op056"); case056
|
||||
#define CASE057 ASM("_op057:", " .globl _op057"); case057
|
||||
#define CASE060 ASM("_op060:", " .globl _op060"); case060
|
||||
#define CASE061 ASM("_op061:", " .globl _op061"); case061
|
||||
#define CASE062 ASM("_op062:", " .globl _op062"); case062
|
||||
#define CASE063 ASM("_op063:", " .globl _op063"); case063
|
||||
#define CASE064 ASM("_op064:", " .globl _op064"); case064
|
||||
#define CASE065 ASM("_op065:", " .globl _op065"); case065
|
||||
#define CASE066 ASM("_op066:", " .globl _op066"); case066
|
||||
#define CASE067 ASM("_op067:", " .globl _op067"); case067
|
||||
#define CASE070 ASM("_op070:", " .globl _op070"); case070
|
||||
#define CASE071 ASM("_op071:", " .globl _op071"); case071
|
||||
#define CASE072 ASM("_op072:", " .globl _op072"); case072
|
||||
#define CASE073 ASM("_op073:", " .globl _op073"); case073
|
||||
#define CASE074 ASM("_op074:", " .globl _op074"); case074
|
||||
#define CASE075 ASM("_op075:", " .globl _op075"); case075
|
||||
#define CASE076 ASM("_op076:", " .globl _op076"); case076
|
||||
#define CASE077 ASM("_op077:", " .globl _op077"); case077
|
||||
#define CASE100 ASM("_op100:", " .globl _op100"); case100
|
||||
#define CASE101 ASM("_op101:", " .globl _op101"); case101
|
||||
#define CASE102 ASM("_op102:", " .globl _op102"); case102
|
||||
#define CASE103 ASM("_op103:", " .globl _op103"); case103
|
||||
#define CASE104 ASM("_op104:", " .globl _op104"); case104
|
||||
#define CASE105 ASM("_op105:", " .globl _op105"); case105
|
||||
#define CASE106 ASM("_op106:", " .globl _op106"); case106
|
||||
#define CASE107 ASM("_op107:", " .globl _op107"); case107
|
||||
#define CASE110 ASM("_op110:", " .globl _op110"); case110
|
||||
#define CASE111 ASM("_op111:", " .globl _op111"); case111
|
||||
#define CASE112 ASM("_op112:", " .globl _op112"); case112
|
||||
#define CASE113 ASM("_op113:", " .globl _op113"); case113
|
||||
#define CASE114 ASM("_op114:", " .globl _op114"); case114
|
||||
#define CASE115 ASM("_op115:", " .globl _op115"); case115
|
||||
#define CASE116 ASM("_op116:", " .globl _op116"); case116
|
||||
#define CASE117 ASM("_op117:", " .globl _op117"); case117
|
||||
#define CASE120 ASM("_op120:", " .globl _op120"); case120
|
||||
#define CASE121 ASM("_op121:", " .globl _op121"); case121
|
||||
#define CASE122 ASM("_op122:", " .globl _op122"); case122
|
||||
#define CASE123 ASM("_op123:", " .globl _op123"); case123
|
||||
#define CASE124 ASM("_op124:", " .globl _op124"); case124
|
||||
#define CASE125 ASM("_op125:", " .globl _op125"); case125
|
||||
#define CASE126 ASM("_op126:", " .globl _op126"); case126
|
||||
#define CASE127 ASM("_op127:", " .globl _op127"); case127
|
||||
#define CASE130 ASM("_op130:", " .globl _op130"); case130
|
||||
#define CASE131 ASM("_op131:", " .globl _op131"); case131
|
||||
#define CASE132 ASM("_op132:", " .globl _op132"); case132
|
||||
#define CASE133 ASM("_op133:", " .globl _op133"); case133
|
||||
#define CASE134 ASM("_op134:", " .globl _op134"); case134
|
||||
#define CASE135 ASM("_op135:", " .globl _op135"); case135
|
||||
#define CASE136 ASM("_op136:", " .globl _op136"); case136
|
||||
#define CASE137 ASM("_op137:", " .globl _op137"); case137
|
||||
#define CASE140 ASM("_op140:", " .globl _op140"); case140
|
||||
#define CASE141 ASM("_op141:", " .globl _op141"); case141
|
||||
#define CASE142 ASM("_op142:", " .globl _op142"); case142
|
||||
#define CASE143 ASM("_op143:", " .globl _op143"); case143
|
||||
#define CASE144 ASM("_op144:", " .globl _op144"); case144
|
||||
#define CASE145 ASM("_op145:", " .globl _op145"); case145
|
||||
#define CASE146 ASM("_op146:", " .globl _op146"); case146
|
||||
#define CASE147 ASM("_op147:", " .globl _op147"); case147
|
||||
#define CASE150 ASM("_op150:", " .globl _op150"); case150
|
||||
#define CASE151 ASM("_op151:", " .globl _op151"); case151
|
||||
#define CASE152 ASM("_op152:", " .globl _op152"); case152
|
||||
#define CASE153 ASM("_op153:", " .globl _op153"); case153
|
||||
#define CASE154 ASM("_op154:", " .globl _op154"); case154
|
||||
#define CASE155 ASM("_op155:", " .globl _op155"); case155
|
||||
#define CASE156 ASM("_op156:", " .globl _op156"); case156
|
||||
#define CASE157 ASM("_op157:", " .globl _op157"); case157
|
||||
#define CASE160 ASM("_op160:", " .globl _op160"); case160
|
||||
#define CASE161 ASM("_op161:", " .globl _op161"); case161
|
||||
#define CASE162 ASM("_op162:", " .globl _op162"); case162
|
||||
#define CASE163 ASM("_op163:", " .globl _op163"); case163
|
||||
#define CASE164 ASM("_op164:", " .globl _op164"); case164
|
||||
#define CASE165 ASM("_op165:", " .globl _op165"); case165
|
||||
#define CASE166 ASM("_op166:", " .globl _op166"); case166
|
||||
#define CASE167 ASM("_op167:", " .globl _op167"); case167
|
||||
#define CASE170 ASM("_op170:", " .globl _op170"); case170
|
||||
#define CASE171 ASM("_op171:", " .globl _op171"); case171
|
||||
#define CASE172 ASM("_op172:", " .globl _op172"); case172
|
||||
#define CASE173 ASM("_op173:", " .globl _op173"); case173
|
||||
#define CASE174 ASM("_op174:", " .globl _op174"); case174
|
||||
#define CASE175 ASM("_op175:", " .globl _op175"); case175
|
||||
#define CASE176 ASM("_op176:", " .globl _op176"); case176
|
||||
#define CASE177 ASM("_op177:", " .globl _op177"); case177
|
||||
#define CASE200 ASM("_op200:", " .globl _op200"); case200
|
||||
#define CASE201 ASM("_op201:", " .globl _op201"); case201
|
||||
#define CASE202 ASM("_op202:", " .globl _op202"); case202
|
||||
#define CASE203 ASM("_op203:", " .globl _op203"); case203
|
||||
#define CASE204 ASM("_op204:", " .globl _op204"); case204
|
||||
#define CASE205 ASM("_op205:", " .globl _op205"); case205
|
||||
#define CASE206 ASM("_op206:", " .globl _op206"); case206
|
||||
#define CASE207 ASM("_op207:", " .globl _op207"); case207
|
||||
#define CASE210 ASM("_op210:", " .globl _op210"); case210
|
||||
#define CASE211 ASM("_op211:", " .globl _op211"); case211
|
||||
#define CASE212 ASM("_op212:", " .globl _op212"); case212
|
||||
#define CASE213 ASM("_op213:", " .globl _op213"); case213
|
||||
#define CASE214 ASM("_op214:", " .globl _op214"); case214
|
||||
#define CASE215 ASM("_op215:", " .globl _op215"); case215
|
||||
#define CASE216 ASM("_op216:", " .globl _op216"); case216
|
||||
#define CASE217 ASM("_op217:", " .globl _op217"); case217
|
||||
#define CASE220 ASM("_op220:", " .globl _op220"); case220
|
||||
#define CASE221 ASM("_op221:", " .globl _op221"); case221
|
||||
#define CASE222 ASM("_op222:", " .globl _op222"); case222
|
||||
#define CASE223 ASM("_op223:", " .globl _op223"); case223
|
||||
#define CASE224 ASM("_op224:", " .globl _op224"); case224
|
||||
#define CASE225 ASM("_op225:", " .globl _op225"); case225
|
||||
#define CASE226 ASM("_op226:", " .globl _op226"); case226
|
||||
#define CASE227 ASM("_op227:", " .globl _op227"); case227
|
||||
#define CASE230 ASM("_op230:", " .globl _op230"); case230
|
||||
#define CASE231 ASM("_op231:", " .globl _op231"); case231
|
||||
#define CASE232 ASM("_op232:", " .globl _op232"); case232
|
||||
#define CASE233 ASM("_op233:", " .globl _op233"); case233
|
||||
#define CASE234 ASM("_op234:", " .globl _op234"); case234
|
||||
#define CASE235 ASM("_op235:", " .globl _op235"); case235
|
||||
#define CASE236 ASM("_op236:", " .globl _op236"); case236
|
||||
#define CASE237 ASM("_op237:", " .globl _op237"); case237
|
||||
#define CASE240 ASM("_op240:", " .globl _op240"); case240
|
||||
#define CASE241 ASM("_op241:", " .globl _op241"); case241
|
||||
#define CASE242 ASM("_op242:", " .globl _op242"); case242
|
||||
#define CASE243 ASM("_op243:", " .globl _op243"); case243
|
||||
#define CASE244 ASM("_op244:", " .globl _op244"); case244
|
||||
#define CASE245 ASM("_op245:", " .globl _op245"); case245
|
||||
#define CASE246 ASM("_op246:", " .globl _op246"); case246
|
||||
#define CASE247 ASM("_op247:", " .globl _op247"); case247
|
||||
#define CASE250 ASM("_op250:", " .globl _op250"); case250
|
||||
#define CASE251 ASM("_op251:", " .globl _op251"); case251
|
||||
#define CASE252 ASM("_op252:", " .globl _op252"); case252
|
||||
#define CASE253 ASM("_op253:", " .globl _op253"); case253
|
||||
#define CASE254 ASM("_op254:", " .globl _op254"); case254
|
||||
#define CASE255 ASM("_op255:", " .globl _op255"); case255
|
||||
#define CASE256 ASM("_op256:", " .globl _op256"); case256
|
||||
#define CASE257 ASM("_op257:", " .globl _op257"); case257
|
||||
#define CASE260 ASM("_op260:", " .globl _op260"); case260
|
||||
#define CASE261 ASM("_op261:", " .globl _op261"); case261
|
||||
#define CASE262 ASM("_op262:", " .globl _op262"); case262
|
||||
#define CASE263 ASM("_op263:", " .globl _op263"); case263
|
||||
#define CASE264 ASM("_op264:", " .globl _op264"); case264
|
||||
#define CASE265 ASM("_op265:", " .globl _op265"); case265
|
||||
#define CASE266 ASM("_op266:", " .globl _op266"); case266
|
||||
#define CASE267 ASM("_op267:", " .globl _op267"); case267
|
||||
#define CASE270 ASM("_op270:", " .globl _op270"); case270
|
||||
#define CASE271 ASM("_op271:", " .globl _op271"); case271
|
||||
#define CASE272 ASM("_op272:", " .globl _op272"); case272
|
||||
#define CASE273 ASM("_op273:", " .globl _op273"); case273
|
||||
#define CASE274 ASM("_op274:", " .globl _op274"); case274
|
||||
#define CASE275 ASM("_op275:", " .globl _op275"); case275
|
||||
#define CASE276 ASM("_op276:", " .globl _op276"); case276
|
||||
#define CASE277 ASM("_op277:", " .globl _op277"); case277
|
||||
#define CASE300 ASM("_op300:", " .globl _op300"); case300
|
||||
#define CASE301 ASM("_op301:", " .globl _op301"); case301
|
||||
#define CASE302 ASM("_op302:", " .globl _op302"); case302
|
||||
#define CASE303 ASM("_op303:", " .globl _op303"); case303
|
||||
#define CASE304 ASM("_op304:", " .globl _op304"); case304
|
||||
#define CASE305 ASM("_op305:", " .globl _op305"); case305
|
||||
#define CASE306 ASM("_op306:", " .globl _op306"); case306
|
||||
#define CASE307 ASM("_op307:", " .globl _op307"); case307
|
||||
#define CASE310 ASM("_op310:", " .globl _op310"); case310
|
||||
#define CASE311 ASM("_op311:", " .globl _op311"); case311
|
||||
#define CASE312 ASM("_op312:", " .globl _op312"); case312
|
||||
#define CASE313 ASM("_op313:", " .globl _op313"); case313
|
||||
#define CASE314 ASM("_op314:", " .globl _op314"); case314
|
||||
#define CASE315 ASM("_op315:", " .globl _op315"); case315
|
||||
#define CASE316 ASM("_op316:", " .globl _op316"); case316
|
||||
#define CASE317 ASM("_op317:", " .globl _op317"); case317
|
||||
#define CASE320 ASM("_op320:", " .globl _op320"); case320
|
||||
#define CASE321 ASM("_op321:", " .globl _op321"); case321
|
||||
#define CASE322 ASM("_op322:", " .globl _op322"); case322
|
||||
#define CASE323 ASM("_op323:", " .globl _op323"); case323
|
||||
#define CASE324 ASM("_op324:", " .globl _op324"); case324
|
||||
#define CASE325 ASM("_op325:", " .globl _op325"); case325
|
||||
#define CASE326 ASM("_op326:", " .globl _op326"); case326
|
||||
#define CASE327 ASM("_op327:", " .globl _op327"); case327
|
||||
#define CASE330 ASM("_op330:", " .globl _op330"); case330
|
||||
#define CASE331 ASM("_op331:", " .globl _op331"); case331
|
||||
#define CASE332 ASM("_op332:", " .globl _op332"); case332
|
||||
#define CASE333 ASM("_op333:", " .globl _op333"); case333
|
||||
#define CASE334 ASM("_op334:", " .globl _op334"); case334
|
||||
#define CASE335 ASM("_op335:", " .globl _op335"); case335
|
||||
#define CASE336 ASM("_op336:", " .globl _op336"); case336
|
||||
#define CASE337 ASM("_op337:", " .globl _op337"); case337
|
||||
#define CASE340 ASM("_op340:", " .globl _op340"); case340
|
||||
#define CASE341 ASM("_op341:", " .globl _op341"); case341
|
||||
#define CASE342 ASM("_op342:", " .globl _op342"); case342
|
||||
#define CASE343 ASM("_op343:", " .globl _op343"); case343
|
||||
#define CASE344 ASM("_op344:", " .globl _op344"); case344
|
||||
#define CASE345 ASM("_op345:", " .globl _op345"); case345
|
||||
#define CASE346 ASM("_op346:", " .globl _op346"); case346
|
||||
#define CASE347 ASM("_op347:", " .globl _op347"); case347
|
||||
#define CASE350 ASM("_op350:", " .globl _op350"); case350
|
||||
#define CASE351 ASM("_op351:", " .globl _op351"); case351
|
||||
#define CASE352 ASM("_op352:", " .globl _op352"); case352
|
||||
#define CASE353 ASM("_op353:", " .globl _op353"); case353
|
||||
#define CASE354 ASM("_op354:", " .globl _op354"); case354
|
||||
#define CASE355 ASM("_op355:", " .globl _op355"); case355
|
||||
#define CASE356 ASM("_op356:", " .globl _op356"); case356
|
||||
#define CASE357 ASM("_op357:", " .globl _op357"); case357
|
||||
#define CASE360 ASM("_op360:", " .globl _op360"); case360
|
||||
#define CASE361 ASM("_op361:", " .globl _op361"); case361
|
||||
#define CASE362 ASM("_op362:", " .globl _op362"); case362
|
||||
#define CASE363 ASM("_op363:", " .globl _op363"); case363
|
||||
#define CASE364 ASM("_op364:", " .globl _op364"); case364
|
||||
#define CASE365 ASM("_op365:", " .globl _op365"); case365
|
||||
#define CASE366 ASM("_op366:", " .globl _op366"); case366
|
||||
#define CASE367 ASM("_op367:", " .globl _op367"); case367
|
||||
#define CASE370 ASM("_op370:", " .globl _op370"); case370
|
||||
#define CASE371 ASM("_op371:", " .globl _op371"); case371
|
||||
#define CASE372 ASM("_op372:", " .globl _op372"); case372
|
||||
#define CASE373 ASM("_op373:", " .globl _op373"); case373
|
||||
#define CASE374 ASM("_op374:", " .globl _op374"); case374
|
||||
#define CASE375 ASM("_op375:", " .globl _op375"); case375
|
||||
#define CASE376 ASM("_op376:", " .globl _op376"); case376
|
||||
#define CASE377 ASM("_op377:", " .globl _op377"); case377
|
||||
#define CASE000 case000
|
||||
#define CASE001 case001
|
||||
#define CASE002 case002
|
||||
#define CASE003 case003
|
||||
#define CASE004 case004
|
||||
#define CASE005 case005
|
||||
#define CASE006 case006
|
||||
#define CASE007 case007
|
||||
#define CASE010 case010
|
||||
#define CASE011 case011
|
||||
#define CASE012 case012
|
||||
#define CASE013 case013
|
||||
#define CASE014 case014
|
||||
#define CASE015 case015
|
||||
#define CASE016 case016
|
||||
#define CASE017 case017
|
||||
#define CASE020 case020
|
||||
#define CASE021 case021
|
||||
#define CASE022 case022
|
||||
#define CASE023 case023
|
||||
#define CASE024 case024
|
||||
#define CASE025 case025
|
||||
#define CASE026 case026
|
||||
#define CASE027 case027
|
||||
#define CASE030 case030
|
||||
#define CASE031 case031
|
||||
#define CASE032 case032
|
||||
#define CASE033 case033
|
||||
#define CASE034 case034
|
||||
#define CASE035 case035
|
||||
#define CASE036 case036
|
||||
#define CASE037 case037
|
||||
#define CASE040 case040
|
||||
#define CASE041 case041
|
||||
#define CASE042 case042
|
||||
#define CASE043 case043
|
||||
#define CASE044 case044
|
||||
#define CASE045 case045
|
||||
#define CASE046 case046
|
||||
#define CASE047 case047
|
||||
#define CASE050 case050
|
||||
#define CASE051 case051
|
||||
#define CASE052 case052
|
||||
#define CASE053 case053
|
||||
#define CASE054 case054
|
||||
#define CASE055 case055
|
||||
#define CASE056 case056
|
||||
#define CASE057 case057
|
||||
#define CASE060 case060
|
||||
#define CASE061 case061
|
||||
#define CASE062 case062
|
||||
#define CASE063 case063
|
||||
#define CASE064 case064
|
||||
#define CASE065 case065
|
||||
#define CASE066 case066
|
||||
#define CASE067 case067
|
||||
#define CASE070 case070
|
||||
#define CASE071 case071
|
||||
#define CASE072 case072
|
||||
#define CASE073 case073
|
||||
#define CASE074 case074
|
||||
#define CASE075 case075
|
||||
#define CASE076 case076
|
||||
#define CASE077 case077
|
||||
#define CASE100 case100
|
||||
#define CASE101 case101
|
||||
#define CASE102 case102
|
||||
#define CASE103 case103
|
||||
#define CASE104 case104
|
||||
#define CASE105 case105
|
||||
#define CASE106 case106
|
||||
#define CASE107 case107
|
||||
#define CASE110 case110
|
||||
#define CASE111 case111
|
||||
#define CASE112 case112
|
||||
#define CASE113 case113
|
||||
#define CASE114 case114
|
||||
#define CASE115 case115
|
||||
#define CASE116 case116
|
||||
#define CASE117 case117
|
||||
#define CASE120 case120
|
||||
#define CASE121 case121
|
||||
#define CASE122 case122
|
||||
#define CASE123 case123
|
||||
#define CASE124 case124
|
||||
#define CASE125 case125
|
||||
#define CASE126 case126
|
||||
#define CASE127 case127
|
||||
#define CASE130 case130
|
||||
#define CASE131 case131
|
||||
#define CASE132 case132
|
||||
#define CASE133 case133
|
||||
#define CASE134 case134
|
||||
#define CASE135 case135
|
||||
#define CASE136 case136
|
||||
#define CASE137 case137
|
||||
#define CASE140 case140
|
||||
#define CASE141 case141
|
||||
#define CASE142 case142
|
||||
#define CASE143 case143
|
||||
#define CASE144 case144
|
||||
#define CASE145 case145
|
||||
#define CASE146 case146
|
||||
#define CASE147 case147
|
||||
#define CASE150 case150
|
||||
#define CASE151 case151
|
||||
#define CASE152 case152
|
||||
#define CASE153 case153
|
||||
#define CASE154 case154
|
||||
#define CASE155 case155
|
||||
#define CASE156 case156
|
||||
#define CASE157 case157
|
||||
#define CASE160 case160
|
||||
#define CASE161 case161
|
||||
#define CASE162 case162
|
||||
#define CASE163 case163
|
||||
#define CASE164 case164
|
||||
#define CASE165 case165
|
||||
#define CASE166 case166
|
||||
#define CASE167 case167
|
||||
#define CASE170 case170
|
||||
#define CASE171 case171
|
||||
#define CASE172 case172
|
||||
#define CASE173 case173
|
||||
#define CASE174 case174
|
||||
#define CASE175 case175
|
||||
#define CASE176 case176
|
||||
#define CASE177 case177
|
||||
#define CASE200 case200
|
||||
#define CASE201 case201
|
||||
#define CASE202 case202
|
||||
#define CASE203 case203
|
||||
#define CASE204 case204
|
||||
#define CASE205 case205
|
||||
#define CASE206 case206
|
||||
#define CASE207 case207
|
||||
#define CASE210 case210
|
||||
#define CASE211 case211
|
||||
#define CASE212 case212
|
||||
#define CASE213 case213
|
||||
#define CASE214 case214
|
||||
#define CASE215 case215
|
||||
#define CASE216 case216
|
||||
#define CASE217 case217
|
||||
#define CASE220 case220
|
||||
#define CASE221 case221
|
||||
#define CASE222 case222
|
||||
#define CASE223 case223
|
||||
#define CASE224 case224
|
||||
#define CASE225 case225
|
||||
#define CASE226 case226
|
||||
#define CASE227 case227
|
||||
#define CASE230 case230
|
||||
#define CASE231 case231
|
||||
#define CASE232 case232
|
||||
#define CASE233 case233
|
||||
#define CASE234 case234
|
||||
#define CASE235 case235
|
||||
#define CASE236 case236
|
||||
#define CASE237 case237
|
||||
#define CASE240 case240
|
||||
#define CASE241 case241
|
||||
#define CASE242 case242
|
||||
#define CASE243 case243
|
||||
#define CASE244 case244
|
||||
#define CASE245 case245
|
||||
#define CASE246 case246
|
||||
#define CASE247 case247
|
||||
#define CASE250 case250
|
||||
#define CASE251 case251
|
||||
#define CASE252 case252
|
||||
#define CASE253 case253
|
||||
#define CASE254 case254
|
||||
#define CASE255 case255
|
||||
#define CASE256 case256
|
||||
#define CASE257 case257
|
||||
#define CASE260 case260
|
||||
#define CASE261 case261
|
||||
#define CASE262 case262
|
||||
#define CASE263 case263
|
||||
#define CASE264 case264
|
||||
#define CASE265 case265
|
||||
#define CASE266 case266
|
||||
#define CASE267 case267
|
||||
#define CASE270 case270
|
||||
#define CASE271 case271
|
||||
#define CASE272 case272
|
||||
#define CASE273 case273
|
||||
#define CASE274 case274
|
||||
#define CASE275 case275
|
||||
#define CASE276 case276
|
||||
#define CASE277 case277
|
||||
#define CASE300 case300
|
||||
#define CASE301 case301
|
||||
#define CASE302 case302
|
||||
#define CASE303 case303
|
||||
#define CASE304 case304
|
||||
#define CASE305 case305
|
||||
#define CASE306 case306
|
||||
#define CASE307 case307
|
||||
#define CASE310 case310
|
||||
#define CASE311 case311
|
||||
#define CASE312 case312
|
||||
#define CASE313 case313
|
||||
#define CASE314 case314
|
||||
#define CASE315 case315
|
||||
#define CASE316 case316
|
||||
#define CASE317 case317
|
||||
#define CASE320 case320
|
||||
#define CASE321 case321
|
||||
#define CASE322 case322
|
||||
#define CASE323 case323
|
||||
#define CASE324 case324
|
||||
#define CASE325 case325
|
||||
#define CASE326 case326
|
||||
#define CASE327 case327
|
||||
#define CASE330 case330
|
||||
#define CASE331 case331
|
||||
#define CASE332 case332
|
||||
#define CASE333 case333
|
||||
#define CASE334 case334
|
||||
#define CASE335 case335
|
||||
#define CASE336 case336
|
||||
#define CASE337 case337
|
||||
#define CASE340 case340
|
||||
#define CASE341 case341
|
||||
#define CASE342 case342
|
||||
#define CASE343 case343
|
||||
#define CASE344 case344
|
||||
#define CASE345 case345
|
||||
#define CASE346 case346
|
||||
#define CASE347 case347
|
||||
#define CASE350 case350
|
||||
#define CASE351 case351
|
||||
#define CASE352 case352
|
||||
#define CASE353 case353
|
||||
#define CASE354 case354
|
||||
#define CASE355 case355
|
||||
#define CASE356 case356
|
||||
#define CASE357 case357
|
||||
#define CASE360 case360
|
||||
#define CASE361 case361
|
||||
#define CASE362 case362
|
||||
#define CASE363 case363
|
||||
#define CASE364 case364
|
||||
#define CASE365 case365
|
||||
#define CASE366 case366
|
||||
#define CASE367 case367
|
||||
#define CASE370 case370
|
||||
#define CASE371 case371
|
||||
#define CASE372 case372
|
||||
#define CASE373 case373
|
||||
#define CASE374 case374
|
||||
#define CASE375 case375
|
||||
#define CASE376 case376
|
||||
#define CASE377 case377
|
||||
#endif /* PROFILE_H */
|
||||
|
||||
@ -119,29 +119,6 @@
|
||||
.end
|
||||
|
||||
|
||||
.inline fast0_dispatcher,0
|
||||
leal -1(%edi),%eax
|
||||
xorb $3,%al
|
||||
movzbl (%eax),%eax
|
||||
jmp *optable(,%eax,4)
|
||||
.end
|
||||
|
||||
.inline fast1_dispatcher,0
|
||||
movl %edi,%eax
|
||||
xorb $3,%al
|
||||
movzbl (%eax),%eax
|
||||
incl %edi
|
||||
jmp *optable(,%eax,4)
|
||||
.end
|
||||
|
||||
.inline fast2_dispatcher,0
|
||||
leal 1(%edi),%eax
|
||||
xorb $3,%al
|
||||
addl $2,%edi
|
||||
movzbl (%eax),%eax
|
||||
jmp *optable(,%eax,4)
|
||||
.end
|
||||
|
||||
.inline plus_err_label,0
|
||||
plus_err:
|
||||
.end
|
||||
|
||||
@ -78,59 +78,6 @@ done: ! else done;
|
||||
.end
|
||||
|
||||
|
||||
/* inline dispatching support */
|
||||
/* Thanks to Russ Atkinson, December 29, 1987 */
|
||||
|
||||
/* To use in compiling XXX, cc -O2 XXX.c dispatch.il */
|
||||
|
||||
/* The qdisp* routines depend on pc being in %o0 and table being in %o1 */
|
||||
|
||||
.inline _qdisp0,8
|
||||
! qdisp0 - %o0: pc, %o1: table
|
||||
ldub [%o0+0],%o2 ! temp = *pc
|
||||
sll %o2,2,%o2 ! temp = temp * 4
|
||||
ld [%o2+%o1],%o2 ! temp = table[temp]
|
||||
jmp %o2 ! dispatch
|
||||
nop
|
||||
.end
|
||||
|
||||
.inline _qdisp1,8
|
||||
! qdisp1 - %o0: pc, %o1: table
|
||||
ldub [%o0+1],%o2 ! temp = *pc
|
||||
sll %o2,2,%o2 ! temp = temp * 4
|
||||
ld [%o2+%o1],%o2 ! temp = table[temp]
|
||||
jmp %o2 ! dispatch
|
||||
add %o0,1,%o0 ! update the pc
|
||||
.end
|
||||
|
||||
.inline _qdisp2,8
|
||||
! qdisp2 - %o0: pc, %o1: table
|
||||
ldub [%o0+2],%o2 ! temp = *pc
|
||||
sll %o2,2,%o2 ! temp = temp * 4
|
||||
ld [%o2+%o1],%o2 ! temp = table[temp]
|
||||
jmp %o2 ! dispatch
|
||||
add %o0,2,%o0 ! update the pc
|
||||
.end
|
||||
|
||||
.inline _qdisp3,8
|
||||
! qdisp3 - %o0: pc, %o1: table
|
||||
ldub [%o0+3],%o2 ! temp = *pc
|
||||
sll %o2,2,%o2 ! temp = temp * 4
|
||||
ld [%o2+%o1],%o2 ! temp = table[temp]
|
||||
jmp %o2 ! dispatch
|
||||
add %o0,3,%o0 ! update the pc
|
||||
.end
|
||||
|
||||
|
||||
.inline _fast_dispatcher,8
|
||||
! - %o0: table, %o1: pc
|
||||
ldub [%o1+0],%o1 ! fetch inst byte
|
||||
sll %o1,2,%o1
|
||||
ld [%o1+%o0],%o1
|
||||
jmp %o1 ! dispatch
|
||||
nop
|
||||
.end
|
||||
|
||||
/*
|
||||
***************************************************************
|
||||
Inline Assembly help for dispatcher.
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
/* @(#) disphack.lex Version 1.5 (11/2/88). copyright envos & Fuji Xerox */
|
||||
|
||||
REG "%"[oilg][0-9]
|
||||
LABEL L[0-9]+
|
||||
COMPUTE "\tcall\t_compute_dispatch_table,0\n nop\n\tmov\t%o0,"
|
||||
DISPATCH "\tmov\t"{REG}",%o0\n\tcall\t_fast_dispatcher,2\n\tnop\n"
|
||||
HEXD 0x[0-3]
|
||||
ADDX "\tadd\t"{REG}","{HEXD}","{REG}
|
||||
LDUB "\tldub\t["{REG}"],"{REG}
|
||||
LDUBm1 "\tldub\t["{REG}"+-0x1],%o1"
|
||||
MOV "\tmov\t"{REG}",%o1"
|
||||
|
||||
%%
|
||||
extern char *dispatch_label;
|
||||
|
||||
|
||||
{COMPUTE} printf(" set %s,", dispatch_label);
|
||||
|
||||
{ADDX}\n{LDUBm1}\n{DISPATCH} {
|
||||
if ( memcmp(yytext + 5, yytext + 13, 3)
|
||||
|| memcmp(yytext + 5, yytext + 24, 3)) {REJECT};
|
||||
|
||||
printf(" ldub [%.3s+%.3s+-0x1],%%o1\n",yytext+5, yytext+9);
|
||||
printf(" sll %%o1,2,%%o1\n");
|
||||
printf(" ld [%%o1+%.3s],%%o1\n",yytext+43);
|
||||
printf(" jmp %%o1\n");
|
||||
printf("%.16s\n", yytext);
|
||||
}
|
||||
|
||||
|
||||
|
||||
{DISPATCH} {
|
||||
printf(" sll %%o1,2,%%o1\n");
|
||||
printf(" ld [%%o1+%%%.2s],%%o1\n",yytext + 6);
|
||||
printf(" jmp %%o1\n");
|
||||
printf(" nop\n");
|
||||
}
|
||||
|
||||
{ADDX}\n{LDUB} {
|
||||
if ( !memcmp(yytext + 5, yytext + 13, 3)
|
||||
&& !memcmp(yytext + 5, yytext + 24, 3)
|
||||
&& memcmp(yytext + 5, yytext + 29, 3)) {
|
||||
printf(" ldub [%.3s+%.3s],%.3s\n%.16s\n",
|
||||
yytext+5,yytext+9,yytext+29,yytext);
|
||||
} else
|
||||
printf("%s", yytext);
|
||||
}
|
||||
|
||||
|
||||
{LDUB}\n\tcmp\t{REG}",255\n\tbgu\t"{LABEL}\n\t\sll\t{REG}",2,"{REG}\n\tset\t{LABEL}"," {
|
||||
if (memcmp(yytext+yyleng-strlen(dispatch_label)-1,
|
||||
dispatch_label,
|
||||
strlen(dispatch_label))) {
|
||||
fprintf(stderr, "Label in dispatch changed. Edit disphack.lex");
|
||||
fprintf(stderr, " and change '%s' to label", dispatch_label);
|
||||
fprintf(stderr, " in last line of \n\n%s\n\n and retry!\n", yytext);
|
||||
exit(-1);
|
||||
} else if (memcmp(yytext + 12, yytext + 21, 3)) {
|
||||
fprintf(stderr, "Odd sequence %s\n", yytext);
|
||||
};
|
||||
REJECT;
|
||||
};
|
||||
@ -1,17 +0,0 @@
|
||||
/* @(#) find-dispatch.lex Version 1.2 (4/7/89). copyright envos & Fuji Xerox */
|
||||
|
||||
REG "%"[oilg][0-9]
|
||||
REGOFF "%"[oilg][0-9]\+\-0x[0-9]
|
||||
LABEL L[0-9]+
|
||||
LDUB "\tldub\t["{REG}"],"{REG}
|
||||
LDUB2 "\tldub\t["{REGOFF}"],"{REG}
|
||||
|
||||
%%
|
||||
|
||||
{LDUB2}\n\tcmp\t{REG}",255\n\tbgu\t"{LABEL}\n\t\sll\t{REG}",2,"{REG}\n\tset\t { char x;
|
||||
printf("char *dispatch_label = \"");
|
||||
loop: x=input();
|
||||
if(x == ','){ printf("\";\n"); return;}
|
||||
output(x); goto loop;}
|
||||
|
||||
.*\n {}
|
||||
Loading…
x
Reference in New Issue
Block a user