1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
/* SCHEME->C */
/* Copyright (c) 1989-1993 Hewlett-Packard Development Company, L.P.
* All Rights Reserved
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* This file defines compilation options for a specific implementation */
#define CHECKSTACK 1 /* 0 = don't check stack height */
/* 1 = check stack height */
#define TIMESLICE 0 /* 0 = don't time slice execution */
/* 1 = time slice execution */
#define COMPACTPUSHTRACE 0 /* 0 = inline procedure entry checks.
1 = emit procedure call for procedure
entry checks.
*/
#define COMPACTPOPTRACE 0 /* 0 = inline procedure exit cleanup.
1 = emit procedure call for procedure exit
cleanup.
*/
#define S2CSIGNALS 1 /* 0 = Scheme->C doesn't handle signals */
/* 1 = Scheme->C does handle signals */
#define MATHTRAPS 0 /* 0 = don't detect fixed point overflow */
/* 1 = recover on fixed point overflow */
#define STACK_OVERFLOW 1 /* If you're going to disable this,
remove it from makefile-head as well */
/* Define only one of the supported processor types:
AOSF Alpha AXP OSF/1
HP700 HP 9000/700
MAC Macintosh system 7.1 with Think-C 5.0
MC680X0 HP 9000/300, Sun 3, Next
MIPS DECstation, SGI, Sony News
VAX Vax ULTRIX
WIN16 Microsoft Windows 3.1
*/
#define LINUX 1
/* Attributes of the selected architecture:
The following four macros define specific aspects of the system. They
are defined as strings, or specifically undefined:
IMPLEMENTATION_MACHINE machine type
IMPLEMENTATION_CPU cpu type
IMPLEMENTATION_OS operating system
IMPLEMENTATION_FS file system
Big endian vs. little endian:
BIGENDIAN defined to 1 to denote bigendian systems
Alignment:
DOUBLE_ALIGN defined to 1 to force doubles to be aligned on
an even S2CINT boundary
Macro expansion:
NEED_MACRO_ARGS defined to 1 to declare a macro like X() as
X(dummy)
The types S2CINT and S2CUINT are defined to be signed and unsigned integers
that are the same size as pointers. This is the basic "word" used by
Scheme->C.
The machine state when a continuation is created is captured in the
sc_jmp_buf data structure.
STACKPTR( x ) is a define that stores the address of the stack pointer
in x.
Unix flavors:
POSIX POSIX.1 compliant
SYSV System V or derivative
SYSV4 System V release 4 (also define SYSV, POSIX)
*/
/***************/
/* LINUX */
/***************/
#ifdef LINUX
#define IMPLEMENTATION_MACHINE "Generic PC"
#define IMPLEMENTATION_CPU "Intelx86"
#define IMPLEMENTATION_OS "Linux"
#undef IMPLEMENTATION_FS
typedef int S2CINT; /* Signed pointer size integer */
typedef unsigned S2CUINT; /* Unsigned pointer size interger */
typedef int PAGELINK; /* 32-bit sc_pagelink values */
#define MAXS2CINT 0x7fffffff /* Maximum value of an S2CINT */
#define MSBS2CUINT 0x80000000 /* S2CUINT with 1 in the MSB */
#undef TRUE
#undef FALSE
#define STACKPTR( x ) x = sc_processor_register( 0 )
#define POSIX 1
#include <setjmp.h>
typedef jmp_buf sc_jmp_buf;
#define DOUBLE_ALIGN 1
#define LAZY_STACK_POP 1
#define LAZY_STACK_INCREMENT 4
#define SCMAXHEAP 4000U
#endif
|