From 259a2006a1a63c189aaade7925d20c8377c9ba5e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 11 Dec 2020 12:52:12 +0700 Subject: [PATCH] Remove inc/lnk-*.h (#23) These headers aren't used and are all old copies of the same headers without `lnk-` in the name. --- inc/lnk-Xdeflt.h | 30 -- inc/lnk-debug.h | 438 ------------------ inc/lnk-fast_dsp.h | 161 ------- inc/lnk-inlineC.h | 1068 -------------------------------------------- inc/lnk-lispmap.h | 242 ---------- inc/lnk-tosfns.h | 789 -------------------------------- inc/lnk-tosret.h | 85 ---- inc/lnk-version.h | 99 ---- 8 files changed, 2912 deletions(-) delete mode 100755 inc/lnk-Xdeflt.h delete mode 100755 inc/lnk-debug.h delete mode 100755 inc/lnk-fast_dsp.h delete mode 100755 inc/lnk-inlineC.h delete mode 100755 inc/lnk-lispmap.h delete mode 100755 inc/lnk-tosfns.h delete mode 100755 inc/lnk-tosret.h delete mode 100755 inc/lnk-version.h diff --git a/inc/lnk-Xdeflt.h b/inc/lnk-Xdeflt.h deleted file mode 100755 index cebfd95..0000000 --- a/inc/lnk-Xdeflt.h +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id: lnk-Xdeflt.h,v 1.2 1999/01/03 02:06:09 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - - -/* -* -* Define the X window Medley runs in. -* -*/ - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-94 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - - -#define DEF_WIN_X 20 -#define DEF_WIN_Y 20 -#define DEF_WIN_WIDTH 565 -#define DEF_WIN_HEIGHT 430 -#define WIN_MIN_WIDTH 150 -#define WIN_MIN_HEIGHT 100 -#define DEF_BDRWIDE 2 -#define SCROLL_WIDTH 18 -#define WINDOW_NAME "Medley (C) Copyright 1980-94 Venue" -#define ICON_NAME "Medley" - diff --git a/inc/lnk-debug.h b/inc/lnk-debug.h deleted file mode 100755 index 62b80d7..0000000 --- a/inc/lnk-debug.h +++ /dev/null @@ -1,438 +0,0 @@ -/* $Id: lnk-debug.h,v 1.2 1999/01/03 02:06:10 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-92 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - - -#ifndef BYTESWAP - /************************************************/ - /* Normal byte-order version of definitions */ - /************************************************/ - -typedef struct{ - DLword W0; - DLword W1; - DLword W2; - DLword W3; - DLword WU; - DLword W4; - DLword W5; - int TIME; - unsigned MOUSESTATE : 3; - unsigned SHIFT1 : 1; - unsigned SHIFT2 : 1; - unsigned keLOCK : 1; - unsigned keCTRL : 1; - unsigned keMETA : 1; - unsigned keFONT : 1; - unsigned USERMODE1 : 1; - unsigned USERMODE2 : 1; - unsigned USERMODE3 : 1; - unsigned NIL1 : 4; - DLword MOUSEX; - DLword MOUSEY; -} KEYBOARDEVENT; - -typedef struct{ - DLword READ; - DLword WRITE; -} RING; - -typedef struct{ - LispPTR FLAGS; - LispPTR CODES; - LispPTR SHIFTCODES; - LispPTR ARMED; - LispPTR INTERRUPTLIST; -} KEYACTION; - -typedef struct{ - unsigned int EVENTWAKEUPPENDING : 1; - unsigned int nil1 : 7; - unsigned int EVENTQUEUETAIL : 24; - LispPTR EVENTNAME; -} EVENT; - -typedef struct{ - unsigned int nil1 : 1; - unsigned int MLOCKPERPROCESS : 1; - unsigned int nil2 : 6; - unsigned int MLOCKQUEUETAIL : 24; - LispPTR MLOCKOWNER; - LispPTR MLOCKNAME; - LispPTR MLOCKLINK; -} MONITORLOCK; - -typedef struct{ - DLword PROCFX0; - DLword PROCFX; - unsigned int PROCSTATUS : 8; - unsigned int PROCNAME : 24; - unsigned int PROCPRIORITY : 8; - unsigned int PROCQUEUE : 24; - unsigned int nil1 : 8; - unsigned int NEXTPROCHANDLE : 24; - unsigned int PROCTIMERSET : 1; - unsigned int PROCBEINGDELETED : 1; - unsigned int PROCDELETED : 1; - unsigned int PROCSYSTEMP : 1; - unsigned int PROCNEVERSTARTED : 1; - unsigned int nil2 : 3; - unsigned int PROCWAKEUPTIMER : 24; - LispPTR PROCTIMERLINK; - LispPTR PROCTIMERBOX; - LispPTR WAKEREASON; - LispPTR PROCEVENTORLOCK; - LispPTR PROCFORM; - LispPTR RESTARTABLE; - LispPTR PROCWINDOW; - LispPTR PROCFINISHED; - LispPTR PROCRESULT; - LispPTR PROCFINISHEVENT; - LispPTR PROCMAILBOX; - LispPTR PROCDRIBBLEOUTPUT; - LispPTR PROCINFOHOOK; - LispPTR PROCTYPEAHEAD; - LispPTR PROCREMOTEINFO; - LispPTR PROCUSERDATA; - LispPTR PROCEVENTLINK; - LispPTR PROCAFTEREXIT; - LispPTR PROCBEFOREEXIT; - LispPTR PROCOWNEDLOCKS; - LispPTR PROCEVAPPLYRESULT; - LispPTR PROCTTYENTRYFN; - LispPTR PROCEXITFN; - LispPTR PROCHARDRESETINFO; - LispPTR PROCRESTARTFORM; - LispPTR PROCOLDTTYPROC; - LispPTR nil3; -} PROCESS; - -typedef struct{ - unsigned int PQPRIORITY : 8; - unsigned int PQHIGHER : 24; - LispPTR PQLOWER; - LispPTR PQNEXT; - LispPTR PQLAST; -} PROCESSQUEUE; - -typedef struct fdev{ - unsigned RESETABLE : 1; - unsigned RANDOMACCESSP : 1; - unsigned NODIRECTORIES : 1; - unsigned PAGEMAPPED : 1; - unsigned FDBINABLE : 1; - unsigned FDBOUTABLE : 1; - unsigned FDEXTENDABLE : 1; - unsigned BUFFERED : 1; - unsigned DEVICENAME : 24; - unsigned REMOTEP : 1; - unsigned SUBDIRECTORIES : 1; - unsigned INPUT_INDIRECTED : 1; - unsigned OUTPUT_INDIRECTED : 1; - unsigned NIL1 : 4; - unsigned DEVICEINFO : 24; - LispPTR OPENFILELST ; - LispPTR HOSTNAMEP ; - LispPTR EVENTFN ; - LispPTR DIRECTORYNAMEP ; - LispPTR OPENFILE ; - LispPTR CLOSEFILE ; - LispPTR REOPENFILE ; - LispPTR GETFILENAME ; - LispPTR DELETEFILE ; - LispPTR GENERATEFILES ; - LispPTR RENAMEFILE ; - LispPTR OPENP ; - LispPTR REGISTERFILE ; - LispPTR UNREGISTERFILE ; - LispPTR FREEPAGECOUNT ; - LispPTR MAKEDIRECTORY ; - LispPTR CHECKFILENAME ; - LispPTR HOSTALIVEP ; - LispPTR BREAKCONNECTION ; - LispPTR BIN ; - LispPTR BOUT ; - LispPTR PEEKBIN ; - LispPTR READCHAR ; - LispPTR WRITECHAR ; - LispPTR PEEKCHAR ; - LispPTR UNREADCHAR ; - LispPTR READP ; - LispPTR EOFP ; - LispPTR BLOCKIN ; - LispPTR BLOCKOUT ; - LispPTR FORCEOUTPUT ; - LispPTR GETFILEINFO ; - LispPTR SETFILEINFO ; - LispPTR CHARSETFN ; - LispPTR INPUTSTREAM ; - LispPTR OUTPUTSTREAM ; - LispPTR GETFILEPTR ; - LispPTR GETEOFPTR ; - LispPTR SETFILEPTR ; - LispPTR BACKFILEPTR ; - LispPTR SETEOFPTR ; - LispPTR LASTC ; - LispPTR GETNEXTBUFFER ; - LispPTR RELEASEBUFFER ; - LispPTR READPAGES ; - LispPTR WRITEPAGES ; - LispPTR TRUNCATEFILE ; - LispPTR WINDOWOPS ; - LispPTR WINDOWDATA ; -}FDEV; -typedef struct package{ - LispPTR INDEX ; - LispPTR TABLES ; - LispPTR NAME ; - LispPTR NAMESYMBOL ; - LispPTR NICKNAMES ; - LispPTR USE_LIST ; - LispPTR USED_BY_LIST ; - LispPTR EXTERNAL_ONLY ; - LispPTR INTERNAL_SYMBOLS ; - LispPTR EXTERNAL_SYMBOLS ; - LispPTR SHADOWING_SYMBOLS ; -} PACKAGE; - -#ifdef NEVER -typedef struct { - unsigned nil1 : 8 ; - unsigned BASE : 24 ; - unsigned READ_ONLY_P : 1 ; - unsigned nil2 : 1 ; - unsigned BIT_P : 1 ; - unsigned STRING_P : 1 ; - unsigned nil3 : 1 ; - unsigned DISPLACED_P : 1 ; - unsigned FILL_POINTER_P : 1 ; - unsigned EXTENDABLE_P : 1 ; - unsigned TYPE_NUMBER : 8 ; - DLword OFFSET; - DLword FILL_POINTER; - DLword TOTAL_SIZE; -} ONED_ARRAY; -#endif /* NEVER */ -#else - - /****************************************************************/ - /* Byte-swapped, word-swapped definitions, for e.g. 80386's */ - /****************************************************************/ - -typedef struct{ - DLword W1; - DLword W0; - DLword W3; - DLword W2; - DLword W4; - DLword WU; - /* only swapped down to here, and MOUSEX & Y -- there */ - /* looks like a missing word in the block at this point. */ - DLword W5; - int TIME; - unsigned MOUSESTATE : 3; - unsigned SHIFT1 : 1; - unsigned SHIFT2 : 1; - unsigned LOCK : 1; - unsigned CTRL : 1; - unsigned META : 1; - unsigned FONT : 1; - unsigned USERMODE1 : 1; - unsigned USERMODE2 : 1; - unsigned USERMODE3 : 1; - unsigned NIL1 : 4; - DLword MOUSEY; - DLword MOUSEX; -} KEYBOARDEVENT; - -typedef struct{ - DLword WRITE; - DLword READ; -} RING; - -typedef struct{ - LispPTR FLAGS; - LispPTR CODES; - LispPTR SHIFTCODES; - LispPTR ARMED; - LispPTR INTERRUPTLIST; -} KEYACTION; - -typedef struct{ - unsigned int EVENTQUEUETAIL : 24; - unsigned int nil1 : 7; - unsigned int EVENTWAKEUPPENDING : 1; - LispPTR EVENTNAME; -} EVENT; - -typedef struct{ - unsigned int MLOCKQUEUETAIL : 24; - unsigned int nil2 : 6; - unsigned int MLOCKPERPROCESS : 1; - unsigned int nil1 : 1; - LispPTR MLOCKOWNER; - LispPTR MLOCKNAME; - LispPTR MLOCKLINK; -} MONITORLOCK; - -typedef struct{ - DLword PROCFX; - DLword PROCFX0; - unsigned int PROCNAME : 24; - unsigned int PROCSTATUS : 8; - unsigned int PROCQUEUE : 24; - unsigned int PROCPRIORITY : 8; - unsigned int NEXTPROCHANDLE : 24; - unsigned int nil1 : 8; - unsigned int PROCWAKEUPTIMER : 24; - unsigned int nil2 : 3; - unsigned int PROCNEVERSTARTED : 1; - unsigned int PROCSYSTEMP : 1; - unsigned int PROCDELETED : 1; - unsigned int PROCBEINGDELETED : 1; - unsigned int PROCTIMERSET : 1; - LispPTR PROCTIMERLINK; - LispPTR PROCTIMERBOX; - LispPTR WAKEREASON; - LispPTR PROCEVENTORLOCK; - LispPTR PROCFORM; - LispPTR RESTARTABLE; - LispPTR PROCWINDOW; - LispPTR PROCFINISHED; - LispPTR PROCRESULT; - LispPTR PROCFINISHEVENT; - LispPTR PROCMAILBOX; - LispPTR PROCDRIBBLEOUTPUT; - LispPTR PROCINFOHOOK; - LispPTR PROCTYPEAHEAD; - LispPTR PROCREMOTEINFO; - LispPTR PROCUSERDATA; - LispPTR PROCEVENTLINK; - LispPTR PROCAFTEREXIT; - LispPTR PROCBEFOREEXIT; - LispPTR PROCOWNEDLOCKS; - LispPTR PROCEVAPPLYRESULT; - LispPTR PROCTTYENTRYFN; - LispPTR PROCEXITFN; - LispPTR PROCHARDRESETINFO; - LispPTR PROCRESTARTFORM; - LispPTR PROCOLDTTYPROC; - LispPTR nil3; -} PROCESS; - -typedef struct{ - unsigned int PQHIGHER : 24; - unsigned int PQPRIORITY : 8; - LispPTR PQLOWER; - LispPTR PQNEXT; - LispPTR PQLAST; -} PROCESSQUEUE; - -typedef struct fdev{ - unsigned DEVICENAME : 24; - unsigned BUFFERED : 1; - unsigned FDEXTENDABLE : 1; - unsigned FDBOUTABLE : 1; - unsigned FDBINABLE : 1; - unsigned PAGEMAPPED : 1; - unsigned NODIRECTORIES : 1; - unsigned RANDOMACCESSP : 1; - unsigned RESETABLE : 1; - unsigned DEVICEINFO : 24; - unsigned NIL1 : 4; - unsigned OUTPUT_INDIRECTED : 1; - unsigned INPUT_INDIRECTED : 1; - unsigned SUBDIRECTORIES : 1; - unsigned REMOTEP : 1; - LispPTR OPENFILELST ; - LispPTR HOSTNAMEP ; - LispPTR EVENTFN ; - LispPTR DIRECTORYNAMEP ; - LispPTR OPENFILE ; - LispPTR CLOSEFILE ; - LispPTR REOPENFILE ; - LispPTR GETFILENAME ; - LispPTR DELETEFILE ; - LispPTR GENERATEFILES ; - LispPTR RENAMEFILE ; - LispPTR OPENP ; - LispPTR REGISTERFILE ; - LispPTR UNREGISTERFILE ; - LispPTR FREEPAGECOUNT ; - LispPTR MAKEDIRECTORY ; - LispPTR CHECKFILENAME ; - LispPTR HOSTALIVEP ; - LispPTR BREAKCONNECTION ; - LispPTR BIN ; - LispPTR BOUT ; - LispPTR PEEKBIN ; - LispPTR READCHAR ; - LispPTR WRITECHAR ; - LispPTR PEEKCHAR ; - LispPTR UNREADCHAR ; - LispPTR READP ; - LispPTR EOFP ; - LispPTR BLOCKIN ; - LispPTR BLOCKOUT ; - LispPTR FORCEOUTPUT ; - LispPTR GETFILEINFO ; - LispPTR SETFILEINFO ; - LispPTR CHARSETFN ; - LispPTR INPUTSTREAM ; - LispPTR OUTPUTSTREAM ; - LispPTR GETFILEPTR ; - LispPTR GETEOFPTR ; - LispPTR SETFILEPTR ; - LispPTR BACKFILEPTR ; - LispPTR SETEOFPTR ; - LispPTR LASTC ; - LispPTR GETNEXTBUFFER ; - LispPTR RELEASEBUFFER ; - LispPTR READPAGES ; - LispPTR WRITEPAGES ; - LispPTR TRUNCATEFILE ; - LispPTR WINDOWOPS ; - LispPTR WINDOWDATA ; -}FDEV; -typedef struct package{ - LispPTR INDEX ; - LispPTR TABLES ; - LispPTR NAME ; - LispPTR NAMESYMBOL ; - LispPTR NICKNAMES ; - LispPTR USE_LIST ; - LispPTR USED_BY_LIST ; - LispPTR EXTERNAL_ONLY ; - LispPTR INTERNAL_SYMBOLS ; - LispPTR EXTERNAL_SYMBOLS ; - LispPTR SHADOWING_SYMBOLS ; -} PACKAGE; -#ifdef NEVER -typedef struct { - unsigned BASE : 24 ; - unsigned nil1 : 8 ; - DLword OFFSET; - unsigned TYPE_NUMBER : 8 ; - unsigned EXTENDABLE_P : 1 ; - unsigned FILL_POINTER_P : 1 ; - unsigned DISPLACED_P : 1 ; - unsigned nil3 : 1 ; - unsigned STRING_P : 1 ; - unsigned BIT_P : 1 ; - unsigned nil2 : 1 ; - unsigned READ_ONLY_P : 1 ; - DLword TOTAL_SIZE; - DLword FILL_POINTER; -} ONED_ARRAY; -#endif /* NEVER */ - -#endif /* BYTESWAP */ - diff --git a/inc/lnk-fast_dsp.h b/inc/lnk-fast_dsp.h deleted file mode 100755 index 578eefc..0000000 --- a/inc/lnk-fast_dsp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* $Id: lnk-fast_dsp.h,v 1.2 1999/01/03 02:06:10 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - -/* These are the Macros Used to generate fast dispatch inline code. -*/ - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989, 1990, 1991 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - -/************************************************************************/ -/* */ -/* F A S T O P C O D E D I S P A T C H M A C R O S */ -/* */ -/* These macros generate better opcode-dispatch code than the */ -/* native compiler will. The difference may be only one or */ -/* two instructions, but in the inner loop, that's a LOT. */ -/* */ -/* To add a new architecture, you must define 5 macros: */ -/* */ -/* nextop0 - for single-byte opcodes */ -/* nextop1 - skip a byte and grab an opcode */ -/* nextop2 - skip 2 bytes and grab an opcode */ -/* nextop3 - skip 3 bytes and grab an opcode */ -/* nextop4 - skip 4 bytes and grab an opcode */ -/* */ -/* (These macros are already defined naively, so undef them.) */ -/* */ -/* For existing implementations, these often expand out to */ -/* calls to inline functions. */ -/* */ -/* */ -/* */ -/************************************************************************/ - - -#ifdef OPDISP /* Only do any of this if OPDISP is set. */ - - /* Sun 3 */ -#ifdef mc68020 -#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 - -#endif /* OPDISP */ - - - - -#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 */ - - - - - - - - - diff --git a/inc/lnk-inlineC.h b/inc/lnk-inlineC.h deleted file mode 100755 index d8f9b20..0000000 --- a/inc/lnk-inlineC.h +++ /dev/null @@ -1,1068 +0,0 @@ -/* $Id: lnk-inlineC.h,v 1.2 1999/01/03 02:06:11 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-92 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - -/* - These are the Macros Used to generate inline c code. - These are the goto ni definitions of the opcodes. -*/ - -/************************************************************************/ -/* */ -/* Macros for fetching bytes & words PC-relative */ -/* */ -/* These are this way so that they can be redefined for the 386i, */ -/* where it makes a difference in speed if you know in advance. */ -/* */ -/************************************************************************/ - -#define Get_BYTE_PCMAC0 Get_BYTE(PCMAC) -#define Get_BYTE_PCMAC1 Get_BYTE(PCMAC+1) -#define Get_BYTE_PCMAC2 Get_BYTE(PCMAC+2) -#define Get_BYTE_PCMAC3 Get_BYTE(PCMAC+3) - -#define Get_DLword_PCMAC0 Get_DLword(PCMAC) -#define Get_DLword_PCMAC1 Get_DLword(PCMAC+1) -#define Get_DLword_PCMAC2 Get_DLword(PCMAC+2) -#define Get_DLword_PCMAC3 Get_DLword(PCMAC+3) - -#define Get_Pointer_PCMAC0 -#define Get_Pointer_PCMAC1 Get_Pointer(PCMAC + 1) -#define Get_Pointer_PCMAC2 Get_Pointer(PCMAC + 2) - - /* For getting a signed byte */ -#define Get_SBYTE_PCMAC0 GETBYTE((s_char *)PCMAC) -#define Get_SBYTE_PCMAC1 GETBYTE((s_char *)PCMAC+1) - - /* for getting an atom number, e.g., for FNx or DTEST */ -#ifdef BIGATOMS -#define Get_AtomNo_PCMAC1 Get_Pointer_PCMAC1 -#define Get_AtomNo_PCMAC2 Get_Pointer_PCMAC2 -#ifdef BIGVM -#define nextop_atom nextop5 -#define nextop_ptr nextop5 -#else -#define nextop_atom nextop4 -#define nextop_ptr nextop4 -#endif /* BIGVM */ -#else -#define Get_AtomNo_PCMAC1 Get_DLword_PCMAC1 -#define Get_AtomNo_PCMAC2 Get_DLword_PCMAC2 -#define nextop_atom nextop3 -#define nextop_ptr nextop4 -#endif /* BIGATOMS */ - - - - -#define CHECK_INTERRUPT {if((int)CSTKPTR > Irq_Stk_Check) goto check_interrupt;} -#define SWAP_WORDS(x) (((unsigned int)x << 16) | (((unsigned int)x >> 16) & 0xFFFF)) - - -#define NATIVECHECK \ - {if (BCE_CURRENTFX->native) {goto gonative ;} nextop0; } - -#define nextop0 {goto nextopcode; } -#define nextop1 {PCMACL += 1; nextop0; } -#define nextop2 {PCMACL += 2; nextop0; } -#define nextop3 {PCMACL += 3; nextop0; } -#define nextop4 {PCMACL += 4; nextop0; } -#define nextop5 {PCMACL += 5; nextop0; } - -#define OPCAR \ - if (Listp(TOPOFSTACK))\ - {\ - register ConsCell *DATUM68K = (ConsCell *)(Addr68k_from_LADDR(TOPOFSTACK));\ - if (DATUM68K->cdr_code == CDR_INDIRECT)\ - {\ - TOPOFSTACK = ((LispPTR)((ConsCell *)Addr68k_from_LADDR(DATUM68K->car_field))->car_field);\ - nextop1; \ - }\ - else \ - { \ - TOPOFSTACK = ((LispPTR)DATUM68K->car_field);\ - nextop1; \ - } \ - }\ - else if (TOPOFSTACK == NIL_PTR)\ - { nextop1; } \ - else if ( TOPOFSTACK == ATOM_T)\ - { nextop1; } \ - else \ - {\ - goto op_ufn; \ - } /* end of OPCAR */ - -#ifdef NEWCDRCODING -#define OPCDR \ - if (Listp(TOPOFSTACK))\ - {\ -register ConsCell *DATUM68K = (ConsCell *)(Addr68k_from_LADDR(TOPOFSTACK));\ -register int CDRCODEX = DATUM68K->cdr_code;\ - if (CDRCODEX == CDR_NIL) {\ - /* cdr-nil */\ - TOPOFSTACK = (NIL_PTR);\ - nextop1; \ - } \ - else if (CDRCODEX> CDR_ONPAGE) {\ - /* cdr-samepage */\ - TOPOFSTACK = ((TOPOFSTACK) + ((CDRCODEX & 7) << 1));\ - nextop1; \ - } \ - else if (CDRCODEX == CDR_INDIRECT) { /* CDRCODEX < CDR_ONPAGE */\ - /* cdr-indirect */\ - TOPOFSTACK = (cdr ((LispPTR)(DATUM68K->car_field)));\ - nextop1; \ - } \ - else\ - {\ - /* cdr-differentpage */\ - TOPOFSTACK = ((ConsCell *)(Addr68k_from_LADDR \ - ((TOPOFSTACK) + (CDRCODEX << 1)))\ - )->car_field;\ - nextop1; \ - }\ - }\ - else if (TOPOFSTACK == NIL_PTR)\ - { nextop1; } \ - else\ - {\ - goto op_ufn; \ - } /* end of OPCDR */ -#else -#define OPCDR \ - if (Listp(TOPOFSTACK))\ - {\ -register ConsCell *DATUM68K = (ConsCell *)(Addr68k_from_LADDR(TOPOFSTACK));\ -register int CDRCODEX = DATUM68K->cdr_code;\ - if (CDRCODEX == CDR_NIL) {\ - /* cdr-nil */\ - TOPOFSTACK = (NIL_PTR);\ - nextop1; \ - } \ - else if (CDRCODEX> CDR_ONPAGE) {\ - /* cdr-samepage */\ - TOPOFSTACK = (POINTER_PAGEBASE(TOPOFSTACK) + \ - ((CDRCODEX & 127) << 1));\ - nextop1; \ - } \ - else if (CDRCODEX == CDR_INDIRECT) { /* CDRCODEX < CDR_ONPAGE */\ - /* cdr-indirect */\ - TOPOFSTACK = (cdr ((LispPTR)(DATUM68K->car_field)));\ - nextop1; \ - } \ - else\ - {\ - /* cdr-differentpage */\ - TOPOFSTACK = ((ConsCell *)(Addr68k_from_LADDR \ - (POINTER_PAGEBASE(TOPOFSTACK) + (CDRCODEX << 1)))\ - )->car_field;\ - nextop1; \ - }\ - }\ - else if (TOPOFSTACK == NIL_PTR)\ - { nextop1; } \ - else\ - {\ - goto op_ufn; \ - } /* end of OPCDR */ -#endif /* NEWCDRCODING */ - -#define IVARMACRO(x) {PUSH(IVAR[x]); nextop1;} -#define PVARMACRO(x) {PUSH(PVAR[x]); nextop1;} -#define PVARSETMACRO(x) {PVAR[x] = TOPOFSTACK; nextop1;} -#define PVARSETPOPMACRO(x) {PVAR[x] = TOPOFSTACK; POP; nextop1;} -#define PUSHATOM(x) {PUSH(x); nextop1;} - - -#define JUMPMACRO(x) {CHECK_INTERRUPT; PCMACL += x; nextop0;} - -#define FJUMPMACRO(x) {if(TOPOFSTACK != 0) {goto PopNextop1 ; } \ - {CHECK_INTERRUPT; POP; PCMACL += x; nextop0;} \ - } -#define TJUMPMACRO(x) {if(TOPOFSTACK == 0) {goto PopNextop1 ; } \ - {CHECK_INTERRUPT; POP; PCMACL += x; nextop0;} \ - } - -#define GETBASE_N(N) { \ - TOPOFSTACK = \ - (S_POSITIVE | GETWORD((DLword *) \ - Addr68k_from_LADDR((POINTERMASK & TOPOFSTACK) + N)));\ - nextop2; \ - } - -#define GETBASEPTR_N(N) { \ - TOPOFSTACK = \ - ( POINTERMASK & *((LispPTR *) \ - Addr68k_from_LADDR((POINTERMASK & TOPOFSTACK) + N)));\ - nextop2; \ - } -#define PUTBASEBYTE \ - { register int byteoffset; \ - register char *p_data; \ - if(((SEGMASK & TOPOFSTACK) != S_POSITIVE) || \ - ((unsigned short)TOPOFSTACK >= 256)) \ - goto op_ufn; \ - byteoffset = GET_TOS_1; \ - switch( (SEGMASK & byteoffset) ){ \ - case S_POSITIVE: \ - byteoffset &= 0x0000FFFF; \ - break; \ - case S_NEGATIVE: \ - byteoffset |= 0xFFFF0000; \ - break; \ - default: \ - goto op_ufn; \ - /*** if( GetTypeNumber(byteoffset) == TYPE_FIXP ) \ - byteoffset = *((int *)Addr68k_from_LADDR(byteoffset)); \ - else \ - goto op_ufn; ***/ \ - } \ - --CSTKPTRL; \ - p_data = (char*)Addr68k_from_LADDR(POINTERMASK & (POP_TOS_1)) + byteoffset; \ - GETBYTE(p_data) = 0xFF & TOPOFSTACK; \ - nextop1; \ - } - -#define GETBASEBYTE \ - {switch( (SEGMASK & TOPOFSTACK) ){ \ - case S_POSITIVE: \ - TOPOFSTACK &= 0x0000FFFF; \ - break; \ - case S_NEGATIVE: \ - TOPOFSTACK |= 0xFFFF0000; \ - break; \ - default: \ - if( GetTypeNumber(TOPOFSTACK) == TYPE_FIXP ) \ - TOPOFSTACK = *((int *)Addr68k_from_LADDR(TOPOFSTACK)); \ - else \ - goto op_ufn; \ - } \ - TOPOFSTACK = (0xFF & (GETBYTE((char*)Addr68k_from_LADDR((POINTERMASK & (POP_TOS_1))) + TOPOFSTACK))) | S_POSITIVE; \ - nextop1; \ - } - - -#define PUTBASEPTR_N(n) \ - { register int base; \ - base = POINTERMASK & POP_TOS_1; \ - *((LispPTR *)Addr68k_from_LADDR(base + n)) = TOPOFSTACK; \ - TOPOFSTACK = base; \ - nextop2; \ - } - -#define PUTBASE_N(n) \ - { register int base; \ - if (GetHiWord(TOPOFSTACK) != (S_POSITIVE >> 16)) \ - goto op_ufn; \ - base = POINTERMASK & POP_TOS_1; \ - GETWORD((DLword *)Addr68k_from_LADDR(base + n)) = GetLoWord(TOPOFSTACK);\ - TOPOFSTACK = base; \ - nextop2; \ - } - - -#define PVARX(x) { PUSH(GetLongWord((DLword *)PVAR + x)); nextop2; } -#define PVARX_(x) { *((LispPTR *)((DLword *)PVAR+x))=TOPOFSTACK; nextop2;} -#define IVARX(x) { PUSH(GetLongWord((DLword *)IVAR + x)); nextop2; } -#define IVARX_(x) { *((LispPTR *)((DLword *)IVAR+x))=TOPOFSTACK; nextop2;} - -#ifndef BIGATOMS -#define GVAR(x) { PUSH(GetLongWord(Valspace + ((x)<<1))); nextop_atom; } -#elif defined(BIGVM) -#define GVAR(x) \ - { register int tx = x; \ - if (tx & SEGMASK) \ - { \ - PUSH(GetLongWord( \ - Addr68k_from_LADDR((tx)+NEWATOM_VALUE_OFFSET))); \ - } \ - else PUSH(GetLongWord((LispPTR *)Pnamespace + (tx*5) + NEWATOM_VALUE_PTROFF)); \ - \ - nextop_atom; \ - } -#else -#define GVAR(x) \ - { register int tx = x; \ - if (tx & SEGMASK) \ - { \ - PUSH(GetLongWord( \ - Addr68k_from_LADDR((tx)+NEWATOM_VALUE_OFFSET))); \ - } \ - else PUSH(GetLongWord(Valspace + ((tx)<<1))); \ - \ - nextop_atom; \ - } -#endif /* BIGATOMS */ - - - -#define COPY { HARD_PUSH(TOPOFSTACK); nextop1; } - -#define SWAP { register LispPTR temp; \ - temp = GET_TOS_1; \ - GET_TOS_1 = TOPOFSTACK; \ - TOPOFSTACK = temp; \ - nextop1; \ - } - - /*********************************************/ - /* Note: No matter how smart it seems, don't */ - /* AND in POINTERMASK in VAG2, because there */ - /* is code that depends on VAG2 building */ - /* full, 32-bit pointers from 16-bit ints. */ - /*********************************************/ -#define N_OP_VAG2 { TOPOFSTACK = ((GET_TOS_1 << 16) \ - | (0xFFFF & TOPOFSTACK)); CSTKPTRL--; nextop1; } - -#define FN0 { OPFN(0, fn0_args, fn0_xna, fn0_native); } -#define FN1 { OPFN(1, fn1_args, fn1_xna, fn1_native); } -#define FN2 { OPFN(2, fn2_args, fn2_xna, fn2_native); } -#define FN3 { OPFN(3, fn3_args, fn3_xna, fn3_native); } -#define FN4 { OPFN(4, fn4_args, fn4_xna, fn4_native); } -#define FNX { OPFNX; nextop0; } -#define ENVCALL { OP_ENVCALL; nextop0; } -#define RETURN { OPRETURN; nextop0; } -#define APPLY { OPAPPLY;} -#define CHECKAPPLY { OPCHECKAPPLY; nextop1; } - -#define BIN \ -{ \ -register Stream *stream68k; /* stream instance on TOS */ \ -register char *buff68k; /* pointer to BUFF */ \ - \ - if ( GetTypeNumber(TOPOFSTACK) == TYPE_STREAM ) { \ - stream68k=(Stream *) Addr68k_from_LADDR(TOPOFSTACK); \ - if( ( !stream68k->BINABLE ) || \ - ( stream68k->COFFSET >= \ - stream68k->CBUFSIZE ) ) goto op_ufn; \ - \ - /* get BUFFER instance */ \ - buff68k =(char *)Addr68k_from_LADDR(stream68k->CBUFPTR); \ - \ - /* get BYTE data and set it to TOS */ \ - TOPOFSTACK = (S_POSITIVE | \ - (Get_BYTE(buff68k + (stream68k->COFFSET)++)) ); \ - nextop1; \ - } \ - else goto op_ufn; \ -} - -#ifdef RECLAIMINC -#define RECLAIMCELL { TOPOFSTACK = gcreclaimcell(TOPOFSTACK); nextop1; } -#else -#define RECLAIMCELL { goto op_ufn; } -#endif - -#define GCSCAN1 { TOPOFSTACK=gcscan1(TOPOFSTACK & 0xffff); \ - if (TOPOFSTACK) {TOPOFSTACK |= S_POSITIVE; };nextop1;} - -#define GCSCAN2 { TOPOFSTACK=gcscan2(TOPOFSTACK & 0xffff); \ - if (TOPOFSTACK) {TOPOFSTACK |=S_POSITIVE; };nextop1;} - - -#define CONTEXTSWITCH { EXT; OP_contextsw(); RET; \ - /*CHECK_INTERRUPT;*/ CLR_IRQ; \ - NATIVE_NEXTOP0; } - -#define NOP { nextop1; } -#define RESLIST(n) { goto op_ufn; } - -#define FINDKEY(x) \ - { \ - TOPOFSTACK = N_OP_findkey(TOPOFSTACK, x); \ - nextop2; \ - } - -#define RPLPTR(n) \ - { \ - TOPOFSTACK = N_OP_rplptr(POP_TOS_1, TOPOFSTACK, n); \ - nextop2; \ - } - -#define GVAR_(atom_index) \ - { \ - N_OP_gvar_(TOPOFSTACK, atom_index); \ - nextop_atom; \ - } - -#define BIND {register int n1; \ - register int n2; \ - register LispPTR *ppvar; \ - register int i; \ - n1 = Get_BYTE_PCMAC1 >> 4; \ - n2 = Get_BYTE_PCMAC1 & 0xf; \ - ppvar = (LispPTR *)PVAR + 1 + Get_BYTE_PCMAC2; \ - for(i=n1; --i >= 0;){ *--ppvar = NIL_PTR; } \ - if(n2 == 0){ \ - *CSTKPTRL++ = TOPOFSTACK; \ - }else{ \ - *--ppvar = TOPOFSTACK; \ - for(i=1; i= 0 );); \ - value = *CSTKPTR; \ - num = (~value)>>16; \ - ppvar = (LispPTR *)((DLword *)PVAR + 2 + GetLoWord(value));\ - for(i=num; --i >= 0;){*--ppvar = 0xffffffff;} \ - nextop1; \ - } - -#define DUNBIND {register int num; \ - register LispPTR *ppvar; \ - register int i; \ - register LispPTR value; \ - if((int)TOPOFSTACK < 0){ \ - num =(~TOPOFSTACK)>>16; \ - if(num != 0){ \ - ppvar = (LispPTR *)((DLword *)PVAR + 2 + GetLoWord(TOPOFSTACK)); \ - for(i=num; --i >= 0;) { \ - *--ppvar = 0xffffffff; } \ - } \ - }else{ \ - for(; ( ((int)*--CSTKPTRL) >= 0 );); \ - value = *CSTKPTR; \ - num = (~value)>>16; \ - ppvar = (LispPTR *)((DLword *)PVAR + 2 + GetLoWord(value));\ - for(i=num; --i >= 0;) { \ - *--ppvar = 0xffffffff; } \ - } \ - POP; \ - nextop1; \ - } - -#define N_OP_HILOC \ - { \ - TOPOFSTACK = GetHiWord(TOPOFSTACK) | S_POSITIVE; \ - nextop1; \ - } -#define N_OP_LOLOC \ - { \ - TOPOFSTACK = GetLoWord(TOPOFSTACK) | S_POSITIVE; \ - nextop1; \ - } - -#define GETBITS_N_M(a, b) \ - {register int temp, bb = b; \ - temp = 0xF & bb; \ - TOPOFSTACK = S_POSITIVE | \ - (( (GETWORD(Addr68k_from_LADDR(POINTERMASK & (TOPOFSTACK+a)))) \ - >> (16 - ( (0xF & (bb >> 4)) + temp + 1)) ) \ - & n_mask_array[temp] ); \ - nextop3; \ - } - -#define PUTBITS_N_M(a, b) \ - { int base; \ - register int bb = b; \ - register DLword *pword; \ - register int shift_size, field_size, fmask; \ - if( (SEGMASK & TOPOFSTACK) != S_POSITIVE ){ goto op_ufn; }; \ - base = POINTERMASK & POP_TOS_1; \ - pword = (DLword*)Addr68k_from_LADDR( base + a ); \ - field_size = 0xF & bb; \ - shift_size = 15 - (0xF & (bb >> 4)) - field_size; \ - fmask = n_mask_array[field_size] << shift_size; \ - GETWORD(pword) = ( (TOPOFSTACK << shift_size) & fmask) | \ - (GETWORD(pword) & (~fmask)); \ - TOPOFSTACK = base; \ - nextop3; \ - } - - -#define CONS \ - { TOPOFSTACK = N_OP_cons(POP_TOS_1, TOPOFSTACK); \ - nextop1; \ - } - -#define MYALINK \ - { \ - PUSH(((( CURRENTFX->alink) & 0xfffe)-FRAMESIZE) | S_POSITIVE); \ - nextop1; \ - } - -#define MYARGCOUNT \ - { register int arg_num; \ - if (( CURRENTFX->alink & 1) == 0) \ - arg_num = (int)((LispPTR *)(CURRENTFX) - 1); \ - else \ - arg_num = (int)(Stackspace + CURRENTFX->blink); \ - PUSH( (DLword)((arg_num - (int)IVar) >> 2) | S_POSITIVE); \ - nextop1; \ - } - -#define RCLK \ - { \ - TOPOFSTACK = N_OP_rclk(TOPOFSTACK); \ - nextop1; \ - } - -#define LISTP { \ - if((DLword)GetTypeNumber(TOPOFSTACK) != TYPE_LISTP)\ - TOPOFSTACK = NIL_PTR; \ - nextop1; \ - } - -#define NTYPEX \ - { \ - TOPOFSTACK = S_POSITIVE | (DLword)(GetTypeNumber(TOPOFSTACK));\ - nextop1; \ - } - -#define TYPEP(n) \ - { \ - if((DLword)GetTypeNumber(TOPOFSTACK) != n) \ - TOPOFSTACK = NIL_PTR; \ - nextop2; \ - } - -#define TYPEMASK(n) \ - { \ - if( ( ((DLword)GetTypeEntry(TOPOFSTACK)) & \ - ( (DLword)n << 8)) == 0) \ - TOPOFSTACK = NIL_PTR; \ - nextop2; \ - } - -#define INSTANCEP(atom_index) \ - { \ - TOPOFSTACK = N_OP_instancep(TOPOFSTACK,atom_index); \ - nextop_atom; \ - } - -#define STOREN(n) \ - { *(CSTKPTR - ((n+2) >> 1)) = TOPOFSTACK; \ - nextop2; \ - } - -#define COPYN(n) \ - { PUSH(*(CSTKPTR - ((n+2) >> 1))); \ - nextop2; \ - } - -#define POPN(n) \ - {TOPOFSTACK = *(CSTKPTRL -= ((n)+1)); \ - nextop2; \ - } - -#define CLARITHEQUAL { \ -register int arg2; \ - SV; arg2 = POP_TOS_1; \ - if ((TOPOFSTACK & SEGMASK) == S_POSITIVE) \ - { \ - if (arg2 == TOPOFSTACK) {TOPOFSTACK = ATOM_T; nextop1;} \ - if ((arg2 & SEGMASK) == S_POSITIVE) {TOPOFSTACK = NIL; nextop1;} \ - } \ - N_OP_POPPED_CALL_2(N_OP_eqq, arg2); \ -} - -#define S_CHARACTER 0x70000 - -#define AREF1 { \ -LispPTR arrayarg; \ -register LispPTR baseL; \ -register int index; \ -register OneDArray *arrayblk; \ - SV; arrayarg = POP_TOS_1; \ - if (GetTypeNumber(arrayarg) != TYPE_ONED_ARRAY) goto aref_ufn; \ - arrayblk = (OneDArray *)Addr68k_from_LADDR(arrayarg); \ - if ((TOPOFSTACK & SEGMASK) != S_POSITIVE) goto aref_ufn; \ - index = TOPOFSTACK & 0xFFFF; \ - if (index >= arrayblk->totalsize) goto aref_ufn; \ - index += arrayblk->offset; \ - baseL = arrayblk->base; \ - switch (arrayblk->typenumber) { \ - case 38: /* pointer : 32 bits */ \ - TOPOFSTACK = *(((int *)Addr68k_from_LADDR(baseL)) + index); \ - nextop1; \ - case 20: /* signed : 16 bits */ \ - TOPOFSTACK = (GETWORD(((DLword *)Addr68k_from_LADDR(baseL)) + index)) & 0xFFFF; \ - if (TOPOFSTACK & 0x8000) TOPOFSTACK |= S_NEGATIVE; \ - else TOPOFSTACK |= S_POSITIVE; \ - nextop1; \ - case 67: /* Character : 8 bits */ \ - TOPOFSTACK = S_CHARACTER | ((GETBYTE(((char *)Addr68k_from_LADDR(baseL)) + index)) & 0xFF); \ - nextop1; \ - case 22: /* signed : 32 bits */ \ - TOPOFSTACK = *(((int *)Addr68k_from_LADDR(baseL)) + index); \ - switch(TOPOFSTACK & 0xFFFF0000){ \ - case 0: \ - TOPOFSTACK |= S_POSITIVE; \ - break; \ - case (unsigned)0xFFFF0000: \ - TOPOFSTACK &= S_NEGATIVE; \ - break; \ - default:{register DLword *wordp; \ - wordp = createcell68k(TYPE_FIXP); \ - *((int *)wordp) = TOPOFSTACK; \ - TOPOFSTACK = (LispPTR)LADDR_from_68k(wordp); \ - } \ - } \ - nextop1; \ - case 0: /* unsigned : 1 bit per element */ \ - TOPOFSTACK = S_POSITIVE | (((GETBYTE(((char *)Addr68k_from_LADDR(baseL)) + (index >> 3))) >> (7 - (index & 7))) & 1); \ - nextop1; \ - case 3: /* unsigned : 8 bits per element */ \ - TOPOFSTACK = S_POSITIVE | ((GETBYTE(((char *)Addr68k_from_LADDR(baseL)) + index)) & 0xFF); \ - nextop1; \ - case 4: /* unsigned : 16 bits per element */ \ - TOPOFSTACK = S_POSITIVE | ((GETWORD(((DLword *)Addr68k_from_LADDR(baseL)) + index)) & 0xFFFF); \ - nextop1; \ - case 54: /* Float : 32 bits */{register DLword *wordp; \ - wordp = createcell68k(TYPE_FLOATP); \ - *((int *)wordp) = *(((int *)Addr68k_from_LADDR(baseL)) + index);\ - TOPOFSTACK = (LispPTR)LADDR_from_68k(wordp); \ - } \ - nextop1; \ - case 68: /* Character : 16 bits */ \ - TOPOFSTACK = S_CHARACTER | ((GETWORD(((DLword *)Addr68k_from_LADDR(baseL)) + index)) & 0xFFFF); \ - nextop1; \ - case 86: /* XPointer : 32 bits */ \ - TOPOFSTACK = *(((int *)Addr68k_from_LADDR(baseL)) + index); \ - nextop1; \ - default: /* Illegal or Unimplemented */ \ - goto aref_ufn; \ - }/* end switch typenumber */ \ -aref_ufn: \ - N_OP_POPPED_CALL_2(N_OP_aref1, arrayarg); \ -} - -#ifdef BIGVM -#define DTEST(n) \ -{ \ - register int atom_index; \ - register struct dtd *dtd68k ; \ - atom_index = n; \ - for(dtd68k=(struct dtd *) GetDTD(GetTypeNumber(TOPOFSTACK)); \ - atom_index != dtd68k->dtd_name ; \ - dtd68k=(struct dtd *) GetDTD(dtd68k->dtd_supertype)) \ - { \ - if( dtd68k->dtd_supertype == 0) \ - { \ - goto op_ufn; \ - } \ - } \ -nextop_atom; \ -} -#else /* BIGVM */ -#define DTEST(n) \ -{ \ - register int atom_index; \ - register struct dtd *dtd68k ; \ - atom_index = n; \ - for(dtd68k=(struct dtd *) GetDTD(GetTypeNumber(TOPOFSTACK)); \ - atom_index != dtd68k->dtd_namelo +((int)(dtd68k->dtd_namehi)<<16) ; \ - dtd68k=(struct dtd *) GetDTD(dtd68k->dtd_supertype)) \ - { \ - if( dtd68k->dtd_supertype == 0) \ - { \ - goto op_ufn; \ - } \ - } \ -nextop_atom; \ -} -#endif /* BIGVM */ - -#define FVAR(n) { \ -register LispPTR *chain; \ -chain = (LispPTR *) (PVar + n); \ -if(WBITSPTR(chain)->LSB){ \ - PUSH(GetLongWord(Addr68k_from_LADDR( \ - POINTERMASK & SWAP_WORDS(native_newframe(n >> 1))))); \ - nextop1; \ - }/* if(((WBITS */ \ -PUSH(GetLongWord(Addr68k_from_LADDR(POINTERMASK & SWAP_WORDS(*chain)))); \ -nextop1; \ -} - -#define FVARX(n) { \ -register int nn = n; \ -register LispPTR *chain; \ -chain = (LispPTR *) (PVar + nn); \ -if(WBITSPTR(chain)->LSB){ \ - PUSH(GetLongWord(Addr68k_from_LADDR( \ - POINTERMASK & SWAP_WORDS(native_newframe(nn >> 1))))); \ - nextop2; \ - }/* if(((WBITS */ \ -PUSH(GetLongWord(Addr68k_from_LADDR(POINTERMASK & SWAP_WORDS(*chain)))); \ -nextop2; \ -} - - -/* ******************************************************************** */ -/* THE FOLLOWING WAS IN n_op_inlinedefsC.h */ -/* ******************************************************************** */ - -#define GCREF(n) { \ - GCLOOKUPV(TOPOFSTACK, n, TOPOFSTACK); \ - nextop2;} - -#ifndef BIGATOMS -#define ATOMCELL_N(n) \ - {if ((unsigned int)TOPOFSTACK >> 16) {goto op_ufn;} \ - TOPOFSTACK = (n << 16) + (TOPOFSTACK << 1) ; \ - nextop2; \ - } -#elif defined(BIGVM) -#define ATOMCELL_N(n) \ - { register int nn = n; \ - if (0==((unsigned int)(TOPOFSTACK&= POINTERMASK) & SEGMASK)) \ - { /* old-symbol case; just add cell-number arg */ \ - switch (nn) \ - { \ - case PLIS_HI: /* PLIST entry for symbol */ \ - TOPOFSTACK = (PNP_HI << 16) + (10*(unsigned int)TOPOFSTACK) + NEWATOM_PLIST_OFFSET; \ - break; \ - case PNP_HI: /* PNAME entry for symbol */ \ - TOPOFSTACK = (PNP_HI << 16) + (10*(unsigned int)TOPOFSTACK) + NEWATOM_PNAME_OFFSET; \ - break; \ - case VALS_HI: /* VALUE cell for symbol */ \ - TOPOFSTACK = (PNP_HI << 16) + (10*(unsigned int)TOPOFSTACK) + NEWATOM_VALUE_OFFSET; \ - break; \ - case DEFS_HI: /* DEFINITION for symbol */ \ - TOPOFSTACK = (PNP_HI << 16) + (10*(unsigned int)TOPOFSTACK) + NEWATOM_DEFN_OFFSET; \ - break; \ - default: goto op_ufn; \ - } \ - nextop2; \ - } \ - else if (TYPE_NEWATOM == GetTypeNumber(TOPOFSTACK)) \ - { /* NEW-symbol case; it's an offset from the main ptr */ \ - switch (nn) \ - { \ - case PLIS_HI: /* PLIST entry for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_PLIST_OFFSET; \ - break; \ - case PNP_HI: /* PNAME entry for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_PNAME_OFFSET; \ - break; \ - case VALS_HI: /* VALUE cell for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_VALUE_OFFSET; \ - break; \ - case DEFS_HI: /* DEFINITION for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_DEFN_OFFSET; \ - break; \ - default: goto op_ufn; \ - } \ - nextop2; \ - } \ - else goto op_ufn; \ - } -#else /* */ - -#define ATOMCELL_N(n) \ - { register int nn = n; \ - if (0==((unsigned int)TOPOFSTACK & SEGMASK)) \ - { /* old-symbol case; just add cell-number arg */ \ - TOPOFSTACK = (nn << 16) + (TOPOFSTACK << 1) ; \ - nextop2; \ - } \ - else if (TYPE_NEWATOM == GetTypeNumber(TOPOFSTACK)) \ - { /* NEW-symbol case; it's an offset from the main ptr */ \ - switch (nn) \ - { \ - case PLIS_HI: /* PLIST entry for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_PLIST_OFFSET; \ - break; \ - case PNP_HI: /* PNAME entry for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_PNAME_OFFSET; \ - break; \ - case VALS_HI: /* VALUE cell for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_VALUE_OFFSET; \ - break; \ - case DEFS_HI: /* DEFINITION for symbol */ \ - TOPOFSTACK = TOPOFSTACK + NEWATOM_DEFN_OFFSET; \ - break; \ - default: goto op_ufn; \ - } \ - nextop2; \ - } \ - else goto op_ufn; \ - } -#endif /* BIGATOMS */ - - -#define DIFFERENCE {N_OP_CALL_2(N_OP_difference);} -#define LOGOR {N_OP_CALL_2(N_OP_logor);} -#define LOGAND {N_OP_CALL_2(N_OP_logand);} -#define LOGXOR {N_OP_CALL_2(N_OP_logxor);} -#define PLUS2 {N_OP_CALL_2(N_OP_plus2);} -#define QUOTIENT {N_OP_CALL_2(N_OP_quot);} -#define TIMES2 {N_OP_CALL_2(N_OP_times2);} -#define GREATERP {N_OP_CALL_2(N_OP_greaterp);} -#define IDIFFERENCE {N_OP_CALL_2(N_OP_idifference);} -#define IPLUS2 {N_OP_CALL_2(N_OP_iplus2);} -#define IQUOTIENT {N_OP_CALL_2(N_OP_iquot);} -#define ITIMES2 {N_OP_CALL_2(N_OP_itimes2);} -#define IGREATERP {N_OP_CALL_2(N_OP_igreaterp);} -#define IREMAINDER {N_OP_CALL_2(N_OP_iremainder);} -#define IPLUS_N(n) {N_OP_CALL_1d(N_OP_iplusn, n)} -#define IDIFFERENCE_N(n) {N_OP_CALL_1d(N_OP_idifferencen, n);} -#define BOXIPLUS {N_OP_CALL_2(N_OP_boxiplus);} -#define BOXIDIFFERENCE {N_OP_CALL_2(N_OP_boxidiff);} -#define FPLUS2 {N_OP_CALL_2(N_OP_fplus2);} -#define FDIFFERENCE {N_OP_CALL_2(N_OP_fdifference);} -#define FTIMES2 {N_OP_CALL_2(N_OP_ftimes2);} -#define FQUOTIENT {N_OP_CALL_2(N_OP_fquotient);} -#define FGREATERP {N_OP_CALL_2(N_OP_fgreaterp);} -#define UBFLOAT1(n) {N_OP_UNBOXED_CALL_1d(N_OP_ubfloat1, n);} -#define UBFLOAT2(n) {N_OP_UNBOXED_CALL_2d(N_OP_ubfloat2, n);} -#define UBFLOAT3(n) {N_OP_UNBOXED_CALL_3d(N_OP_ubfloat3, n);} -#define LRSH1 {N_OP_CALL_1(N_OP_lrsh1);} -#define LRSH8 {N_OP_CALL_1(N_OP_lrsh8);} -#define LLSH1 {N_OP_CALL_1(N_OP_llsh1);} -#define LLSH8 {N_OP_CALL_1(N_OP_llsh8);} -#define LSH {N_OP_CALL_2(N_OP_lsh);} -#define RPLACA {N_OP_CALL_2(N_OP_rplaca);} -#define RPLACD {N_OP_CALL_2(N_OP_rplacd);} -#define RPLCONS {N_OP_CALL_2(N_OP_rplcons);} -#define MAKENUMBER {N_OP_CALL_2(N_OP_makenumber);} -#define EQLOP {N_OP_CALL_2(N_OP_eqlop);} -#define CLEQUAL {N_OP_CALL_2(N_OP_clequal);} -#define ILEQUAL {N_OP_CALL_2(N_OP_equal);} -#define CLFMEMB {N_OP_CALL_exception_2(N_OP_clfmemb);} -#define CLASSOC {N_OP_CALL_exception_2(N_OP_classoc);} -#define FMEMB {N_OP_CALL_exception_2(N_OP_fmemb);} -#define ASSOC {N_OP_CALL_exception_2(N_OP_assoc);} -#define ARG0 {N_OP_CALL_1(N_OP_arg0);} -#define LISTGET {N_OP_CALL_exception_2C(N_OP_listget);} -#define DRAWLINE {N_OP_CALL_9(N_OP_drawline);} -#define N_OP_ADDBASE {N_OP_CALL_2(N_OP_addbase);} - -#define UNWIND(n, m) \ - { \ - if ((int)(CSTKPTRL = (LispPTR *) \ - N_OP_unwind(CSTKPTR, TOPOFSTACK, n, m)) < 0) \ - goto unwind_err; \ - POP; \ - nextop3; \ - } - -#define STKSCAN \ - {TOPOFSTACK = N_OP_stkscan(TOPOFSTACK); \ - nextop1; \ - } - -#define FVARX_(n) \ - {TOPOFSTACK = N_OP_fvar_(TOPOFSTACK, n); \ - nextop2; \ - } - -#define BLT {N_OP_CALL_3(N_OP_blt);} - -#define PILOTBITBLT \ - {TOPOFSTACK = N_OP_pilotbitblt(POP_TOS_1, TOPOFSTACK); \ - nextop1; \ - } - -#define CREATECELL {N_OP_CALL_1(N_OP_createcell);} - -#define RESTLIST(n) {TOPOFSTACK = N_OP_restlist(POP_TOS_1, TOPOFSTACK, n);\ - nextop2;} - - -#define ASET1 {N_OP_CALL_3(N_OP_aset1);} -#define ASET2 {N_OP_CALL_4(N_OP_aset2);} -#define MISC3(n) {N_OP_CALL_3d(N_OP_misc3, n);} -#define MISC4(n) {N_OP_CALL_4d(N_OP_misc4, n);} -#define MISC7(n) {N_OP_CALL_7d(N_OP_misc7, n);} -#define AREF2 {N_OP_CALL_3(N_OP_aref2);} -#define MISCN(index, args) \ -{ EXT; \ - if (OP_miscn(index,args)) { \ - RET; \ - /* PUSH(S_POSITIVE | (index << 8) | args); */ \ - goto op_ufn; \ - } \ - RET; \ - nextop0; \ -} - - -/* ******************************************************************** */ -/* Call Interface where -1 indicates an error return */ -/* ******************************************************************** */ - -/* SV need do no work */ -#define SV - -/* UFN_CALLS are inserted in xc.c. Note that only ufn_2 calls have decremented the stack at the time the UFN is called */ - -/* ufn_x there are x args from the Lisp stack - ufn_xd there are x args from the Lisp stack & - some from the code stream. -*/ -#define UFN_CALLS \ - \ -unwind_err: \ - CSTKPTRL = (LispPTR *) CurrentStackPTR; \ - Error_Exit = 0; \ - goto op_ufn; \ -ufn_2d: CSTKPTRL += 1; \ - goto fix_tos_ufn; \ -ufn_2d2:CSTKPTRL += 1; \ - goto fix_tos_ufn; \ -ufn_2: CSTKPTRL += 1; \ - goto fix_tos_ufn; \ -exception_2 : \ - Error_Exit = 0; \ - CSTKPTRL += 1; \ - TOPOFSTACK = TopOfStack; \ - if(!Irq_Stk_End){ \ - goto check_interrupt; \ - } \ - else goto op_ufn; \ -exception_2C : \ - Error_Exit = 0; \ - TOPOFSTACK = TopOfStack; \ - *CSTKPTRL = Scratch_CSTK; \ - CSTKPTRL += 1; \ - if(!Irq_Stk_End){ \ - goto check_interrupt; \ - } \ - else { \ - goto op_ufn; \ - } \ -fix_tos_ufn: \ - TOPOFSTACK = TopOfStack; \ - Error_Exit = 0; \ - goto op_ufn; - -#define N_OP_CALL_1(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(TOPOFSTACK)) < 0) goto fix_tos_ufn;\ -nextop1; - - -#define N_OP_CALL_1d(op_name, n) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(TOPOFSTACK, n)) < 0) goto fix_tos_ufn;\ -nextop2; - -#define N_OP_UNBOXED_CALL_1d(op_name, n) \ -TOPOFSTACK = op_name(TOPOFSTACK, n); \ -if (Error_Exit) goto fix_tos_ufn; \ -nextop2; - - -#define N_OP_CALL_2(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(POP_TOS_1, TOPOFSTACK)) < 0) \ - goto ufn_2; \ -nextop1; - -#define N_OP_POPPED_CALL_2(op_name, popped_arg) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(popped_arg, TOPOFSTACK)) < 0) \ - goto ufn_2; \ -nextop1; - -#define N_OP_CALL_2d(op_name, n) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(POP_TOS_1, TOPOFSTACK, n)) < 0) \ - goto ufn_2d; \ -nextop2; - -#define N_OP_UNBOXED_CALL_2d(op_name, n) \ -TOPOFSTACK = op_name(POP_TOS_1, TOPOFSTACK, n); \ -if (Error_Exit) goto ufn_2d; \ -nextop2; - -#define N_OP_CALL_2d2(op_name, a, b) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(POP_TOS_1, TOPOFSTACK, a, b)) < 0) \ - goto ufn_2d2; \ -nextop3; - -#define N_OP_CALL_exception_2(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(POP_TOS_1, TOPOFSTACK)) < 0) \ - goto exception_2; \ -nextop1; - -#define N_OP_CALL_exception_2C(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name(POP_TOS_1, TOPOFSTACK)) < 0) \ - goto exception_2C; \ -nextop1; - -#define N_OP_CALL_3(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 2; \ -nextop1; - -#define N_OP_CALL_3d(op_name, n) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK, n)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 2; \ -nextop2; - -#define N_OP_UNBOXED_CALL_3d(op_name, n) \ -TOPOFSTACK = op_name(*(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK, n); \ -if (Error_Exit) goto fix_tos_ufn; \ -CSTKPTRL -= 2; \ -nextop2; - - -#define N_OP_CALL_4(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-3), *(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 3; \ -nextop1; - - -#define N_OP_CALL_4d(op_name, n) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-3), *(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK, n)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 3; \ -nextop2; - -#define N_OP_CALL_7d(op_name, n) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-6), *(CSTKPTR-5), *(CSTKPTR-4), \ - *(CSTKPTR-3), *(CSTKPTR-2), *(CSTKPTR-1), TOPOFSTACK, n)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 6; \ -nextop2; - - - -#define N_OP_CALL_9(op_name) \ -if ((int)(TOPOFSTACK = (LispPTR)op_name( \ - *(CSTKPTR-8), *(CSTKPTR-7), *(CSTKPTR-6), \ - *(CSTKPTR-5), *(CSTKPTR-4), *(CSTKPTR-3), *(CSTKPTR-2),\ - *(CSTKPTR-1), TOPOFSTACK /*, fix_tos_ufn*/)) < 0) \ - goto fix_tos_ufn; \ -CSTKPTRL -= 8; \ -nextop1; - - -#ifdef SUN3_OS3_OR_OS4_IL - -/* need jump point for inline asm code, e.g., for IPLUS */ - -#define OPCODEFAIL \ - \ -fixtos1: \ - fixtos1_label(); \ - FIXTOS1; \ - goto op_ufn; - -#else - -/* no opcode fail point necessary */ - -#define OPCODEFAIL - -#endif diff --git a/inc/lnk-lispmap.h b/inc/lnk-lispmap.h deleted file mode 100755 index 2671538..0000000 --- a/inc/lnk-lispmap.h +++ /dev/null @@ -1,242 +0,0 @@ -/* $Id: lnk-lispmap.h,v 1.2 1999/01/03 02:06:11 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - - - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-92 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - - - -/* - File Name : lispmap.h(for TEST) - - **************NOTE***************** - OLD DEFs are MOVED to lispmap.FULL - **************NOTE***************** - - Global variables for LispSYSOUT - - Date : December 18, 1986 - Edited by : Takeshi Shimizu - -*/ -/**********************************************************************/ - - - -/************************************************************************/ -/* */ -/* Copyright 1989, 1990 Venue, Fuji Xerox Co., Ltd, Xerox Corp. */ -/* */ -/* This file is work-product resulting from the Xerox/Venue */ -/* Agreement dated 18-August-1989 for support of Medley. */ -/* */ -/************************************************************************/ - - - - - /* Whole Lisp size */ -#define LWORLD_SIZE 0x420000 /* byte */ - -/* 1 MDS entry size is 2(page) * 512 Byte */ -#define MDSTT_SIZE (LWORLD_SIZE >> 10 ) - -/* if you want to use the ATOMSPACE for Dummy then it must be 0x10000 take */ -#define MAP_SHIFT 0x0 - -/* Following constants mean LISP word offset. */ -/* these correspond with lisp mem map */ -/* for IOCBPAGE */ -#define IOCBPAGE_OFFSET 256 -#define IOCB_SIZE 1 - -/* for ATOMSPACE */ -#define ATOMS_HI 0 -#define ATOMS_OFFSET 0x00000 -#define ATOMS_SIZE 0x10000 - -/* for IOPAGE */ -#define IOPAGE_OFFSET 0x0FF00 -#define IOPAGE_SIZE 1 - -/* for STACKSPACE */ -#define STK_HI 1 -#define STK_OFFSET 0x10000 -#define STK_SIZE 0x10000 - -/* for PLISTSPACE */ -#ifndef BIGVM -#define PLIS_HI 2 -#define PLIS_OFFSET 0x20000 -#define PLIS_SIZE 0x20000 -#else -#define PLIS_HI 2 /* place holder, really -- keep the olde value, even though it's inconsistent with the OFFSET, because it's known by LISP, and is used as a dispatch constant. */ -#define PLIS_OFFSET 0x30000 -#define PLIS_SIZE 0x10 -#endif - -#ifdef BIGVM -#define FPTOVP_HI 4 /* again, inconsistent with OFFSET. */ -#define FPTOVP_OFFSET 0x20000 -#define FPTOVP_SIZE 0x40000 -#else -/* for FPTOVP */ -#define FPTOVP_HI 4 -#define FPTOVP_OFFSET 0x40000 -#define FPTOVP_SIZE 0x10000 -#endif /* BIGVM */ - -/*for PAGEMAP */ -#define PAGEMAP_HI 5 -#define PAGEMAP_OFFSET 0x50000 -#define PAGEMAP_SIZE 0x10000 - -/* for InterfacePage */ -#define IFPAGE_HI 6 -#define IFPAGE_OFFSET 0x60000 -#define IFPAGE_SIZE 0x200 - -/* for PageMapTBL */ -#define PAGEMAPTBL_OFFSET 0x60200 -#define PAGEMAPTBL_SIZE 0x800 - -/* for MISCSTATS */ -#define MISCSTATS_OFFSET 0x60A00 -#define MISCSTATS_SIZE 0x200 - -/* for UFNTable */ -#define UFNTBL_OFFSET 0x60C00 -#define UFNTBL_SIZE 0x200 - -/* for DTDspace */ -#define DTD_HI 6 -#define DTD_OFFSET 0x61000 -#define DTD_SIZE 0x1000 - -/* for LOCKEDPAGETBL */ -#define LOCKEDPAGETBL_OFFSET 0x67000 -#define LOCKEDPAGETBL_SIZE 0x1000 - -/* for MDSTT */ -#ifdef BIGVM - /* In BIGVM, MDS type table is at 19.,,0 for 1 segment */ -#define MDS_HI 20 -#define MDS_OFFSET 0x140000 -#define MDS_SIZE 0x10000 -#else -#define MDS_HI 6 -#define MDS_OFFSET 0x68000 -#define MDS_SIZE 0x8000 -#endif /* BIGVM */ - -/* for AtomHashTable */ -#define ATMHT_HI 7 -#define ATMHT_OFFSET 0x70000 -#define ATMHT_SIZE 0x10000 - -/* for PNPSPACE */ -#define PNP_HI 8 -#define PNP_OFFSET 0x80000 -#define PNP_SIZE 0x20000 - -/* for DEFSPACE */ -#define DEFS_HI 10 -#define DEFS_OFFSET 0xA0000 -#define DEFS_SIZE 0x20000 - -/* for VALSPACE */ -#define VALS_HI 12 -#define VALS_OFFSET 0xC0000 -#define VALS_SIZE 0x20000 - -/* for Small Positive */ -#define SPOS_HI 14 -#define S_POSITIVE 0xE0000 -#define SPOS_SIZE 0x10000 - -/* for Small Negative */ -#define SNEG_HI 15 -#define S_NEGATIVE 0xF0000 -#define SNEG_SIZE 0x10000 - -/* for characters */ -#define S_CHAR 0x70000 - -#ifdef BIGVM -/* for HTMAIN */ -#define HTMAIN_HI 16 -#define HTMAIN_OFFSET 0x100000 -#define HTMAIN_SIZE 0x10000 - -/* for HTOVERFLOW */ -#define HTOVERFLOW_OFFSET 0x110000 -#define HTOVERFLOW_SIZE 0x100 - -/* for HTBIGCOUNT */ -#define HTBIG_HI 16 -#define HTBIG_OFFSET 0x110100 -#define HTBIG_SIZE 0x8000 - -/* for HTCOLL */ -#define HTCOLL_HI 10 -#define HTCOLL_OFFSET 0xA0000 -#define HTCOLL_SIZE 0x40000 -#else -/* for HTMAIN */ -#define HTMAIN_HI 16 -#define HTMAIN_OFFSET 0x100000 -#define HTMAIN_SIZE 0x8000 - -/* for HTOVERFLOW */ -#define HTOVERFLOW_OFFSET 0x108000 -#define HTOVERFLOW_SIZE 0x100 - -/* for HTBIGCOUNT */ -#define HTBIG_HI 16 -#define HTBIG_OFFSET 0x108100 -#define HTBIG_SIZE 0x8000 - -/* for HTCOLL */ -#define HTCOLL_HI 17 -#define HTCOLL_OFFSET 0x110000 -#define HTCOLL_SIZE 0x10000 -#endif /* BIGVM */ - - -/* DISPLAYREGION */ - -#define DISPLAY_HI 18 -#define DISPLAY_OFFSET 0x120000 - - -#ifdef MEDLEY -/* for ARRAYSPACE & MDS for PROT-LISP */ -#define ARRAY_OFFSET 0x150000 -#elif defined(BIGVM) -#define ARRAY_OFFSET 0x150000 -#else -#define ARRAY_OFFSET 0x130000 -#endif - -#define MDS_BOTTOM_OFFSET 0x200000 - -/* for PnCharSpace(use only PROT-LISP ) */ -#define PNCHAR_HI 0x20 -#define PNCHAR_OFFSET 0x200000 -#define PNCHAR_SIZE 0x10000 - - -/***** SEG definitions for AtomCellN *****/ -/* following defs correspond with D machine memory layout */ -/**** NOTE!! if D's layout changes, modify following defs */ -#define D_PLISHI 2 -#define D_PNHI 010 -#define D_DEFSHI 012 -#define D_VALSHI 014 diff --git a/inc/lnk-tosfns.h b/inc/lnk-tosfns.h deleted file mode 100755 index 41208e0..0000000 --- a/inc/lnk-tosfns.h +++ /dev/null @@ -1,789 +0,0 @@ -/* $Id: lnk-tosfns.h,v 1.2 1999/01/03 02:06:11 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-1994 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - - - -/****************************************************************/ -/****** CURRENT Stack Overflow checks ********/ -/****************************************************************/ - -#define FN_STACK_CHECK \ - if ((int)CSTKPTR > (Irq_Stk_Check=(Irq_Stk_End-STK_MIN(LOCFNCELL)))) \ - goto check_interrupt; - - - -/****************************************************************/ -/****** LOCAL MACROS ********/ -/****************************************************************/ - -#ifdef BIGVM -#define SWAP_FNHEAD -#else -#undef SWAP_FNHEAD -#define SWAP_FNHEAD(x) SWAP_WORDS(x) -#endif /* BIGVM */ - - - -#ifdef NATIVETRAN -#define FN_CALL_NATIVE_CHECK(fncell, args, extra_code) \ -{ \ - if (fncell->native) \ - { \ - extra_code; \ - FuncObj = fncell; \ - HARD_PUSH(TOPOFSTACK); \ - CALL_NATIVE(fncell, args); \ - } \ -} - -#define FN_CALL_NATIVE_CHECK2(fncell, args, extra_code) \ -{ \ - if (fncell->native) \ - { \ - extra_code; \ - (int) PC = args; \ - FuncObj = fncell; \ - HARD_PUSH(TOPOFSTACK); \ - CALL_NATIVE2(fncell, args); \ - } \ -} - -#define ASM_LABEL_OF_FN_COMMON asm_label_op_fn_common() - -#else -#ifdef GCC386 -#define ASM_LABEL_OF_FN_COMMON asm("fn_common:"); -#else -#define ASM_LABEL_OF_FN_COMMON -#endif /* GCC386 */ - -#define FN_CALL_NATIVE_CHECK(fncell, args, extra_code) -#define FN_CALL_NATIVE_CHECK2(fncell, args, extra_code) -#endif /* NATIVETRAN */ - - - -/************************************************************************/ -/* */ -/* A P P L Y _ P O P _ P U S H _ T E S T */ -/* */ -/* Part of op_fn_common; decide what to do to the stack, depending */ -/* on whether we're FNcalling, APPLYing, or calling a UFN. What */ -/* happens depends on the value of fn_apply, which is set by */ -/* the various opcode macros, as follows: */ -/* */ -/* 0 Normal function calls; do nothing additional. */ -/* 1 APPLY: POP the #ARGS and FN-NAME arguments. */ -/* 2 UFN with 0 args from the opcode byte stream. Do nothing. */ -/* 3 UFN with 1 byte of arg from the code stream as a SMALLP */ -/* 4 UFN with 2 bytes of arg from the code stream as a SMALLP */ -/* 5 UFN with 3 bytes of arg from the code stream as a SMALLP */ -/* or as a symbol (for big atoms, e.g.) */ -/* 6 UFN with 4 bytes of arg from the code stream as a SMALLP */ -/* or as a symbol (for big atoms, e.g.) */ -/* */ -/* The latter 3 cases push the additional argument; THE 3-BYTE */ -/* CASE IS INCOMPLETE: IT SHOULD BOX ANY NON-SMALLP VALUES! */ -/* */ -/************************************************************************/ - -#ifdef BIGATOMS -#define APPLY_POP_PUSH_TEST \ - { \ - switch (fn_apply) \ - { \ - case 0: break; /* do nothing */ \ - case 1: POP; POP; break; /* from apply */ \ - case 2: break; /* ufn 0 args */ \ - case 3: PUSH(S_POSITIVE | Get_BYTE_PCMAC1); break; \ - case 4: PUSH(S_POSITIVE | Get_DLword_PCMAC1); break; \ - case 6: /* BIGVM possibility */ \ - case 5: { \ - unsigned int atm = Get_AtomNo_PCMAC1; \ - if (atm & SEGMASK) PUSH(atm) /* new atom */ \ - else PUSH(S_POSITIVE | atm); /* old atom as SMALLP*/\ - } \ - break; \ - default: error("Storage error: invalid UFN entry"); \ - } \ - if (needpush) PUSH(fn_atom_index); \ - } -#else /* not big atoms */ -#define APPLY_POP_PUSH_TEST \ - { \ - switch (fn_apply) \ - { \ - case 0: break; /* do nothing */ \ - case 1: POP; POP; break; /* from apply */ \ - case 2: break; /* ufn 0 args */ \ - case 3: PUSH(S_POSITIVE | Get_BYTE_PCMAC1); break; \ - case 4: PUSH(S_POSITIVE | Get_DLword_PCMAC1); break; \ - case 5: PUSH(S_POSITIVE | Get_AtomNo_PCMAC1); break; \ - default: error("Storage error: invalid UFN entry"); \ - } \ - if (needpush) PUSH(fn_atom_index); \ - } - -#endif /* BIGATOMS */ - - - -#define N_APPLY_POP_PUSH_TEST { \ - APPLY_POP_PUSH_TEST; \ - native_closure_env=closure_env; \ - } - -#define N_ENVCALL_POP_TEST { \ - CSTKPTRL -=2; \ - native_closure_env=closure_env; \ - } - - - -/****************************************************************/ -/****** OPAPPLY ********/ -/****************************************************************/ -#ifndef BIGATOMS -#define OPAPPLY { \ - if ( GET_TOS_1_HI == SPOS_HI ) { \ - fn_num_args = GET_TOS_1_LO; \ - fn_opcode_size = 1; \ - fn_apply = 1; \ - fn_atom_index = TOPOFSTACK; \ - FNTRACER(Trace_APPLY(fn_atom_index)); \ - FNCHECKER(if (quick_stack_check()) Trace_APPLY(fn_atom_index)); \ - if ( (SEGMASK & TOPOFSTACK) == 0) \ - { fn_defcell = (DefCell *) GetDEFCELL68k(TOPOFSTACK); \ - goto op_fn_common; \ - } \ - else \ - if (GetTypeNumber(TOPOFSTACK)==TYPE_COMPILED_CLOSURE) \ - { TopOfStack=TOPOFSTACK; \ - fn_defcell = (DefCell *) &TopOfStack; \ - goto op_fn_common; \ - } \ - else { fn_defcell = (DefCell *) GetDEFCELL68k(NIL_PTR); \ - goto op_fn_common; \ - } \ - } \ - goto op_ufn; \ -} /* OPAPPLY */ -#else -#define OPAPPLY { \ - if ( GET_TOS_1_HI == SPOS_HI ) { \ - fn_num_args = GET_TOS_1_LO; \ - fn_opcode_size = 1; \ - fn_apply = 1; \ - fn_atom_index = TOPOFSTACK; \ - FNTRACER(Trace_APPLY(fn_atom_index)); \ - FNCHECKER(if (quick_stack_check()) Trace_APPLY(fn_atom_index)); \ - if ( (SEGMASK & TOPOFSTACK) == 0) \ - { fn_defcell = (DefCell *) GetDEFCELLlitatom(TOPOFSTACK); \ - goto op_fn_common; \ - } \ - else switch (GetTypeNumber(TOPOFSTACK)) \ - { \ - case TYPE_NEWATOM: \ - fn_defcell = (DefCell *) GetDEFCELLnew(TOPOFSTACK); \ - goto op_fn_common; \ - case TYPE_COMPILED_CLOSURE: \ - TopOfStack=TOPOFSTACK; \ - fn_defcell = (DefCell *) &TopOfStack; \ - goto op_fn_common; \ - default: fn_defcell = (DefCell *) GetDEFCELL68k(NIL_PTR); \ - goto op_fn_common; \ - } /* end of switch */ \ - } \ - goto op_ufn; \ -} /* OPAPPLY */ -#endif /* BIGATOMS */ - - - -/****************************************************************/ -/****** OPFN(x) ********/ -/****************************************************************/ - -#if (defined(SUN3_OS3_OR_OS4_IL) && !(defined(NOASMFNCALL)) ) - -#ifdef NATIVETRAN - -#define OPFN(x, num_args_fn, fn_xna_args, fn_native) \ -{ /* asm inlines for fn call (much care put into keeping optimizer \ - from moving things around). */ \ - fn_section1(); \ - fn_section2(); \ - num_args_fn(); \ - fn_native_test(); \ - fn_section3(); \ - fn_xna_args(); \ - fn_section4(); \ - fast1_dispatcher(); /* nextop0 don't work here */ \ - fn_native(); \ - fn_section5(); \ - /* asm code jumps here when not ccodep */ \ - { fn_atom_index = Get_AtomNo_PCMAC1; \ - fn_defcell = (DefCell *) GetDEFCELL68k(fn_atom_index); \ - fn_num_args = x; \ - fn_opcode_size = FN_OPCODE_SIZE; \ - fn_apply = 0; \ - goto op_fn_common; \ - } \ -} - -#define OPFNX \ -{ /* asm inlines for fn call (much care put into keeping optimizer \ - from moving things around. */ \ - fnx_section1(); \ - fn_section2(); \ - fnx_args(); \ - fn_native_test(); \ - fn_section3(); \ - fnx_xna(); \ - fn_section4(); \ - fast1_dispatcher(); /* nextop0 don't work here */ \ - fnx_native(); \ - fn_section5(); \ - fn_atom_index = Get_AtomNo_PCMAC2; \ - fn_defcell = (DefCell *) GetDEFCELL68k(fn_atom_index); \ - fn_num_args = Get_BYTE_PCMAC1; \ - fn_opcode_size = FNX_OPCODE_SIZE; \ - fn_apply = 0; \ - goto op_fn_common; \ - /* *** these carefully arranged to satisfy optimizer */ \ -label1: fast1_dispatcher(); \ -label2: to_native_label(); \ - \ -} -#else - -#define OPFN(x, num_args_fn, fn_xna_args, fn_native) \ -{ /* asm inlines for fn call (much care put into keeping optimizer \ - from moving things around). */ \ - fn_section1(); \ - fn_section2(); \ - num_args_fn(); \ - fn_section3(); \ - fn_xna_args(); \ - fn_section4(); \ - fast1_dispatcher(); /* nextop0 don't work here */ \ - fn_section5(); \ - /* asm code jumps here when not ccodep */ \ - { fn_atom_index = Get_AtomNo_PCMAC1; \ - fn_defcell = (DefCell *) GetDEFCELL68k(fn_atom_index); \ - fn_num_args = x; \ - fn_opcode_size = FN_OPCODE_SIZE; \ - fn_apply = 0; \ - goto op_fn_common; \ - } \ -} - -#define OPFNX \ -{ /* asm inlines for fn call (much care put into keeping optimizer \ - from moving things around. */ \ - fnx_section1(); \ - fn_section2(); \ - fnx_args(); \ - fn_section3(); \ - fnx_xna(); \ - fn_section4(); \ - fast1_dispatcher(); /* nextop0 don't work here */ \ - fn_section5(); \ - fn_atom_index = Get_AtomNo_PCMAC2; \ - fn_defcell = (DefCell *) GetDEFCELL68k(fn_atom_index); \ - fn_num_args = Get_BYTE_PCMAC1; \ - fn_opcode_size = FNX_OPCODE_SIZE; \ - fn_apply = 0; \ - goto op_fn_common; \ - /* *** these carefully arranged to satisfy optimizer */ \ -label1: fast1_dispatcher(); \ - \ -} - -#endif /* NATIVETRAN */ - - -#else - -#define OPFN(argcount, num_args_fn, fn_xna_args, fn_native) \ -{ /* argcount is a number of the arguments on stack */ \ - register struct fnhead *LOCFNCELL; \ - register int defcell_word; \ - register int NEXTBLOCK; \ - FNTRACER(Trace_FNCall(argcount, Get_AtomNo_PCMAC1, TOPOFSTACK, CSTKPTR-1)); \ - FNCHECKER(if (quick_stack_check()) Trace_FNCall(argcount, Get_AtomNo_PCMAC1, TOPOFSTACK,CSTKPTR-1)); \ - fn_defcell = (DefCell *)GetDEFCELL68k(fn_atom_index = Get_AtomNo_PCMAC1); \ - defcell_word = *(int *)fn_defcell; \ - FNTPRINT((" def cell = 0x%x.\n", defcell_word)); \ - if(!(fn_defcell->ccodep)) \ - { /* it's not a CCODEP */ \ - fn_num_args = argcount; \ - fn_opcode_size = FN_OPCODE_SIZE; \ - fn_apply = 0; \ - goto op_fn_common; \ - } \ - LOCFNCELL = (struct fnhead *)Addr68k_from_LADDR((defcell_word &= POINTERMASK));\ - BCE_CURRENTFX->pc = ((unsigned int)PCMAC - (unsigned int)FuncObj) + FN_OPCODE_SIZE;\ - FN_CALL_NATIVE_CHECK(LOCFNCELL,-argcount,{}); \ - FN_STACK_CHECK; \ - {register int newivar; \ - newivar = (int) (IVARL = (DLword *)(CSTKPTR-argcount+1)); \ - BCE_CURRENTFX->nextblock = \ - NEXTBLOCK = \ - StkOffset_from_68K(newivar); \ - } \ - HARD_PUSH(TOPOFSTACK); /* save TOS */ \ - if( LOCFNCELL->na >= 0 ) \ - {register int RESTARGS; \ - RESTARGS = argcount - LOCFNCELL->na; \ - while(RESTARGS <0) { \ - HARD_PUSH(NIL_PTR); \ - RESTARGS++; \ - } \ - CSTKPTRL -= (RESTARGS); \ - } /* if end */ \ - /* Set up BF */ \ - HARD_PUSH(BF_MARK32 | NEXTBLOCK); \ - *((LispPTR *)CSTKPTR) = (FX_MARK << 16) | (StkOffset_from_68K(PVAR)); \ - ((struct frameex2 *)CSTKPTR)->fnheader = SWAP_FNHEAD(defcell_word); \ - CSTKPTRL = (LispPTR *)(((DLword *)CSTKPTR) + FRAMESIZE); \ - PVARL = (DLword *) CSTKPTR; \ - {register int result; \ - result = LOCFNCELL->pv; \ - if (result >= 0) \ - {register LispPTR unboundval; \ - unboundval = (LispPTR) 0xffffffff; \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - if (result > 0) \ - {HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - result-=1; \ - for (; --result >= 0;) { \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - } \ - } \ - } \ - } \ - CSTKPTRL += 1; \ - PCMACL = (ByteCode *)LOCFNCELL + LOCFNCELL->startpc + 1; \ - FuncObj = LOCFNCELL; \ - nextop0; \ -} /* end OPFN */ - - -/*************** OPFNX *************/ -#define OPFNX { \ - register struct fnhead *LOCFNCELL; \ - register DefCell *defcell; /* this reg is not allocated */ \ - register int NEXTBLOCK; \ - int num_args = Get_BYTE_PCMAC1; \ - defcell = (DefCell *) GetDEFCELL68k(Get_AtomNo_PCMAC2); \ - FNTRACER(Trace_FNCall(num_args, Get_AtomNo_PCMAC2, TOPOFSTACK, CSTKPTR-1)); \ - FNCHECKER(if (quick_stack_check()) Trace_FNCall(num_args, Get_AtomNo_PCMAC2, TOPOFSTACK, CSTKPTR-1)); \ - if( defcell->ccodep == 0 ) \ - { fn_defcell = defcell; \ - fn_num_args = num_args; \ - fn_opcode_size = FNX_OPCODE_SIZE; \ - fn_atom_index = Get_AtomNo_PCMAC2; \ - fn_apply = 0; \ - goto op_fn_common; \ - } \ - LOCFNCELL = (struct fnhead *)Addr68k_from_LADDR(defcell->defpointer); \ - BCE_CURRENTFX->pc = ((unsigned int)PCMAC - (unsigned int)FuncObj) + FNX_OPCODE_SIZE;\ - FN_CALL_NATIVE_CHECK2(LOCFNCELL, - num_args, {}); \ - FN_STACK_CHECK; \ - {register int newivar; \ - newivar = (int)(IVARL = (DLword *)(CSTKPTR-num_args+1)); \ - BCE_CURRENTFX->nextblock = \ - NEXTBLOCK = \ - StkOffset_from_68K(newivar); \ - } \ - HARD_PUSH(TOPOFSTACK); /* save TOS */ \ - if( LOCFNCELL->na >= 0 ) \ - {register int RESTARGS; \ - RESTARGS = num_args - LOCFNCELL->na; \ - while(RESTARGS <0) { \ - HARD_PUSH(NIL_PTR); \ - RESTARGS++; \ - } \ - CSTKPTRL -= (RESTARGS); \ - } /* if end */ \ - /* Set up BF */ \ - HARD_PUSH(BF_MARK32 | NEXTBLOCK); \ - *((LispPTR *)CSTKPTR) = (FX_MARK << 16) | (StkOffset_from_68K(PVAR)); \ - ((struct frameex2 *)CSTKPTR)->fnheader = SWAP_FNHEAD(defcell->defpointer);\ - CSTKPTRL = (LispPTR *) (((DLword *)CSTKPTR) + FRAMESIZE); \ - PVARL = (DLword *) CSTKPTR; \ - {register int result; \ - result = LOCFNCELL->pv; \ - if (result >= 0) \ - {register LispPTR unboundval; \ - unboundval = (LispPTR) 0xffffffff; \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - if (result > 0) \ - {HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - result-=1; \ - for (; --result >= 0;) { \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - } \ - } \ - } \ - } \ - CSTKPTRL += 1; \ - PCMACL = (ByteCode *)LOCFNCELL + LOCFNCELL->startpc + 1; \ - FuncObj = LOCFNCELL; \ -} /* end OPFN */ - -#endif /* NOASMFNCALL */ - - - - - -/****************************************************************/ -/****** OPCHECKAPPLY ********/ -/****************************************************************/ -#ifdef BIGATOMS -#define OPCHECKAPPLY { \ - register DefCell *defcell; \ - defcell = (DefCell *) GetDEFCELL68k(TOPOFSTACK & POINTERMASK); \ - if (!( defcell->ccodep && (((TOPOFSTACK & SEGMASK) == 0) || (GetTypeNumber(TOPOFSTACK) == TYPE_NEWATOM)) && \ - ( ( defcell->argtype == 0 ) || ( defcell->argtype == 2 ) ) ) ) \ - goto op_ufn; \ -} -#else -#define OPCHECKAPPLY { \ - register DefCell *defcell; \ - defcell = (DefCell *) GetDEFCELL68k(TOPOFSTACK & POINTERMASK); \ - if (!( defcell->ccodep && ((TOPOFSTACK & SEGMASK) == 0) ) && \ - ( ( defcell->argtype == 0 ) || ( defcell->argtype == 2 ) ) ) \ - goto op_ufn; \ -} -#endif /* BIGATOMS */ - - -/****************************************************************/ -/* UFN_COMMON at op_ufn / -/****************************************************************/ -#define GetUFNEntry(num) (((UFN *)UFNTable) + (num)) - -#define UFN_COMMON \ -op_ufn: use code in XC.c \ -{ register UFN *entry68k; \ - entry68k = (UFN *)GetUFNEntry(Get_BYTE_PCMAC0); \ - fn_num_args = entry68k->arg_num; \ - fn_opcode_size = entry68k->byte_num+1; \ - fn_atom_index = entry68k->atom_name; \ - fn_defcell = (DefCell *) GetDEFCELL68k(fn_atom_index); \ - fn_apply = 0; \ - goto op_fn_common; \ - }; - - - -/****************************************************************/ -/****** OP_FN_COMMON ********/ -/* vars: */ -/* fn_atom_index */ -/* fn_num_args */ -/* fn_opcode_size */ -/* fn_defcell */ -/* fn_apply */ -/* */ -/* All Closure Calls go through here */ -/****************************************************************/ -#define needpush NEXTBLOCK -#define OP_FN_COMMON \ -op_fn_common: \ - ASM_LABEL_OF_FN_COMMON; \ -{ register struct fnhead *LOCFNCELL; \ - register DefCell *defcell; /* this reg is not allocated */ \ - CClosure *closure; \ - LispPTR closure_env = (LispPTR) 0xffffffff; \ - {register int NEXTBLOCK = NIL; \ - defcell = fn_defcell; \ - if( (defcell->ccodep == 0) ) \ - if(GetTypeNumber(defcell->defpointer)==TYPE_COMPILED_CLOSURE) \ - { /* setup closure */ \ - closure=(CClosure *)Addr68k_from_LADDR(defcell->defpointer);\ - defcell=(DefCell *)closure; \ - /* not a closure if closure's env is NIL */ \ - if(closure->env_ptr ) \ - {closure_env = (LispPTR) (closure->env_ptr); \ - } \ - } /* if end */ \ - else { \ - /* NOT compiled object . We must use Interpreter*/ \ - defcell = (DefCell *)GetDEFCELL68k(ATOM_INTERPRETER); \ - needpush = 1; \ - } /*else end */ \ - LOCFNCELL = (struct fnhead *)Addr68k_from_LADDR(defcell->defpointer); \ - BCE_CURRENTFX->pc = ((unsigned int)PCMAC \ - - (unsigned int)FuncObj) + fn_opcode_size; \ - FNTPRINT(("Saving PC = 0%o (0x%x).\n", \ - BCE_CURRENTFX->pc, PCMAC+fn_opcode_size)); \ - FN_CALL_NATIVE_CHECK2(LOCFNCELL, -fn_num_args, N_APPLY_POP_PUSH_TEST) \ - FN_STACK_CHECK; \ - APPLY_POP_PUSH_TEST; \ - {register int newivar; \ - newivar = (int)(IVARL = (DLword *) (CSTKPTR+(1-fn_num_args-needpush))); \ - BCE_CURRENTFX->nextblock = \ - NEXTBLOCK = \ - StkOffset_from_68K(newivar); \ - } \ - HARD_PUSH(TOPOFSTACK); /* save TOS */ \ - if( LOCFNCELL->na >= 0 ) \ - {register int RESTARGS; \ - RESTARGS = fn_num_args - LOCFNCELL->na; \ - while(RESTARGS <0) { \ - HARD_PUSH(NIL_PTR); \ - RESTARGS++; \ - } \ - CSTKPTRL -= (RESTARGS); \ - } /* if end */ \ - /* Set up BF */ \ - HARD_PUSH(BF_MARK32 | NEXTBLOCK); \ - } /* NEXTBLOCK BLOCK */ \ - *((LispPTR *)CSTKPTR) = (FX_MARK << 16) | (StkOffset_from_68K(PVAR)); \ - ((struct frameex2 *)CSTKPTR)->fnheader = SWAP_FNHEAD(defcell->defpointer);\ - CSTKPTRL = (LispPTR *) (((DLword *)CSTKPTR) + FRAMESIZE); \ - PVARL = (DLword *) CSTKPTR; \ - {register int result; \ - register LispPTR unboundval; \ - unboundval = (LispPTR) 0xffffffff; \ - result = LOCFNCELL->pv; \ - HARD_PUSH(closure_env); \ - HARD_PUSH(unboundval); \ - for (; --result >= 0;) { \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - } \ - } /* result, unboundval block */ \ - CSTKPTRL += 1; \ - PCMACL = (ByteCode *)LOCFNCELL + LOCFNCELL->startpc + 1; \ - FuncObj = LOCFNCELL; \ - SWAPPED_FN_CHECK; /* see if callee needs swapping */ \ - CHECK_INTERRUPT; \ - nextop0; \ -} /* end OP_FN_COMMON */ - - - -/************************************************************************/ -/* */ -/* O P _ E N V C A L L */ -/* */ -/* Environment call on a code object. Takes an arg count on */ -/* the stack, along with a pointer to an environment. If non- */ -/* NIL, the environment is stuffed into the PVAR0 slot of the */ -/* frame. [This NIL check is in the UFN, and seems to be meant */ -/* to allow closures to be called without an environment, without */ -/* the compiler having to emit special code.] */ -/* */ -/************************************************************************/ - -#define OP_ENVCALL { \ - register struct fnhead *LOCFNCELL; \ - register int NEXTBLOCK; \ - register LispPTR closure_env = TOPOFSTACK; \ - register int num_args; \ - register LispPTR Fn_DefCell= GET_TOS_1; \ - LOCFNCELL = (struct fnhead *)Addr68k_from_LADDR(Fn_DefCell); \ - FNTPRINT(("ENVCall.\n")); \ - FNCHECKER(if (quick_stack_check()) printf("In ENVCALL.\n")); \ - N_GETNUMBER(GET_TOS_2, num_args, op_ufn); \ - BCE_CURRENTFX->pc = ((unsigned int)PCMAC - (unsigned int)FuncObj) + 1;\ - FN_CALL_NATIVE_CHECK2(LOCFNCELL, -num_args, N_ENVCALL_POP_TEST); \ - FN_STACK_CHECK; \ - CSTKPTRL -= 2; \ - {register int newivar; \ - newivar = (int) (IVARL = (DLword *) (CSTKPTR-num_args)); \ - BCE_CURRENTFX->nextblock = \ - NEXTBLOCK = \ - StkOffset_from_68K(newivar); \ - } \ - if( LOCFNCELL->na >= 0 ) \ - {register int RESTARGS; \ - RESTARGS = num_args - LOCFNCELL->na; \ - while(RESTARGS <0) { \ - HARD_PUSH(NIL_PTR); \ - RESTARGS++; \ - } \ - CSTKPTRL -= (RESTARGS); \ - } /* if end */ \ - /* Set up BF */ \ - HARD_PUSH(BF_MARK32 | NEXTBLOCK); \ - *((LispPTR *)CSTKPTR) = (FX_MARK << 16) | (StkOffset_from_68K(PVAR)); \ - ((struct frameex2 *)CSTKPTR)->fnheader = SWAP_FNHEAD(Fn_DefCell); \ - CSTKPTRL = (LispPTR *)(((DLword *)CSTKPTR) + FRAMESIZE); \ - PVARL = (DLword *) CSTKPTR; \ - {register int result; \ - result = LOCFNCELL->pv; \ - if (result >= 0) \ - {register LispPTR unboundval; \ - unboundval = (LispPTR) 0xffffffff; \ - if (closure_env == NIL_PTR) HARD_PUSH(unboundval); \ - else HARD_PUSH(closure_env); \ - HARD_PUSH(unboundval); \ - if (result > 0) \ - {HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - result-=1; \ - for (; --result >= 0;) { \ - HARD_PUSH(unboundval); \ - HARD_PUSH(unboundval); \ - } \ - } \ - } \ - } \ - CSTKPTRL += 1; \ - PCMACL = (ByteCode *)LOCFNCELL + LOCFNCELL->startpc + 1; \ - FuncObj = LOCFNCELL; \ - SWAPPED_FN_CHECK; \ -} /* end OP_ENVCALL */ - - - /***************************/ - /* */ - /* Check a code block to make sure, on a byte-swapped */ - /* machine, that the code stream has been put back */ - /* in "natural order" for faster fetching. */ - /* (Only in on ISC, now. */ - /********************************************************/ -#ifdef RESWAPPEDCODESTREAM -#define SWAPPED_FN_CHECK \ - if (!FuncObj->byteswapped) { byte_swap_code_block(FuncObj); FuncObj->byteswapped = 1;} -#else -#define SWAPPED_FN_CHECK -#endif /* RESWAPPEDCODESTREAM */ - - - - -/****************************************************************/ -/****** EVAL ********/ -/****************************************************************/ -#ifndef BIGATOMS -#define EVAL \ - { \ - LispPTR scratch; \ - register LispPTR work; \ - register LispPTR lookuped; /* keep looked up value */ \ - \ - switch(TOPOFSTACK & SEGMASK) \ - { \ - case S_POSITIVE: \ - case S_NEGATIVE: nextop1; \ - \ - case ATOMS_OFFSET: if( (TOPOFSTACK==NIL_PTR) \ - ||(TOPOFSTACK==ATOM_T)) \ - goto Hack_Label; \ - nnewframe(CURRENTFX,&scratch, \ - TOPOFSTACK & 0xffff); \ - work = ((scratch & 0xffff0000)>> 16) | \ - ((scratch & 0x00ff) <<16); \ - lookuped = *((LispPTR *) \ - (Addr68k_from_LADDR(work))); \ - if(lookuped==NOBIND_PTR) goto op_ufn; \ - TOPOFSTACK = lookuped; \ - Hack_Label: nextop1; \ - \ - default: switch(GetTypeNumber(TOPOFSTACK)) \ - { \ - case TYPE_FIXP : \ - case TYPE_FLOATP : \ - case TYPE_STRINGP : \ - case TYPE_ONED_ARRAY : \ - case TYPE_GENERAL_ARRAY : nextop1; \ - \ - case TYPE_LISTP : \ - fn_atom_index = ATOM_EVALFORM; \ - fn_num_args = 1; \ - fn_opcode_size = 1; \ - fn_defcell = (DefCell *) \ - GetDEFCELL68k(ATOM_EVALFORM); \ - fn_apply = 0; \ - goto op_fn_common; \ - \ - default : goto op_ufn; \ - } \ - \ - } /* end switch */ \ - \ -}/* EVAL end */ - -#else - -#define EVAL \ - { \ - LispPTR scratch; \ - register LispPTR work; \ - register LispPTR lookuped; /* keep looked up value */ \ - \ - switch(TOPOFSTACK & SEGMASK) \ - { \ - case S_POSITIVE: \ - case S_NEGATIVE: nextop1; \ - \ - case ATOMS_OFFSET: if( (TOPOFSTACK==NIL_PTR) \ - ||(TOPOFSTACK==ATOM_T)) \ - goto Hack_Label; \ - nnewframe(CURRENTFX,&scratch, \ - TOPOFSTACK & 0xffff); \ - work = ((scratch & 0xffff0000)>> 16) | \ - ((scratch & 0x0fff) <<16); \ - lookuped = *((LispPTR *) \ - (Addr68k_from_LADDR(work))); \ - if(lookuped==NOBIND_PTR) goto op_ufn; \ - TOPOFSTACK = lookuped; \ - Hack_Label: nextop1; \ - \ - default: switch(GetTypeNumber(TOPOFSTACK)) \ - { \ - case TYPE_FIXP : \ - case TYPE_FLOATP : \ - case TYPE_STRINGP : \ - case TYPE_ONED_ARRAY : \ - case TYPE_GENERAL_ARRAY : nextop1; \ - \ - case TYPE_LISTP : \ - fn_atom_index = ATOM_EVALFORM; \ - fn_num_args = 1; \ - fn_opcode_size = 1; \ - fn_defcell = (DefCell *) \ - GetDEFCELL68k(ATOM_EVALFORM); \ - fn_apply = 0; \ - goto op_fn_common; \ - \ - case TYPE_NEWATOM: \ - nnewframe(CURRENTFX, &scratch, TOPOFSTACK); \ - work = POINTERMASK & SWAP_WORDS(scratch); \ - lookuped = *((LispPTR *) \ - (Addr68k_from_LADDR(work))); \ - if(lookuped==NOBIND_PTR) goto op_ufn; \ - TOPOFSTACK = lookuped; \ - nextop1; \ - default : goto op_ufn; \ - } \ - \ - } /* end switch */ \ - \ -}/* EVAL end */ -#endif /* BIGATOMS */ - diff --git a/inc/lnk-tosret.h b/inc/lnk-tosret.h deleted file mode 100755 index cdf1787..0000000 --- a/inc/lnk-tosret.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: lnk-tosret.h,v 1.2 1999/01/03 02:06:12 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - - - -/************************************************************************/ -/* */ -/* (C) Copyright 1989, 1990, 1992 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ - - -/************************************************************************/ -/* */ -/* t o s r e t m a c r o . h */ -/* */ -/* Implements RETURN for the inner evaluation loop. There are */ -/* two versions--one for when hand optimization has been done, */ -/* and one for the naive case. To use the hand-optimization */ -/* version, you'll need to define an inline function or macro */ -/* called opreturn(). It must fall thru if alink is odd, but */ -/* must handle all other cases. You can rely on check_interrupt */ -/* being a defined label. */ -/* */ -/************************************************************************/ - -#ifdef NATIVETRAN -#define RETD6 SaveD6 = 0x100 -#define RET_CHECK_NATIVE(x) if(x ->native) { RET_TO_NATIVE; } -#else -#define RETD6 -#define RET_CHECK_NATIVE(x) -#endif - - -#if ((defined(ISC) || defined(SUN3_OS3_OR_OS4_IL)) && !(defined(NOASMFNCALL)) ) - -#define OPRETURN \ -{ opreturn(); \ - EXT; if(slowreturn()) goto stackoverflow_help; RET; \ - Irq_Stk_Check = STK_END_COMPUTE(EndSTKP,FuncObj); \ - if (((int)(CSTKPTR) > Irq_Stk_Check) || (Irq_Stk_End <= 0)) \ - { RETD6; goto check_interrupt; } \ - Irq_Stk_End = (int) EndSTKP; \ - RET_CHECK_NATIVE(BCE_CURRENTFX); \ - } - -#else - -#define OPRETURN { \ - register struct frameex2 *returnFX ; \ - register int alink; \ - alink = ((struct frameex2 *) BCE_CURRENTFX)->alink; \ - FNTPRINT(("RETURN = 0x%x, ", TOPOFSTACK)); \ - FNTRACER(prindatum(TOPOFSTACK); printf("\n"); fflush(stdout);) \ - if (alink & 1) { EXT; if(slowreturn()) goto stackoverflow_help; RET; \ - Irq_Stk_Check = STK_END_COMPUTE(EndSTKP,FuncObj); \ - if (((int)(CSTKPTR) > Irq_Stk_Check) || (Irq_Stk_End <= 0)) \ - { RETD6; goto check_interrupt; } \ - Irq_Stk_End = (int) EndSTKP; \ - RET_CHECK_NATIVE(BCE_CURRENTFX); \ - goto retxit; \ - }; \ - CSTKPTRL = (LispPTR *) IVAR; \ - returnFX = (struct frameex2 *) \ - ((DLword *) \ - (PVARL = (DLword *) Addr68k_from_StkOffset(alink)) \ - - FRAMESIZE); \ - IVARL = (DLword *) \ - Addr68k_from_StkOffset(GETWORD((DLword *)returnFX -1)); \ - /* Get PC from Retunee's pc slot in FX */ \ - PCMACL = returnFX->pc + (ByteCode *) \ - (FuncObj = (struct fnhead *) \ - Addr68k_from_LADDR(SWAP_FNHEAD(returnFX->fnheader) & POINTERMASK)) + 1;\ - Irq_Stk_Check = STK_END_COMPUTE(EndSTKP,FuncObj); \ - FNCHECKER(if (quick_stack_check()) printf("In RETURN.\n")); \ - if (((int)(CSTKPTR) > Irq_Stk_Check) || (Irq_Stk_End <= 0)) \ - { RETD6; goto check_interrupt; } \ - Irq_Stk_End = (int) EndSTKP; \ - RET_CHECK_NATIVE(returnFX); \ -retxit: {} \ -} /* OPRETURN end */ - -#endif diff --git a/inc/lnk-version.h b/inc/lnk-version.h deleted file mode 100755 index 98613d6..0000000 --- a/inc/lnk-version.h +++ /dev/null @@ -1,99 +0,0 @@ -/* $Id: lnk-version.h,v 1.2 1999/01/03 02:06:12 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - - -/************************************************************************/ -/* */ -/* V E R S I O N . H */ -/* */ -/* Version control: Set the two values that keep sysouts and emul- */ -/* ators in sync: The LVERSION and MINBVERSION fields in the IFPAGE */ -/* */ -/* MINBVERSION is the current emulator version, incremented with each */ -/* modification. This must be >= a sysout's ifpage.minbversion. */ -/* */ -/* LVERSION is the minimum lisp version that will run with this emu- */ -/* lator. This must be <= a sysouts's ifpage.lversion. */ -/* */ -/* The loadup process sets both of these values in the sysout. */ -/* */ -/* */ -/* */ -/* C O N F I G U R A T I O N / O P T I O N C O N T R O L */ -/* */ -/* Given a release specification, set flags for the features */ -/* that release has. This lets us set one flag in the make- */ -/* file, rather than remembering all the options that must change. */ -/* */ -/* -DRELEASE=115 Medley 1.15, small atoms */ -/* -DRELEASE=200 Medley 2.0 as released */ -/* -DRELEASE=201 Medley with DOS & European kbd support */ -/* -DRELEASE=210 Medley with big VM */ -/* -DRELEASE=300 Medley bigvm as released. */ -/* */ -/* */ -/************************************************************************/ - - - /* The current values */ - -#define LVERSION 21000 -#define MINBVERSION 21001 - - - /* But remember old values, if we can figure them out from ifdef's */ - -#if (RELEASE == 115) - -#undef LVERSION -#undef MINBVERSION -#define LVERSION 15000 -#define MINBVERSION 15000 -#undef BIGATOMS -#define NOEUROKBD -#define NOFORN -#define NOVERSION - -#elif (RELEASE == 200) - - /* Medley 2.0 as released */ -#undef LVERSION -#undef MINBVERSION -#define LVERSION 20000 -#define MINBVERSION 20000 - -#define BIGATOMS -#define NOEUROKBD -#define NOVERSION - -#elif (RELEASE == 201 ) - - - /* Medley 2.0 with EUROKBD modification */ -#undef LVERSION -#undef MINBVERSION -#define LVERSION 20100 -#define MINBVERSION 20100 - -#define BIGATOMS -#undef NOEUROKBD -#define NOVERSION - -#elif (RELEASE == 210) - - /* Medley 2.1, big-vm Medley while in beta-test */ -#undef LVERSION -#undef MINBVERSION -#define LVERSION 21000 -#define MINBVERSION 21000 - -#define BIGATOMS -#define BIGVM -#define NEWCDRCODING - - -# elif (RELEASE == 300 ) - - -#endif - -