1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 23:46:14 +00:00

Remove inc/lnk-*.h (#23)

These headers aren't used and are all old copies of the same
headers without `lnk-` in the name.
This commit is contained in:
Bruce Mitchener 2020-12-11 12:52:12 +07:00 committed by GitHub
parent fd9ca83dac
commit 259a2006a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 0 additions and 2912 deletions

View File

@ -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"

View File

@ -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 */

View File

@ -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 */

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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