/ports/RS6000/options.h

https://github.com/barak/scheme2c · C Header · 152 lines · 30 code · 24 blank · 98 comment · 0 complexity · ab15ce3cd0cf01974a9bb1b66d3310e0 MD5 · raw file

  1. /* SCHEME->C */
  2. /* Copyright 1989-1993 Digital Equipment Corporation
  3. * All Rights Reserved
  4. *
  5. * Permission to use, copy, and modify this software and its documentation is
  6. * hereby granted only under the following terms and conditions. Both the
  7. * above copyright notice and this permission notice must appear in all copies
  8. * of the software, derivative works or modified versions, and any portions
  9. * thereof, and both notices must appear in supporting documentation.
  10. *
  11. * Users of this software agree to the terms and conditions set forth herein,
  12. * and hereby grant back to Digital a non-exclusive, unrestricted, royalty-free
  13. * right and license under any changes, enhancements or extensions made to the
  14. * core functions of the software, including but not limited to those affording
  15. * compatibility with other hardware or software environments, but excluding
  16. * applications which incorporate this software. Users further agree to use
  17. * their best efforts to return to Digital any such changes, enhancements or
  18. * extensions that they make and inform Digital of noteworthy uses of this
  19. * software. Correspondence should be provided to Digital at:
  20. *
  21. * Director of Licensing
  22. * Western Research Laboratory
  23. * Digital Equipment Corporation
  24. * 250 University Avenue
  25. * Palo Alto, California 94301
  26. *
  27. * This software may be distributed (but not offered for sale or transferred
  28. * for compensation) to third parties, provided such third parties agree to
  29. * abide by the terms and conditions of this notice.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  32. * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  33. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
  34. * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  35. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  36. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  37. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  38. * SOFTWARE.
  39. */
  40. /* This file defines compilation options for a specific implementation */
  41. #define CHECKSTACK 0 /* 0 = don't check stack height */
  42. /* 1 = check stack height */
  43. #define TIMESLICE 0 /* 0 = don't time slice execution */
  44. /* 1 = time slice execution */
  45. #define COMPACTPUSHTRACE 0 /* 0 = inline procedure entry checks.
  46. 1 = emit procedure call for procedure
  47. entry checks.
  48. */
  49. #define COMPACTPOPTRACE 0 /* 0 = inline procedure exit cleanup.
  50. 1 = emit procedure call for procedure exit
  51. cleanup.
  52. */
  53. #define S2CSIGNALS 1 /* 0 = Scheme->C doesn't handle signals */
  54. /* 1 = Scheme->C does handle signals */
  55. #define MATHTRAPS 0 /* 0 = don't detect fixed point overflow */
  56. /* 1 = recover on fixed point overflow */
  57. /* Define only one of the supported processor types */
  58. #define RS6000 1
  59. /* Attributes of the selected architecture:
  60. The following four macros define specific aspects of the system. They
  61. are defined as strings, or specifically undefined:
  62. IMPLEMENTATION_MACHINE machine type
  63. IMPLEMENTATION_CPU cpu type
  64. IMPLEMENTATION_OS operating system
  65. IMPLEMENTATION_FS file system
  66. Big endian vs. little endian:
  67. BIGENDIAN defined to 1 to denote bigendian systems
  68. C compiler:
  69. OLD_FASHIONED_C defined to 1 for pre-ANSI compilers
  70. Alignment:
  71. DOUBLE_ALIGN defined to 1 to force doubles to be aligned on
  72. an even S2CINT boundary
  73. Macro expansion:
  74. NEED_MACRO_ARGS defined to 1 to declare a macro like X() as
  75. X(dummy)
  76. The types S2CINT and S2CUINT are defined to be signed and unsigned integers
  77. that are the same size as pointers. This is the basic "word" used by
  78. Scheme->C.
  79. The machine state when a continuation is created is captured in the
  80. sc_jmp_buf data structure.
  81. STACKPTR( x ) is a define that stores the address of the stack pointer
  82. in x.
  83. Unix flavors:
  84. POSIX POSIX.1 compliant
  85. SYSV System V or derivative
  86. SYSV4 System V release 4 (also define SYSV, POSIX)
  87. */
  88. /***************/
  89. /* RS6000 */
  90. /***************/
  91. #define IMPLEMENTATION_MACHINE "RS/6000"
  92. #define IMPLEMENTATION_CPU "PowerPC"
  93. #define BIGENDIAN 1
  94. #define DOUBLE_ALIGN 1
  95. typedef int S2CINT; /* Signed pointer size integer */
  96. typedef unsigned S2CUINT; /* Unsigned pointer size interger */
  97. typedef int PAGELINK; /* 32-bit sc_pagelink values */
  98. #define MAXS2CINT 0x7fffffff /* Maximum value of an S2CINT */
  99. #define MSBS2CUINT 0x80000000 /* S2CUINT with 1 in the MSB */
  100. #define STACKPTR(x) ((x) = (sc_processor_register (1)))
  101. #ifdef _AIX
  102. #define IMPLEMENTATION_OS "AIX"
  103. #undef IMPLEMENTATION_FS
  104. #ifdef __STDC__
  105. #undef OLD_FASHIONED_C
  106. #else
  107. #define OLD_FASHIONED_C 1
  108. #endif
  109. #include <setjmp.h>
  110. typedef jmp_buf sc_jmp_buf;
  111. #define SYSV 1
  112. #define POSIX 1
  113. #endif