Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

9049 lines (7995 sloc) 292.591 kb
/* File: "gambit.h" */
/*
* Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
*/
#ifndef ___VERSION
#error "___VERSION has not been set by includer"
#endif
#if ___VERSION != 406004
#include "gambit-not406004.h"
#else
#ifndef ___GAMBIT_H
#define ___GAMBIT_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/*---------------------------------------------------------------------------*/
/*
* This section determines the following characteristics of the target
* platform:
*
* - target operating system (WIN32, POSIX, etc)
* - target processor type (x86, PowerPC, etc)
* - byte order endianness (big-endian or little-endian)
* - width of the integer and floating-point types (char, short, int, etc)
*/
/*
* Determine the target operating system type. This is used mainly in
* the implementation of operating system dependent runtime library
* functions (i.e. lib/os*.c), but also to handle some OS quirks in
* this include file.
*/
#ifdef _WIN32
#define ___OS_WIN32
#endif
/*
* Determine the target processor type. This is used for dynamic code
* generation (to convert Scheme procedures into C functions) and to
* determine byte order endianness.
*/
#ifndef ___CPU_x86
#ifdef I386
#define ___CPU_x86
#else
#ifdef _I386
#define ___CPU_x86
#else
#ifdef i386
#define ___CPU_x86
#else
#ifdef _i386
#define ___CPU_x86
#else
#ifdef __i386
#define ___CPU_x86
#else
#ifdef __i386__
#define ___CPU_x86
#else
#ifdef __i486
#define ___CPU_x86
#else
#ifdef __i486__
#define ___CPU_x86
#else
#ifdef __i586
#define ___CPU_x86
#else
#ifdef __i586__
#define ___CPU_x86
#else
#ifdef __i686
#define ___CPU_x86
#else
#ifdef __i686__
#define ___CPU_x86
#else
#ifdef __ix86
#define ___CPU_x86
#else
#ifdef M_I386
#define ___CPU_x86
#else
#ifdef _M_I386
#define ___CPU_x86
#else
#ifdef M_I86
#define ___CPU_x86
#else
#ifdef _M_I86
#define ___CPU_x86
#else
#ifdef _M_IX86
#define ___CPU_x86
#else
#ifdef _X86_
#define ___CPU_x86
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifndef ___CPU_x86_64
#ifdef __x86_64__
#define ___CPU_x86_64
#else
#ifdef _M_AMD64
#define ___CPU_x86_64
#endif
#endif
#endif
#ifndef ___CPU_ppc
#ifdef PPC
#define ___CPU_ppc
#else
#ifdef ppc
#define ___CPU_ppc
#else
#ifdef __ppc
#define ___CPU_ppc
#else
#ifdef __ppc__
#define ___CPU_ppc
#else
#ifdef _ARCH_PPC
#define ___CPU_ppc
#else
#ifdef __POWERPC__
#define ___CPU_ppc
#else
#ifdef powerpc
#define ___CPU_ppc
#else
#ifdef _POWER
#define ___CPU_ppc
#else
#ifdef _ARCH_PWR
#define ___CPU_ppc
#else
#ifdef _ARCH_PWR2
#define ___CPU_ppc
#else
#ifdef _M_PPC
#define ___CPU_ppc
#else
#ifdef _M_MPPC
#define ___CPU_ppc
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifndef ___CPU_ppc_64
#ifdef __ppc_64__
#define ___CPU_ppc_64
#endif
#endif
#ifndef ___CPU_sparc
#ifdef SPARC
#define ___CPU_sparc
#else
#ifdef __sparc
#define ___CPU_sparc
#else
#ifdef __sparc__
#define ___CPU_sparc
#else
#ifdef sparc
#define ___CPU_sparc
#else
#ifdef sparc64
#define ___CPU_sparc
#else
#ifdef sparclite
#define ___CPU_sparc
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifndef ___CPU_alpha
#ifdef alpha
#define ___CPU_alpha
#else
#ifdef __alpha
#define ___CPU_alpha
#else
#ifdef __alpha__
#define ___CPU_alpha
#else
#ifdef ALPHA
#define ___CPU_alpha
#else
#ifdef _ALPHA_
#define ___CPU_alpha
#else
#ifdef __ALPHA
#define ___CPU_alpha
#else
#ifdef _M_ALPHA
#define ___CPU_alpha
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifndef ___CPU_mips
#ifdef mips
#define ___CPU_mips
#else
#ifdef _mips
#define ___CPU_mips
#else
#ifdef __mips
#define ___CPU_mips
#else
#ifdef __mips__
#define ___CPU_mips
#else
#ifdef MIPSEB
#define ___CPU_mips
#else
#ifdef _MIPSEB
#define ___CPU_mips
#else
#ifdef __MIPSEB
#define ___CPU_mips
#else
#ifdef __MIPSEB__
#define ___CPU_mips
#else
#ifdef MIPSEL
#define ___CPU_mips
#else
#ifdef _MIPSEL
#define ___CPU_mips
#else
#ifdef __MIPSEL
#define ___CPU_mips
#else
#ifdef __MIPSEL__
#define ___CPU_mips
#else
#ifdef _M_MRX000
#define ___CPU_mips
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifndef ___CPU_arm
#ifdef arm
#define ___CPU_arm
#else
#ifdef __arm
#define ___CPU_arm
#else
#ifdef __arm__
#define ___CPU_arm
#endif
#endif
#endif
#endif
#ifndef ___CPU_vax
#ifdef vax
#define ___CPU_vax
#else
#ifdef __vax
#define ___CPU_vax
#else
#ifdef __vax__
#define ___CPU_vax
#endif
#endif
#endif
#endif
/*
* Determine the byte order endianness based on the processor type.
* We assume that all processors are big-endian, except the x86, x86_64,
* alpha and vax. The PowerPC, MIPS and ARM can be either big-endian or
* little-endian so extra tests are needed.
*/
#ifndef ___BIG_ENDIAN
#ifndef ___LITTLE_ENDIAN
#ifdef ___CPU_x86
#define ___LITTLE_ENDIAN
#endif
#ifdef ___CPU_x86_64
#define ___LITTLE_ENDIAN
#endif
#ifdef ___CPU_ppc
#ifdef _LITTLE_ENDIAN
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN__
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN_DATA__
#define ___LITTLE_ENDIAN
#endif
#endif
#ifdef ___CPU_ppc_64
#ifdef _LITTLE_ENDIAN
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN__
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN_DATA__
#define ___LITTLE_ENDIAN
#endif
#endif
#ifdef ___CPU_alpha
#define ___LITTLE_ENDIAN
#endif
#ifdef ___CPU_mips
#ifdef _MIPSEL
#define ___LITTLE_ENDIAN
#endif
#endif
#ifdef ___CPU_arm
#ifdef _LITTLE_ENDIAN
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN__
#define ___LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN_DATA__
#define ___LITTLE_ENDIAN
#endif
#ifdef __ARMEL__
#define ___LITTLE_ENDIAN
#endif
#endif
#ifdef ___CPU_vax
#define ___LITTLE_ENDIAN
#endif
#ifndef ___LITTLE_ENDIAN
#define ___BIG_ENDIAN
#endif
#endif
#endif
/*
* Determine the number of bits in various integer and floating point
* types and define appropriate macros accordingly. The macro for a
* given type is not defined if the type is not supported by the C
* compiler or if it is not 8, 16, 32 or 64 bits wide.
*/
#ifndef ___CHAR_WIDTH
#ifdef ___DONT_HAVE_LIMITS_H
/*
* If the file "limits.h" is not available then the symbol
* ___DONT_HAVE_LIMITS_H must be defined (for example on the compiler's
* command line) and the following definitions will be used:
*/
#define ___CHAR_WIDTH 8 /* if needed, edit to suit your platform */
#define ___SHORT_WIDTH 16
#define ___INT_WIDTH 32
#define ___LONG_WIDTH 32
#ifdef __GNUC__
#define ___LONGLONG_WIDTH 64
#endif
#else
/*
* If the file "limits.h" is available then it contains macros
* defining the range of the integer types. The following
* preprocessor conditional definitions are written so that they will
* work regardless of the number of bits in the integer types
* supported by the compiler (many compilers for 32 bit machines give
* an error for C preprocessor expressions like ULONG_MAX >> 32 or
* ULLONG_MAX == 18446744073709551615UL). Some parentheses seem
* redundant, but they are required for MS Visual C/C++ whose
* preprocessor signals an error on: x >> 8 >> 8.
*/
#include <limits.h>
#ifdef UCHAR_MAX
#if (UCHAR_MAX & 255) == 255
#if (UCHAR_MAX >> 8) == 0
#define ___CHAR_WIDTH 8
#else
#if ((UCHAR_MAX >> 8) & 255) == 255
#if ((UCHAR_MAX >> 8) >> 8) == 0
#define ___CHAR_WIDTH 16
#else
#if (((UCHAR_MAX >> 8) >> 8) & 255) == 255
#if (((UCHAR_MAX >> 8) >> 8) >> 8) != 0
#if ((((UCHAR_MAX >> 8) >> 8) >> 8) & 255) == 255
#if ((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) == 0
#define ___CHAR_WIDTH 32
#else
#if (((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if (((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((((UCHAR_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) == 0
#define ___CHAR_WIDTH 64
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef USHRT_MAX
#if (USHRT_MAX & 255) == 255
#if (USHRT_MAX >> 8) == 0
#define ___SHORT_WIDTH 8
#else
#if ((USHRT_MAX >> 8) & 255) == 255
#if ((USHRT_MAX >> 8) >> 8) == 0
#define ___SHORT_WIDTH 16
#else
#if (((USHRT_MAX >> 8) >> 8) & 255) == 255
#if (((USHRT_MAX >> 8) >> 8) >> 8) != 0
#if ((((USHRT_MAX >> 8) >> 8) >> 8) & 255) == 255
#if ((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) == 0
#define ___SHORT_WIDTH 32
#else
#if (((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if (((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((((USHRT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) == 0
#define ___SHORT_WIDTH 64
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef UINT_MAX
#if (UINT_MAX & 255) == 255
#if (UINT_MAX >> 8) == 0
#define ___INT_WIDTH 8
#else
#if ((UINT_MAX >> 8) & 255) == 255
#if ((UINT_MAX >> 8) >> 8) == 0
#define ___INT_WIDTH 16
#else
#if (((UINT_MAX >> 8) >> 8) & 255) == 255
#if (((UINT_MAX >> 8) >> 8) >> 8) != 0
#if ((((UINT_MAX >> 8) >> 8) >> 8) & 255) == 255
#if ((((UINT_MAX >> 8) >> 8) >> 8) >> 8) == 0
#define ___INT_WIDTH 32
#else
#if (((((UINT_MAX >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if (((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((((UINT_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) == 0
#define ___INT_WIDTH 64
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef ULONG_MAX
#if (ULONG_MAX & 255) == 255
#if (ULONG_MAX >> 8) == 0
#define ___LONG_WIDTH 8
#else
#if ((ULONG_MAX >> 8) & 255) == 255
#if ((ULONG_MAX >> 8) >> 8) == 0
#define ___LONG_WIDTH 16
#else
#if (((ULONG_MAX >> 8) >> 8) & 255) == 255
#if (((ULONG_MAX >> 8) >> 8) >> 8) != 0
#if ((((ULONG_MAX >> 8) >> 8) >> 8) & 255) == 255
#if ((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) == 0
#define ___LONG_WIDTH 32
#else
#if (((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if (((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((((ULONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) == 0
#define ___LONG_WIDTH 64
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef __GNUC__
#define ___LONGLONG_WIDTH 64
#else
/* Handle some non ISO C99 compilers that nevertheless support "long long". */
#ifndef ULLONG_MAX
#ifdef ULONGLONG_MAX
#define ULLONG_MAX ULONGLONG_MAX
#else
#ifdef ULONG_LONG_MAX
#define ULLONG_MAX ULONG_LONG_MAX
#endif
#endif
#endif
#ifdef ULLONG_MAX
#if (ULLONG_MAX & 255) == 255
#if (ULLONG_MAX >> 8) == 0
#define ___LONGLONG_WIDTH 8
#else
#if ((ULLONG_MAX >> 8) & 255) == 255
#if ((ULLONG_MAX >> 8) >> 8) == 0
#define ___LONGLONG_WIDTH 16
#else
#if (((ULLONG_MAX >> 8) >> 8) & 255) == 255
#if (((ULLONG_MAX >> 8) >> 8) >> 8) != 0
#if ((((ULLONG_MAX >> 8) >> 8) >> 8) & 255) == 255
#if ((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) == 0
#define ___LONGLONG_WIDTH 32
#else
#if (((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if (((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if (((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) != 0
#if ((((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) & 255) == 255
#if ((((((((ULLONG_MAX >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) >> 8) == 0
#define ___LONGLONG_WIDTH 64
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
/*
* If the "long long" type is not supported, then substitute the type
* "long".
*/
#ifndef ___LONGLONG_WIDTH
#define ___LONGLONG_WIDTH ___LONG_WIDTH
#define ___LONGLONG long
#define ___ULONGLONG unsigned long
#else
#define ___LONGLONG long long
#define ___ULONGLONG unsigned long long
#endif
/*
* Some old C compilers do not support the "signed char" and "wchar_t"
* types. The following preprocessor directives allow these types to
* be redefined (such as on the C compiler's command line, in
* "config.h", ...).
*/
#ifndef ___SCHAR
#define ___SCHAR signed char
#endif
#ifndef ___WCHAR
#ifdef ___DONT_HAVE_WCHAR_H
/*
* If the file "wchar.h" is not available then the symbol
* ___DONT_HAVE_WCHAR_H must be defined (for example on the compiler's
* command line) and the following definitions will be used:
*/
#define ___WCHAR unsigned char
#define ___WCHAR_MIN 0
#define ___WCHAR_MAX ((1<<___CHAR_WIDTH)-1)
#else
/*
* If the file "wchar.h" is available then it should contain macros
* defining the range of the wchar_t type.
*/
#include <wchar.h>
#define ___WCHAR wchar_t
#ifdef WCHAR_MIN
#define ___WCHAR_MIN WCHAR_MIN
#else
#define ___WCHAR_MIN 0
#endif
#ifdef WCHAR_MAX
#define ___WCHAR_MAX WCHAR_MAX
#else
#ifdef UINT_MAX
#define ___WCHAR_MAX UINT_MAX
#else
#define ___WCHAR_MAX ((1<<___CHAR_WIDTH)-1)
#endif
#endif
#endif
#endif
#ifdef ___DONT_HAVE_FLOAT_H
/*
* If the file "float.h" is not available then the symbol
* ___DONT_HAVE_FLOAT_H must be defined (for example on the compiler's
* command line) and the following definitions will be used:
*/
#define ___FLOAT_WIDTH 32 /* if needed, edit to suit your platform */
#define ___DOUBLE_WIDTH 64
#else
/*
* If the file "float.h" is available then it contains macros defining
* the range of the floating point types. The following preprocessor
* conditional definitions are not completely correct (and may not
* even compile properly because it is possible that FLT_MAX_EXP and
* DBL_MAX_EXP are not constant expressions). However, it appears to
* work on a wide range of platforms.
*/
#include <float.h>
#ifdef FLT_MAX_EXP
#if FLT_MAX_EXP == 128
#define ___FLOAT_WIDTH 32
#else
#if FLT_MAX_EXP == 1024
#define ___FLOAT_WIDTH 64
#endif
#endif
#endif
#ifdef DBL_MAX_EXP
#if DBL_MAX_EXP == 128
#define ___DOUBLE_WIDTH 32
#else
#if DBL_MAX_EXP == 1024
#define ___DOUBLE_WIDTH 64
#endif
#endif
#endif
#endif
#endif
/*
* Size of pointers.
*
* ___VOIDSTAR_WIDTH must be equal to sizeof(void*) * ___CHAR_WIDTH.
* This value can't be computed with the "sizeof" operator because it
* must be known at macro expansion time. If in doubt just do
*
* #define ___VOIDSTAR_WIDTH ___LONG_WIDTH
*
*/
#ifndef ___VOIDSTAR_WIDTH
#define ___VOIDSTAR_WIDTH @CONF_VOIDSTAR_WIDTH@
#endif
#if ___VOIDSTAR_WIDTH == 32
#undef ___USE_32_BIT_ADDR
#define ___USE_32_BIT_ADDR
#endif
/*---------------------------------------------------------------------------*/
/*
* The following symbols must be defined to reflect the integer and
* floating-point data types supported by the C compiler. A symbol is
* only defined if the data type exists. At least ___F64 and one of
* the pairs ___S32/___U32 and ___S64/___U64 must be defined.
*
* define ___S8 as the signed integer type of exactly 8 bits
* define ___U8 as the unsigned integer type of exactly 8 bits
* define ___SM8 as the signed integer type of at least 8 bits
* define ___UM8 as the unsigned integer type of at least 8 bits
*
* define ___S16 as the signed integer type of exactly 16 bits
* define ___U16 as the unsigned integer type of exactly 16 bits
* define ___SM16 as the signed integer type of at least 16 bits
* define ___UM16 as the unsigned integer type of at least 16 bits
*
* define ___S32 as the signed integer type of exactly 32 bits
* define ___U32 as the unsigned integer type of exactly 32 bits
* define ___SM32 as the signed integer type of at least 32 bits
* define ___UM32 as the unsigned integer type of at least 32 bits
*
* define ___S64 as the signed integer type of exactly 64 bits
* define ___U64 as the unsigned integer type of exactly 64 bits
* define ___SM64 as the signed integer type of at least 64 bits
* define ___UM64 as the unsigned integer type of at least 64 bits
*
* define ___F32 as the 32 bit floating-point type
* define ___F64 as the 64 bit floating-point type
*/
/*
* First we make sure that the width of all the integer and
* floating-point types is known.
*/
#ifndef ___CHAR_WIDTH
#error "The definition for ___CHAR_WIDTH is missing"
#endif
#ifndef ___SHORT_WIDTH
#error "The definition for ___SHORT_WIDTH is missing"
#endif
#ifndef ___INT_WIDTH
#error "The definition for ___INT_WIDTH is missing"
#endif
#ifndef ___LONG_WIDTH
#error "The definition for ___LONG_WIDTH is missing"
#endif
#ifndef ___LONGLONG_WIDTH
#error "The definition for ___LONGLONG_WIDTH is missing"
#endif
#ifndef ___FLOAT_WIDTH
#error "The definition for ___FLOAT_WIDTH is missing"
#endif
#ifndef ___DOUBLE_WIDTH
#error "The definition for ___DOUBLE_WIDTH is missing"
#endif
#if ___INT_WIDTH == 8
#define ___S8 int
#define ___U8 unsigned int
#else
#if ___LONG_WIDTH == 8
#define ___S8 long
#define ___U8 unsigned long
#else
#if ___SHORT_WIDTH == 8
#define ___S8 short
#define ___U8 unsigned short
#else
#if ___CHAR_WIDTH == 8
#define ___S8 ___SCHAR
#define ___U8 unsigned char
#else
#if ___LONGLONG_WIDTH == 8
#define ___S8 ___LONGLONG
#define ___U8 unsigned ___LONGLONG
#endif
#endif
#endif
#endif
#endif
#if ___INT_WIDTH == 16
#define ___S16 int
#define ___U16 unsigned int
#else
#if ___LONG_WIDTH == 16
#define ___S16 long
#define ___U16 unsigned long
#else
#if ___SHORT_WIDTH == 16
#define ___S16 short
#define ___U16 unsigned short
#else
#if ___CHAR_WIDTH == 16
#define ___S16 ___SCHAR
#define ___U16 unsigned char
#else
#if ___LONGLONG_WIDTH == 16
#define ___S16 ___LONGLONG
#define ___U16 unsigned ___LONGLONG
#endif
#endif
#endif
#endif
#endif
#if ___INT_WIDTH == 32
#define ___S32 int
#define ___U32 unsigned int
#else
#if ___LONG_WIDTH == 32
#define ___S32 long
#define ___U32 unsigned long
#else
#if ___SHORT_WIDTH == 32
#define ___S32 short
#define ___U32 unsigned short
#else
#if ___CHAR_WIDTH == 32
#define ___S32 ___SCHAR
#define ___U32 unsigned char
#else
#if ___LONGLONG_WIDTH == 32
#define ___S32 ___LONGLONG
#define ___U32 unsigned ___LONGLONG
#endif
#endif
#endif
#endif
#endif
#if ___INT_WIDTH == 64
#define ___S64 int
#define ___U64 unsigned int
#else
#if ___LONG_WIDTH == 64
#define ___S64 long
#define ___U64 unsigned long
#else
#if ___SHORT_WIDTH == 64
#define ___S64 short
#define ___U64 unsigned short
#else
#if ___CHAR_WIDTH == 64
#define ___S64 ___SCHAR
#define ___U64 unsigned char
#else
#if ___LONGLONG_WIDTH == 64
#define ___S64 ___LONGLONG
#define ___U64 unsigned ___LONGLONG
#endif
#endif
#endif
#endif
#endif
#if ___FLOAT_WIDTH == 32
#define ___F32 float
#else
#if ___DOUBLE_WIDTH == 32
#define ___F32 double
#endif
#endif
#if ___DOUBLE_WIDTH == 64
#define ___F64 double
#else
#if ___FLOAT_WIDTH == 64
#define ___F64 float
#endif
#endif
#ifdef ___S64
#define ___BUILTIN_64BIT_INT_TYPE
#define ___SM64 ___S64
#define ___UM64 ___U64
#endif
#ifdef ___S32
#define ___SM32 ___S32
#define ___UM32 ___U32
#else
#define ___SM32 ___SM64
#define ___UM32 ___UM64
#endif
#ifdef ___S16
#define ___SM16 ___S16
#define ___UM16 ___U16
#else
#define ___SM16 ___SM32
#define ___UM16 ___UM32
#endif
#ifdef ___S8
#define ___SM8 ___S8
#define ___UM8 ___U8
#else
#define ___SM8 ___SM16
#define ___UM8 ___UM16
#endif
/*---------------------------------------------------------------------------*/
/* SANITY CHECKS AND SETTING OF DEFAULT OPTIONS */
/*
* Verify that the byte order endianness is known.
*/
#ifdef ___BIG_ENDIAN
#ifdef ___LITTLE_ENDIAN
#error "Define either ___BIG_ENDIAN or ___LITTLE_ENDIAN"
#endif
#else
#ifndef ___LITTLE_ENDIAN
#error "Define either ___BIG_ENDIAN or ___LITTLE_ENDIAN"
#endif
#endif
/*
* Generate a single host C procedure or multiple C host
* procedures (default) per Scheme module?
*/
#ifdef ___SINGLE_HOST
#ifdef ___MULTIPLE_HOSTS
#error "Define either ___SINGLE_HOST or ___MULTIPLE_HOSTS"
#endif
#else
#ifndef ___MULTIPLE_HOSTS
#define ___MULTIPLE_HOSTS
#endif
#endif
/*
* Compiling for dynamic loading or not (default).
*/
#ifdef ___DYNAMIC
#ifdef ___NONDYNAMIC
#error "Define either ___DYNAMIC or ___NONDYNAMIC"
#endif
#else
#ifndef ___NONDYNAMIC
#define ___NONDYNAMIC
#endif
#endif
/*
* Define symbols appropriate for dynamic loading.
*/
#ifdef ___DYNAMIC
#undef ___PRIMAL
#define ___PRIMAL
#undef ___LIBRARY
#define ___LIBRARY
#undef ___SHARED
#define ___SHARED
#undef ___BIND_LATE
#define ___BIND_LATE
#endif
/*
* Compiling to produce a library or an application with a "main" (default
* unless compiling a flat link file).
*/
#ifdef ___LIBRARY
#ifdef ___APPLICATION
#error "Define either ___LIBRARY or ___APPLICATION"
#endif
#else
#ifndef ___APPLICATION
#ifdef ___FLAT_LINKFILE
#define ___LIBRARY
#else
#define ___APPLICATION
#endif
#endif
#endif
/*
* Compiling to produce a shared-library or not (default).
*/
#ifdef ___DYNAMIC_LIB
#define ___SHARED
#endif
#ifdef ___SHARED
#ifdef ___NONSHARED
#error "Define either ___SHARED or ___NONSHARED"
#endif
#else
#ifndef ___NONSHARED
#define ___NONSHARED
#endif
#endif
/*
* Select binding time for global variables, symbols, and keywords.
* Early binding (default) produces faster code because it directly
* accesses the resource. Late binding does an indirection at run
* time.
*/
#ifdef ___BIND_LATE
#ifdef ___BIND_EARLY
#error "Define either ___BIND_LATE or ___BIND_EARLY"
#endif
#else
#ifndef ___BIND_EARLY
#define ___BIND_EARLY
#endif
#endif
/*
* Range and size of Scheme characters.
*
* ___MAX_CHR must be 0xff, 0xffff or 0x10ffff. The value 0xff is
* appropriate when text is limited to the ISO-8859-1 subset of
* Unicode. The value 0xffff is for when text is limited to the BMP
* (Basic Multilingual Plane) subset of Unicode. The value 0x10ffff
* allows all Unicode characters in text. Note that the number of
* bytes per character in a string depends on ___MAX_CHR as follows:
*
* ___MAX_CHR = 0xff => 1 byte per character
* ___MAX_CHR = 0xffff => 2 bytes per character
* ___MAX_CHR = 0x10ffff => 4 bytes per character
*
* If in doubt just do
*
* #define ___MAX_CHR 0x10ffff
*
*/
#ifndef ___MAX_CHR
#define ___MAX_CHR @CONF_MAX_CHR@
#endif
/*
* Number of registers in the virtual machine. These definitions must
* agree with those in the file "gsc/_t-c-1.scm". All Scheme sources
* must be recompiled if these definitions are changed.
*
* ___NB_GVM_REGS = total number of registers available
* 3 <= ___NB_GVM_REGS <= 25
* ___NB_ARG_REGS = maximum number of arguments passed in registers
* 1 <= ___NB_ARG_REGS <= min( 12, ___NB_GVM_REGS-2 )
*/
#define ___NB_GVM_REGS 5
#define ___NB_ARG_REGS 3
/*
* Determine if label values (a gcc extension to C) should be used.
*/
#ifdef ___USE_LABEL_VALUES
#ifdef ___NOT_USE_LABEL_VALUES
#error "Define either ___USE_LABEL_VALUES or ___NOT_USE_LABEL_VALUES"
#endif
#else
#ifndef ___NOT_USE_LABEL_VALUES
#ifdef __GNUC__
#if __llvm__ && !__clang__ && (__GNUC__*1000+__GNUC_MINOR__)<4005
/* Avoid possible LLVM GCC bug with label values */
#define ___NOT_USE_LABEL_VALUES
#else
#define ___USE_LABEL_VALUES
#endif
#else
#define ___NOT_USE_LABEL_VALUES
#endif
#endif
#endif
/*---------------------------------------------------------------------------*/
/* Dependencies on language (i.e. C++, ANSI-C, and K&R C). */
#ifdef __cplusplus
#define ___P(ansi,kr)ansi
#define ___PVOID ()
#define ___BEGIN_C_LINKAGE extern "C" {
#define ___END_C_LINKAGE }
/*
* Define ___BOOL as "bool" or "int", according to what is supported
* by the compiler (this is determined by the configure script) unless
* it is defined elsewhere.
*/
#ifndef ___BOOL
#define ___BOOL @CONF_BOOL@
#endif
#define ___USE_CPLUSPLUS_NEW_DELETE
#define ___USE_CPLUSPLUS_CLEANUP
#else
#ifdef __STDC__
#define ___P(ansi,kr)ansi
#define ___PVOID (void)
#else
#define ___P(ansi,kr)kr
#define ___PVOID ()
#endif
#define ___BEGIN_C_LINKAGE
#define ___END_C_LINKAGE
#ifndef ___BOOL
#define ___BOOL int
#endif
#undef ___USE_SETJMP
#define ___USE_SETJMP
#endif
#ifdef ___USE_SETJMP
#ifdef ___DONT_HAVE_SETJMP_H
/*
* If the file "setjmp.h" is not available then the symbol
* ___DONT_HAVE_SETJMP_H must be defined (for example on the compiler's
* command line). In this case we assume that setjmp is defined as
* a macro.
*/
#undef ___CAN_IMPORT_SETJMP_DYNAMICALLY
#define ___CAN_IMPORT_SETJMP_DYNAMICALLY
#else
/*
* If the file "setjmp.h" is available then we can use the C
* preprocessor to check if setjmp is a macro (otherwise it has to be
* a function). If it is a macro then we can't get a pointer to it!
*/
#include <setjmp.h>
#ifdef setjmp
#undef ___CAN_IMPORT_SETJMP_DYNAMICALLY
#define ___CAN_IMPORT_SETJMP_DYNAMICALLY
#endif
#endif
#endif
/*---------------------------------------------------------------------------*/
/* Visibility directives. */
#ifndef ___HIDDEN
#define ___HIDDEN static
#endif
#ifndef ___LOCAL
#define ___LOCAL static
#endif
#ifdef _MSC_VER
#define ___USE_DECLSPEC
#endif
#ifdef __WATCOMC__
#define ___USE_DECLSPEC
#endif
#ifdef ___USE_DECLSPEC
#define ___EXPORT_FUNC(type,name)__declspec(dllexport) type name
#define ___EXPORT_DATA(type,name)__declspec(dllexport) type name
#define ___IMPORT_FUNC(type,name)__declspec(dllimport) type name
#define ___IMPORT_DATA(type,name)__declspec(dllimport) type name
#endif
#ifndef ___EXPORT_FUNC
#define ___EXPORT_FUNC(type,name)type name
#endif
#ifndef ___EXPORT_DATA
#define ___EXPORT_DATA(type,name)type name
#endif
#ifndef ___IMPORT_FUNC
#define ___IMPORT_FUNC(type,name)extern type name
#endif
#ifndef ___IMPORT_DATA
#define ___IMPORT_DATA(type,name)extern type name
#endif
#define ___EXP_FUNC(type,name)type name
#define ___EXP_DATA(type,name)type name
#define ___IMP_FUNC(type,name)extern type name
#define ___IMP_DATA(type,name)extern type name
#ifdef ___SHARED
#ifdef ___LIBRARY
#undef ___EXP_FUNC
#define ___EXP_FUNC(type,name)___EXPORT_FUNC(type,name)
#undef ___EXP_DATA
#define ___EXP_DATA(type,name)___EXPORT_DATA(type,name)
#endif
#ifndef ___PRIMAL
#undef ___IMP_FUNC
#define ___IMP_FUNC(type,name)___IMPORT_FUNC(type,name)
#undef ___IMP_DATA
#define ___IMP_DATA(type,name)___IMPORT_DATA(type,name)
#endif
#endif
#ifndef ___OS_WIN32
#define ___CAN_IMPORT_EXPORTED
#endif
#ifndef ___CAN_IMPORT_EXPORTED
#ifdef ___SHARED
#ifndef ___PRIMAL
#undef ___BIND_LATE
#define ___BIND_LATE
#endif
#endif
#endif
/*---------------------------------------------------------------------------*/
#ifdef __GNUC__
#if __GNUC__ >= 3
#define ___USE_builtin_expect
#endif
#endif
#ifdef ___USE_builtin_expect
#define ___EXPECT_TRUE(x) __builtin_expect((x),1)
#define ___EXPECT_FALSE(x) __builtin_expect((x),0)
#else
#define ___EXPECT_TRUE(x) (x)
#define ___EXPECT_FALSE(x) (x)
#endif
/*---------------------------------------------------------------------------*/
/*
* IMPORTANT NOTE
*
* As a general principle, the macros are written in such a way that all
* macros which expand into C expressions yield PRIMARY C expressions.
* Also, macros assume that arguments are PRIMARY expressions. A PRIMARY
* expression is either:
*
* an identifier, or
* a non-negative constant, or
* a parenthesized expression.
*
* This convention avoids many operator priority problems and helps keep
* the number of parentheses down. On the other hand, it is easy to
* introduce errors when modifying these macros so be careful.
*/
/*---------------------------------------------------------------------------*/
/*
* The "___CAST" macro is useful to easily locate type casts in the
* source code. Unfortunately there are still places in the sources
* that don't use this macro.
*/
#define ___CAST(type,val)((type)(val))
/*
* Macros to access ___S64 and ___U64 data types. Note that ___S64
* and ___U64 are either defined as a macro or as a typedef.
*/
#define ___FETCH_S64(base,i)*(___CAST(___S64*,base)+(i))
#define ___STORE_S64(base,i,val)*(___CAST(___S64*,base)+(i)) = (val)
#define ___FETCH_U64(base,i)*(___CAST(___U64*,base)+(i))
#define ___STORE_U64(base,i,val)*(___CAST(___U64*,base)+(i)) = (val)
#define ___CAST_S64(x)___CAST(___S64,x)
#define ___CAST_U64(x)___CAST(___U64,x)
/*
* Macros to access ___S32 and ___U32 data types.
*/
#ifdef ___S32
#define ___FETCH_S32(base,i)*(___CAST(___S32*,base)+(i))
#define ___STORE_S32(base,i,val)*(___CAST(___S32*,base)+(i)) = (val)
#define ___FETCH_U32(base,i)*(___CAST(___U32*,base)+(i))
#define ___STORE_U32(base,i,val)*(___CAST(___U32*,base)+(i)) = (val)
#define ___CAST_S32(x)___CAST(___S32,x)
#define ___CAST_U32(x)___CAST(___U32,x)
#else
#define ___FETCH_S32(base,i)___CAST_S32(___FETCH_U32(base,i))
#define ___STORE_S32(base,i,val)___STORE_U32(base,i,___CAST_U32(val))
#ifdef ___BIG_ENDIAN
#define ___FETCH_U32(base,i)(((i)&1) \
? (*(___CAST(___U64*,base)+((i)>>1))&0xffffffff) \
: ((*(___CAST(___U64*,base)+((i)>>1)))>>32))
#define ___STORE_U32(base,i,val)*(___CAST(___U64*,base)+((i)>>1)) = ((i)&1) \
? (*(___CAST(___U64*,base)+((i)>>1))&___CAST_U64(0xffffffff<<32))|(val) \
: (*(___CAST(___U64*,base)+((i)>>1))&0xffffffff)|___CAST_U64((val)<<32)
#else
#define ___FETCH_U32(base,i)(((i)&1) \
? ((*(___CAST(___U64*,base)+((i)>>1)))>>32) \
: (*(___CAST(___U64*,base)+((i)>>1))&0xffffffff))
#define ___STORE_U32(base,i,val)*(___CAST(___U64*,base)+((i)>>1)) = ((i)&1) \
? (*(___CAST(___U64*,base)+((i)>>1))&0xffffffff)|___CAST_U64((val)<<32) \
: (*(___CAST(___U64*,base)+((i)>>1))&___CAST_U64(0xffffffff<<32))|(val)
#endif
#define ___CAST_S32(x)(___CAST_S64((x)<<32)>>32)
#define ___CAST_U32(x)___CAST_U64((x)&0xffffffff)
#endif
/*
* Macros to access ___S16 and ___U16 data types.
*/
#ifdef ___S16
#define ___FETCH_S16(base,i)*(___CAST(___S16*,base)+(i))
#define ___STORE_S16(base,i,val)*(___CAST(___S16*,base)+(i)) = (val)
#define ___FETCH_U16(base,i)*(___CAST(___U16*,base)+(i))
#define ___STORE_U16(base,i,val)*(___CAST(___U16*,base)+(i)) = (val)
#define ___CAST_S16(x)___CAST(___S16,x)
#define ___CAST_U16(x)___CAST(___U16,x)
#else
#define ___FETCH_S16(base,i)___CAST_S16(___FETCH_U16(base,i))
#define ___STORE_S16(base,i,val)___STORE_U16(base,i,___CAST_U16(val))
#ifdef ___S32
#ifdef ___BIG_ENDIAN
#define ___FETCH_U16(base,i)(((i)&1) \
? (*(___CAST(___U32*,base)+((i)>>1))&0xffff) \
: ((*(___CAST(___U32*,base)+((i)>>1)))>>16))
#define ___STORE_U16(base,i,val)*(___CAST(___U32*,base)+((i)>>1)) = ((i)&1) \
? (*(___CAST(___U32*,base)+((i)>>1))&___CAST_U32(0xffff<<16))|(val) \
: (*(___CAST(___U32*,base)+((i)>>1))&0xffff)|___CAST_U32((val)<<16)
#else
#define ___FETCH_U16(base,i)(((i)&1) \
? ((*(___CAST(___U32*,base)+((i)>>1)))>>16) \
: (*(___CAST(___U32*,base)+((i)>>1))&0xffff))
#define ___STORE_U16(base,i,val)*(___CAST(___U32*,base)+((i)>>1)) = ((i)&1) \
? (*(___CAST(___U32*,base)+((i)>>1))&0xffff)|___CAST_U32((val)<<16) \
: (*(___CAST(___U32*,base)+((i)>>1))&(0xffff<<16))|(___U32)(val)
#endif
#define ___CAST_S16(x)(___CAST_S32((x)<<16)>>16)
#define ___CAST_U16(x)___CAST_U32((x)&0xffff)
#else
#ifdef ___BIG_ENDIAN
#define ___FETCH_S16(base,i)(((i)&1) \
? ((*(___CAST(___S64*,base)+((i)>>1)))>>16) \
: ((*(___CAST(___S64*,base)+((i)>>1))<<16)>>16))
#define ___FETCH_U16(base,i) \
((*(___CAST(___U64*,base)+((i)>>2))>>((~(i)&3)<<4))&0xffff)
#define ___STORE_U16(base,i,val)*(___CAST(___U64*,base)+((i)>>2)) = \
(*(___CAST(___U64*,base)+((i)>>2))&~___CAST_U64(0xffff<<((~(i)&3)<<4))) | \
___CAST_U64((val)<<((~(i)&3)<<4))
#else
#define ___FETCH_U16(base,i) \
((*(___CAST(___U64*,base)+((i)>>2))>>(((i)&3)<<4))&0xffff)
#define ___STORE_U16(base,i,val)*(___CAST(___U64*,base)+((i)>>2)) = \
(*(___CAST(___U64*,base)+((i)>>2))&~___CAST_U64(0xffff<<(((i)&3)<<4))) | \
___CAST_U64((val)<<(((i)&3)<<4))
#endif
#define ___CAST_S16(x)(___CAST_S64((x)<<48)>>48)
#define ___CAST_U16(x)___CAST_U64((x)&0xffff)
#endif
#endif
/*
* Macros to access ___S8 and ___U8 data types.
*/
#ifdef ___S8
#define ___FETCH_S8(base,i)*(___CAST(___S8*,base)+(i))
#define ___FETCH_U8(base,i)*(___CAST(___U8*,base)+(i))
#define ___STORE_S8(base,i,val)*(___CAST(___S8*,base)+(i)) = (val)
#define ___STORE_U8(base,i,val)*(___CAST(___U8*,base)+(i)) = (val)
#define ___CAST_S8(x)(___S8)(x)
#define ___CAST_U8(x)(___U8)(x)
#else
#define ___FETCH_S8(base,i)___CAST_S8(___FETCH_U8(base,i))
#define ___STORE_S8(base,i,val)___STORE_U8(base,i,___CAST_U8(val))
#ifdef ___S32
#ifdef ___BIG_ENDIAN
#define ___FETCH_U8(base,i) \
((*(___CAST(___U32*,base)+((i)>>2))>>((~(i)&3)<<3))&0xff)
#define ___STORE_U8(base,i,val)*(___CAST(___U32*,base)+((i)>>2)) = \
(*(___CAST(___U32*,base)+((i)>>2))&~___CAST_U32(0xff<<((~(i)&3)<<3))) | \
___CAST_U32((val)<<((~(i)&3)<<3))
#else
#define ___FETCH_U8(base,i) \
((*(___CAST(___U32*,base)+((i)>>2))>>(((i)&3)<<3))&0xff)
#define ___STORE_U8(base,i,val)*(___CAST(___U32*,base)+((i)>>2)) = \
(*(___CAST(___U32*,base)+((i)>>2))&~___CAST_U32(0xff<<(((i)&3)<<3))) | \
___CAST_U32((val)<<(((i)&3)<<3))
#endif
#define ___CAST_S8(x)(___CAST_S32((x)<<24)>>24)
#define ___CAST_U8(x)___CAST_U32((x)&0xff)
#else
#ifdef ___BIG_ENDIAN
#define ___FETCH_U8(base,i) \
((*(___CAST(___U64*,base)+((i)>>3))>>((~(i)&7)<<3))&0xff)
#define ___STORE_U8(base,i,val)*(___CAST(___U64*,base)+((i)>>3)) = \
(*(___CAST(___U64*,base)+((i)>>3))&~___CAST_U64(0xff<<((~(i)&7)<<3))) | \
___CAST_U64((val)<<((~(i)&7)<<3))
#else
#define ___FETCH_U8(base,i) \
((*(___CAST(___U64*,base)+((i)>>3))>>(((i)&7)<<3))&0xff)
#define ___STORE_U8(base,i,val)*(___CAST(___U64*,base)+((i)>>3)) = \
(*(___CAST(___U64*,base)+((i)>>3))&~___CAST_U64(0xff<<(((i)&7)<<3))) | \
___CAST_U64((val)<<(((i)&7)<<3))
#endif
#define ___CAST_S8(x)(___CAST_S64((x)<<56)>>56)
#define ___CAST_U8(x)___CAST_U64((x)&0xff)
#endif
#endif
/*---------------------------------------------------------------------------*/
/*
* GENERAL DEFINITIONS
*
* ___WORD an integer type able to contain a pointer with no loss
* ___WORD_WIDTH is equal to the number of bits in the type ___WORD
* ___LOG_WORD_WIDTH is equal to the base 2 logarithm of ___WORD_WIDTH
* ___WS is equal to sizeof (___WORD)
* ___LWS is equal to the base 2 logarithm of ___WS
* ___FLONUM_SIZE is equal to sizeof (___F64) / ___WS
*/
#ifdef ___USE_32_BIT_ADDR
#define ___WORD ___S32
#define ___WORD_WIDTH 32
#define ___LOG_WORD_WIDTH 5
#define ___WS 4
#define ___LWS 2
#define ___FLONUM_SIZE 2
#else
#define ___WORD ___S64
#define ___WORD_WIDTH 64
#define ___LOG_WORD_WIDTH 6
#define ___WS 8
#define ___LWS 3
#define ___FLONUM_SIZE 1
#endif
#define ___SCMOBJ ___WORD
#define ___SCMOBJ_WIDTH ___WORD_WIDTH
#define ___ISO_8859_1 ___UM8
#define ___UTF_8 char
#define ___UTF_16 ___UM16
#define ___UCS_2 ___UM16
#define ___UCS_4 ___UM32
#define ___ISO_8859_1STRING ___ISO_8859_1*
#define ___UTF_8STRING ___UTF_8*
#define ___UTF_16STRING ___UTF_16*
#define ___UCS_2STRING ___UCS_2*
#define ___UCS_4STRING ___UCS_4*
#define ___WCHARSTRING ___WCHAR*
#if ___MAX_CHR <= 0xff
#define ___CS 1
#else
#if ___MAX_CHR <= 0xffff
#define ___CS 2
#else
#define ___CS 4
#endif
#endif
#if ___CS == 1
#define ___CS_SELECT(cs1,cs2,cs4)cs1
#else
#if ___CS == 2
#define ___CS_SELECT(cs1,cs2,cs4)cs2
#else
#define ___CS_SELECT(cs1,cs2,cs4)cs4
#endif
#endif
#define ___LCS ___CS_SELECT(0,1,2)
#define ___C ___CS_SELECT(___U8,___U16,___U32)
#if ___WORD_WIDTH == ___VOIDSTAR_WIDTH
#define ___FAKEWORD ___WORD*
#define ___CAST_FAKEWORD_TO_WORD(x)___CAST(___WORD,x)
#define ___CAST_WORDSTAR_TO_FAKEWORD(x)x
#define ___FAKEHOST ___host
#define ___CAST_HOST_TO_FAKEHOST(x)x
#define ___CAST_FAKEHOST_TO_HOST(x)x
#define ___FAKEVOIDSTAR void*
#define ___CAST_VOIDSTAR_TO_FAKEVOIDSTAR(x)___CAST(___FAKEVOIDSTAR,x)
#define ___CAST_FAKEVOIDSTAR_TO_VOIDSTAR(x)___CAST(void*,x)
#else
#define ___FAKEWORD ___WORD
#define ___CAST_FAKEWORD_TO_WORD(x)x
#define ___CAST_WORDSTAR_TO_FAKEWORD(x)___CAST(___WORD,x)
#define ___FAKEHOST ___WORD
#define ___CAST_HOST_TO_FAKEHOST(x)___CAST(___WORD,x)
#define ___CAST_FAKEHOST_TO_HOST(x)___CAST(___host,x)
#define ___FAKEVOIDSTAR ___WORD
#define ___CAST_VOIDSTAR_TO_FAKEVOIDSTAR(x)___CAST(___WORD,x)
#define ___CAST_FAKEVOIDSTAR_TO_VOIDSTAR(x)___CAST(void*,x)
#endif
/* Padding at end of objects so that they can be aligned to an address */
/* multiple of 4 or 8 by moving them up in memory. */
#ifdef ___USE_32_BIT_ADDR
#define ___PADDING ,0
#define ___PADDING_SIZE 1
#define ___PADDING_LBL ,{0,0,0,0}
#define ___PADDING_64 ,0,0
#else
#define ___PADDING
#define ___PADDING_SIZE 0
#define ___PADDING_LBL
#define ___PADDING_64
#endif
/* Utility macro to select code for SINGLE/MULTIPLE host. */
#ifdef ___SINGLE_HOST
#define ___SM(s,m)s
#else
#define ___SM(s,m)m
#endif
/*---------------------------------------------------------------------------*/
/* OBJECT REPRESENTATION */
/*
* For a complete description of the object representation, read the
* file "lib/mem.c". These definitions must agree with those in the
* files "lib/_gambit#.scm" and "gsc/_t-c-3.scm".
*/
/*
* Type tag assignment.
*
* Type tags are located in the lower 2 bits of a ___SCMOBJ.
*
* ___TB = number of tag bits
* ___tFIXNUM = tag for fixnums (small integers), must be 0
* ___tSPECIAL = tag for other immediates (#f, #t, (), #!eof, chars, ...)
* ___tPAIR = tag for pairs
* ___tSUBTYPED = tag for other memory allocated objects
*/
#define ___TB 2
#define ___tFIXNUM 0
#define ___tSPECIAL 2
#define ___tPAIR 3
#define ___tSUBTYPED 1
#define ___MEM_ALLOCATED(obj)((obj)&1)
#define ___MEM_ALLOCATED_CLEAR(obj)((obj)&~___CAST(___WORD,1))
#define ___MEM_ALLOCATED_SET(obj)((obj)|1)
/*
* Subtype tag assignment.
*
* These tags are stored in the head of memory allocated objects
* (including pairs).
*
* ___SB = number of subtype tag bits
* ___sVECTOR = tag for vectors
* ___sPAIR = tag for pairs
* ___sRATNUM = tag for ratnums
* ___sCPXNUM = tag for cpxnums
* ___sSTRUCTURE = tag for structures
* ___sBOXVALUES = tag for box and multiple-values objects
* ___sMEROON = tag for Meroon objects
* ___sJAZZ = tag for Jazz objects
* ___sSYMBOL = tag for symbols
* ___sKEYWORD = tag for keywords
* ___sFRAME = tag for continuation frames
* ___sCONTINUATION = tag for continuations
* ___sPROMISE = tag for promises
* ___sWEAK = tag for weak objects (wills and GC hash tables)
* ___sPROCEDURE = tag for procedures
* ___sRETURN = tag for returns
* ___sFOREIGN = tag for foreign data
* ___sSTRING = tag for strings
* ___sS8VECTOR = tag for 8-bit signed integer vectors
* ___sU8VECTOR = tag for 8-bit unsigned integer vectors
* ___sS16VECTOR = tag for 16-bit signed integer vectors
* ___sU16VECTOR = tag for 16-bit unsigned integer vectors
* ___sS32VECTOR = tag for 32-bit signed integer vectors
* ___sU32VECTOR = tag for 32-bit unsigned integer vectors
* ___sF32VECTOR = tag for 32-bit floating point number vectors
* ___sS64VECTOR = tag for 64-bit signed integer vectors
* ___sU64VECTOR = tag for 64-bit unsigned integer vectors
* ___sF64VECTOR = tag for 64-bit floating point number vectors
* ___sFLONUM = tag for flonums
* ___sBIGNUM = tag for bignums
*
* The five subtype tags ___sS64VECTOR, ___sU64VECTOR, ___sF64VECTOR,
* ___sFLONUM, ___sBIGNUM must come last. These object types (and
* ___sFOREIGN which is always allocated as a ___STILL object) must
* be aligned on a multiple of 8.
*/
#define ___SB 5
#define ___sVECTOR 0
#define ___sPAIR 1
#define ___sRATNUM 2
#define ___sCPXNUM 3
#define ___sSTRUCTURE 4
#define ___sBOXVALUES 5
#define ___sMEROON 6
#define ___sJAZZ 7
#define ___sSYMBOL 8
#define ___sKEYWORD 9
#define ___sFRAME 10
#define ___sCONTINUATION 11
#define ___sPROMISE 12
#define ___sWEAK 13
#define ___sPROCEDURE 14
#define ___sRETURN 15
#define ___sFOREIGN 18
#define ___sSTRING 19
#define ___sS8VECTOR 20
#define ___sU8VECTOR 21
#define ___sS16VECTOR 22
#define ___sU16VECTOR 23
#define ___sS32VECTOR 24
#define ___sU32VECTOR 25
#define ___sF32VECTOR 26
#define ___sS64VECTOR 27
#define ___sU64VECTOR 28
#define ___sF64VECTOR 29
#define ___sFLONUM 30
#define ___sBIGNUM 31
/*
* Head type tag assignment.
*
* Head type tags are stored in the lower 3 bits of the head of memory
* allocated objects.
*
* ___HTB = number of head tag bits
* ___MOVABLE0 = tag for movable objects in generation 0
* ___MOVABLE1 = tag for movable objects in generation 1
* ___MOVABLE2 = tag for movable objects in generation 2
* ___FORW = tag for movable objects that have been forwarded
* ___STILL = tag for still objects
* ___PERM = tag for permanent objects
*
* note: the tag ___FORW+(1<<___TB) is also used for forwarding pointers
*/
#define ___HTB 3
#define ___MOVABLE0 0
#define ___MOVABLE1 1
#define ___MOVABLE2 2
#define ___FORW 3
#define ___STILL 5
#define ___PERM 6
/*
* Miscellaneous masks.
*/
#define ___LF (___HTB+___SB)
#define ___TMASK ((1<<___TB)-1)
#define ___HTMASK ((1<<___HTB)-1)
#define ___SMASK (((1<<___SB)-1)<<___HTB)
#define ___LMASK (~___CAST(unsigned ___WORD,0)<<___LF)
#define ___LSMASK (~___CAST(unsigned ___WORD,0)<<___HTB)
/*
* Value constructors for object references inside executable code.
*/
#define ___FAL ((___CAST(___WORD,-1)<<___TB)+___tSPECIAL)
#define ___TRU ((___CAST(___WORD,-2)<<___TB)+___tSPECIAL)
#define ___NUL ((___CAST(___WORD,-3)<<___TB)+___tSPECIAL)
#define ___EOF ((___CAST(___WORD,-4)<<___TB)+___tSPECIAL)
#define ___VOID ((___CAST(___WORD,-5)<<___TB)+___tSPECIAL)
#define ___ABSENT ((___CAST(___WORD,-6)<<___TB)+___tSPECIAL)
#define ___UNB1 ((___CAST(___WORD,-7)<<___TB)+___tSPECIAL)
#define ___UNB2 ((___CAST(___WORD,-8)<<___TB)+___tSPECIAL)
#define ___OPTIONAL ((___CAST(___WORD,-9)<<___TB)+___tSPECIAL)
#define ___KEY_OBJ ((___CAST(___WORD,-10)<<___TB)+___tSPECIAL)
#define ___REST ((___CAST(___WORD,-11)<<___TB)+___tSPECIAL)
#define ___UNUSED ((___CAST(___WORD,-14)<<___TB)+___tSPECIAL)
#define ___DELETED ((___CAST(___WORD,-15)<<___TB)+___tSPECIAL)
#define ___FIX(x)(___CAST(___WORD,x)<<___TB)
#if ___SCMOBJ_WIDTH == 32
#define ___BIGFIX(i,x)___SUB(i)
#else
#define ___BIGFIX(i,x)___FIX(x)
#endif
#define ___CHR(x)((___CAST(___WORD,___CS_SELECT(___CAST_U8(x),___CAST_U16(x),___CAST_U32(x)))<<___TB)+___tSPECIAL)
#define ___SYM(i,id)___CAST_FAKEWORD_TO_WORD(___sym_tbl[i])
#define ___KEY(i,id)___CAST_FAKEWORD_TO_WORD(___key_tbl[i])
#define ___CNS(i)___TAG((___ALIGNUP(___cns_tbl,___WS)+i*(___PAIR_SIZE+1)),___tPAIR)
#define ___SUB(i)___CAST_FAKEWORD_TO_WORD(___sub_tbl[i])
/*
* Value constructors for object references inside constant
* memory allocated objects.
*/
#define ___REF_FAL ___FAL
#define ___REF_TRU ___TRU
#define ___REF_NUL ___NUL
#define ___REF_EOF ___EOF
#define ___REF_VOID ___VOID
#define ___REF_ABSENT ___ABSENT
#define ___REF_UNB1 ___UNB1
#define ___REF_UNB2 ___UNB2
#define ___REF_OPTIONAL ___OPTIONAL
#define ___REF_KEY_OBJ ___KEY_OBJ
#define ___REF_REST ___REST
#define ___REF_UNUSED ___UNUSED
#define ___REF_DELETED ___DELETED
#define ___REF_FIX(x)___FIX(x)
#if ___SCMOBJ_WIDTH == 32
#define ___REF_BIGFIX(i,x)___REF_SUB(i)
#else
#define ___REF_BIGFIX(i,x)___REF_FIX(x)
#endif
#define ___REF_CHR(x)___CHR(x)
#define ___REF_SYM(i,id)((___CAST(___WORD,-1-i)<<___TB)+___tPAIR)
#define ___REF_KEY(i,id)((___CAST(___WORD,-1-i)<<___TB)+___tSUBTYPED)
#define ___REF_CNS(i)((___CAST(___WORD,i)<<___TB)+___tPAIR)
#define ___REF_SUB(i)((___CAST(___WORD,i)<<___TB)+___tSUBTYPED)
/*---------------------------------------------------------------------------*/
/* Miscellaneous macros */
#define ___IF(x) if (x) {
#define ___END_IF }
#define ___NOTHING
#define ___NBELEMS(table) (sizeof (table) / sizeof ((table)[0]))
#define ___INT(x)((x)>>___TB)
#define ___FIX_WIDTH (___SCMOBJ_WIDTH-___TB)
#define ___MIN_FIX (-(___CAST(___WORD,1)<<(___FIX_WIDTH-1)))
#define ___MAX_FIX ((___CAST(___WORD,1)<<(___FIX_WIDTH-1))-1)
#define ___MAX_FIX32 ((___CAST(___WORD,1)<<(32-___TB-1))-1)
/*
* Module prefix and C id prefix must match the definitions
* in the file "gsc/_parms.scm".
*/
#define ___MODULE_PREFIX " "
#define ___C_ID_PREFIX "___"
/*---------------------------------------------------------------------------*/
#define ___ALIGNUP(x,mult) \
___CAST(___WORD*,(___CAST(___WORD,x)+((mult)-1))&~((mult)-1))
#define ___ALLOC(n) ___hp += (n)
#if ___SCMOBJ_WIDTH == 32
#define ___ALLOC_ALIGN64(n) \
___hp = ___CAST(___WORD*, (___CAST(___WORD,___hp) + (((n)<<___LWS) + 7)) & ~7)
#else
#define ___ALLOC_ALIGN64(n) ___ALLOC(n)
#endif
/* Type tests */
#define ___TAG(ptr,tag)(___CAST(___WORD,ptr)+(tag))
#define ___UNTAG(obj)___CAST(___WORD*,(obj)&-(1<<___TB))
#define ___UNTAG_AS(obj,tag)___CAST(___WORD*,(obj)-(tag))
#define ___TYP(x)((x)&___TMASK)
#define ___TESTTYPE(x,typ)(___TYP(x)==(typ))
#define ___TESTHEADERTAG(x,s)(((x)&___SMASK)==((s)<<___HTB))
#define ___TESTSUBTYPETAG(x,s)___TESTHEADERTAG(___HEADER(x),s)
#define ___TESTSUBTYPE(x,s)(___TYP((___temp=(x)))==___tSUBTYPED&&___TESTSUBTYPETAG(___temp,(s)))
#define ___TESTLENGTHSUBTYPETAG(x,bytes,s)((___HEADER(x)&___LSMASK)==___MAKE_HD(bytes,s,0))
#define ___TESTLENGTHSUBTYPE(x,bytes,s)(___TYP((___temp=(x)))==___tSUBTYPED&&___TESTLENGTHSUBTYPETAG(___temp,bytes,s))
#define ___HEADER(x)(*___UNTAG_AS(x,___tSUBTYPED))
#define ___BODY_OFS 1
#ifdef ___USE_HANDLES
#define ___PAIR_OVERHEAD 2
#define ___SUBTYPED_OVERHEAD 2
#define ___BODY(obj)___CAST(___WORD*,*(___UNTAG(obj)+___BODY_OFS)+___BODY_OFS)
#define ___BODY_AS(obj,tag)___CAST(___WORD*,*(___UNTAG_AS(obj,tag)+___BODY_OFS)+___BODY_OFS)
#else
#define ___PAIR_OVERHEAD 1
#define ___SUBTYPED_OVERHEAD 1
#define ___BODY(obj)(___UNTAG(obj)+___BODY_OFS)
#define ___BODY_AS(obj,tag)(___UNTAG_AS(obj,tag)+___BODY_OFS)
#endif
#define ___MAKE_HD(bytes,subtype,tag)(((bytes)<<___LF)+((subtype)<<___HTB)+(tag))
#define ___HD_TYP(head)((head)&___HTMASK)
#define ___HD_BYTES(head)(___CAST(unsigned ___WORD,head)>>___LF)
#define ___HD_WORDS(head)(((___CAST(unsigned ___WORD,head)+((___WS-1)<<___LF)))>>(___LF+___LWS))
#define ___HD_FIELDS(head)(___CAST(unsigned ___WORD,head)>>(___LF+___LWS))
#define ___HD_SUBTYPE(head)((head)>>___HTB&((1<<___SB)-1))
#define ___FIELD(obj,i)(*(___BODY_AS(obj,___tSUBTYPED)+i))
#define ___WORDS(bytes)(((bytes)+___WS-1)>>___LWS)
#define ___MAKE_HD_BYTES(bytes,subtype)___MAKE_HD(bytes,subtype,___MOVABLE0)
#define ___MAKE_HD_WORDS(words,subtype)___MAKE_HD(((words)<<___LWS),subtype,___MOVABLE0)
#define ___SYMBOL_SIZE 4
#define ___KEYWORD_SIZE 3
#define ___WILL_SIZE 3
#define ___TABLE_SIZE 5
#define ___PROMISE_SIZE 2
#define ___RATNUM_SIZE 2
#define ___CPXNUM_SIZE 2
#define ___CONTINUATION_SIZE 2
#define ___THREAD_SIZE 26
#define ___BOX_SIZE 1
#define ___FOREIGN_SIZE 3
#define ___FOREIGN_TAGS 0
#define ___FOREIGN_RELEASE_FN 1
#define ___FOREIGN_PTR 2
/* Flonum boxing and unboxing */
#define ___FLONUM_VAL(obj) *___CAST(___F64*,___BODY_AS(obj,___tSUBTYPED))
#define ___F64UNBOX(x) ___FLONUM_VAL(x)
#define ___F64BOX(x) \
(___ALLOC_ALIGN64(1+___FLONUM_SIZE), \
___hp[-(1+___FLONUM_SIZE)] = ___MAKE_HD_WORDS(___FLONUM_SIZE,___sFLONUM), \
*___CAST(___F64*,___hp-___FLONUM_SIZE) = (x), \
___TAG((___hp-(1+___FLONUM_SIZE)),___tSUBTYPED))
#define ___D_F64(x)___F64 x;
#define ___SET_F64(x,y)x=y;
/* Bignum representation */
#define ___BIG_FBASE_WIDTH 8
#if ___SCMOBJ_WIDTH == 32
#define ___BIG_MBASE_WIDTH 16
#else
#define ___BIG_MBASE_WIDTH 32
#endif
#ifndef ___BUILTIN_64BIT_INT_TYPE
#define ___BIG_ABASE_WIDTH 32
#else
#define ___BIG_ABASE_WIDTH 64
#endif
#if ___BIG_ABASE_WIDTH == 32
#define ___BIGAFETCH(base,i) ___FETCH_U32(base,i)
#define ___BIGAFETCHSIGNED(base,i) ___FETCH_S32(base,i)
#define ___BIGASTORE(base,i,val) ___STORE_U32(base,i,val)
#define ___BIGASTORESIGNED(base,i,val) ___STORE_S32(base,i,val)
#define ___BIGALENGTH(vect) ___U32VECTORLENGTH(vect)
#define ___BIGADIGIT ___U32
#define ___BIGADIGITSIGNED ___S32
#define ___BIGASHRINK(x,y) ___U32VECTORSHRINK(x,y)
#define ___BIGATEMP ___u32_temp
#else
#define ___BIGAFETCH(base,i) ___FETCH_U64(base,i)
#define ___BIGAFETCHSIGNED(base,i) ___FETCH_S64(base,i)
#define ___BIGASTORE(base,i,val) ___STORE_U64(base,i,val)
#define ___BIGASTORESIGNED(base,i,val) ___STORE_S64(base,i,val)
#define ___BIGALENGTH(vect) ___U64VECTORLENGTH(vect)
#define ___BIGADIGIT ___U64
#define ___BIGADIGITSIGNED ___S64
#define ___BIGASHRINK(x,y) ___U64VECTORSHRINK(x,y)
#define ___BIGATEMP ___u64_temp
#endif
#define ___BIG_ABASE_MIN_1 (~___CAST(___BIGADIGIT,0))
#if ___BIG_ABASE_WIDTH == 32
#define ___S32UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___INT(___temp) \
: ___BIGAFETCHSIGNED(___BODY_AS(___temp,___tSUBTYPED),0))
#define ___U32UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___CAST_U32(___INT(___temp)) \
: ___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0))
#define ___S64UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___S64_from_SM32(___INT(___temp)) \
: (___HD_BYTES(___HEADER(___temp)) == (1<<2) \
? ___S64_from_SM32(___BIGAFETCHSIGNED(___BODY_AS(___temp,___tSUBTYPED),0)) \
: ___S64_from_SM32_UM32(___BIGAFETCHSIGNED(___BODY_AS(___temp,___tSUBTYPED),1),___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0))))
#define ___U64UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___U64_from_UM32(___CAST_U32(___INT(___temp))) \
: (___HD_BYTES(___HEADER(___temp)) == (1<<2) \
? ___U64_from_UM32(___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0)) \
: ___U64_from_UM32_UM32(___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),1),___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0))))
#if ___SCMOBJ_WIDTH == 32
#define ___S32BOX(x) \
(___s32_temp=(x), \
(___s32_temp >= ___MIN_FIX && ___s32_temp <= ___MAX_FIX \
? ___FIX(___s32_temp) \
: (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORESIGNED(___hp,-1,___s32_temp), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED))))
#define ___U32BOX(x) \
(___u32_temp=(x), \
(___u32_temp <= ___CAST_U32(___MAX_FIX) \
? ___FIX(___u32_temp) \
: (___CAST_S32(___u32_temp) < 0 \
? (___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___u32_temp), \
___BIGASTORE(___hp,-1,0), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED)) \
: (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORE(___hp,-1,___u32_temp), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED)))))
#define ___S64BOX(x) \
(___s64_temp=(x), \
(((___s32_temp = ___CAST_S32(___S64_lo32(___s64_temp)))>>31) \
== ___S64_hi32(___s64_temp) \
? (___s32_temp >= ___MIN_FIX && ___s32_temp <= ___MAX_FIX \
? ___FIX(___s32_temp) \
: (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORE(___hp,-1,___s32_temp), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED))) \
: (___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___s32_temp), \
___BIGASTORESIGNED(___hp,-1,___S64_hi32(___s64_temp)), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED))))
#define ___U64BOX(x) \
(___u64_temp=(x), \
(___CAST_S32(___U64_hi32(___u64_temp)) < 0 \
? (___ALLOC(1+___WORDS(3<<2)), \
___hp[-(1+___WORDS(3<<2))] = ___MAKE_HD_BYTES(3<<2,___sBIGNUM), \
___BIGASTORE(___hp,-3,___U64_lo32(___u64_temp)), \
___BIGASTORE(___hp,-2,___U64_hi32(___u64_temp)), \
___BIGASTORE(___hp,-1,0), \
___TAG((___hp-(1+___WORDS(3<<2))),___tSUBTYPED)) \
: (((___u32_temp = ___U64_lo32(___u64_temp)) & (___CAST_U32(1)<<31)) \
== ___U64_hi32(___u64_temp) \
? (___u32_temp <= ___MAX_FIX \
? ___FIX(___u32_temp) \
: (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORE(___hp,-1,___u32_temp), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED))) \
: (___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___u32_temp), \
___BIGASTORESIGNED(___hp,-1,___S64_hi32(___u64_temp)), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED)))))
#else
#define ___S32BOX(x) ___FIX(___CAST_S64(x))
#define ___U32BOX(x) ___FIX(___CAST_U64(x))
#define ___S64BOX(x) \
(___s64_temp=(x), \
(___s64_temp >= ___MIN_FIX && ___s64_temp <= ___MAX_FIX \
? ___FIX(___s64_temp) \
: ((___CAST_S32(___S64_lo32(___s64_temp))>>31) == ___S64_hi32(___s64_temp) \
? (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORE(___hp,-1,___S64_lo32(___s64_temp)), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED)) \
: (___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___S64_lo32(___s64_temp)), \
___BIGASTORESIGNED(___hp,-1,___S64_hi32(___s64_temp)), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED)))))
#define ___U64BOX(x) \
(___u64_temp=(x), \
(___u64_temp <= ___CAST_U64(___MAX_FIX) \
? ___FIX(___u64_temp) \
: (___CAST_S64(___u64_temp) < 0 \
? (___ALLOC(1+___WORDS(3<<2)), \
___hp[-(1+___WORDS(3<<2))] = ___MAKE_HD_BYTES(3<<2,___sBIGNUM), \
___BIGASTORE(___hp,-3,___U64_lo32(___u64_temp)), \
___BIGASTORE(___hp,-2,___U64_hi32(___u64_temp)), \
___BIGASTORE(___hp,-1,0), \
___TAG((___hp-(1+___WORDS(3<<2))),___tSUBTYPED)) \
: ((___U64_lo32(___u64_temp) & (___CAST_U32(1)<<31)) == ___U64_hi32(___u64_temp) \
? (___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORE(___hp,-1,___S64_lo32(___u64_temp)), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED)) \
: (___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___S64_lo32(___u64_temp)), \
___BIGASTORESIGNED(___hp,-1,___S64_hi32(___u64_temp)), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED))))))
#endif
#else
#define ___S32UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___INT(___temp) \
: ___CAST_S32(___U64_lo32(___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0))))
#define ___U32UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___CAST_U32(___INT(___temp)) \
: ___U64_lo32(___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0)))
#define ___S64UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___INT(___temp) \
: ___BIGAFETCHSIGNED(___BODY_AS(___temp,___tSUBTYPED),0))
#define ___U64UNBOX(x) \
(___TYP((___temp=x)) == ___tFIXNUM \
? ___CAST_U64(___INT(___temp)) \
: ___BIGAFETCH(___BODY_AS(___temp,___tSUBTYPED),0))
#if ___SCMOBJ_WIDTH == 32
#define ___S32BOX(x) \
(___s32_temp=(x), \
(___s32_temp >= ___MIN_FIX && ___s32_temp <= ___MAX_FIX \
? ___FIX(___s32_temp) \
: (___ALLOC_ALIGN64(1+___WORDS(1<<3)), \
___hp[-(1+___WORDS(1<<3))] = ___MAKE_HD_BYTES(1<<3,___sBIGNUM), \
___BIGASTORESIGNED(___hp,-1,___S64_from_SM32(___s32_temp)), \
___TAG((___hp-(1+___WORDS(1<<3))),___tSUBTYPED))))
#define ___U32BOX(x) \
(___u32_temp=(x), \
(___u32_temp <= ___CAST_U32(___MAX_FIX) \
? ___FIX(___u32_temp) \
: (___ALLOC_ALIGN64(1+___WORDS(1<<3)), \
___hp[-(1+___WORDS(1<<3))] = ___MAKE_HD_BYTES(1<<3,___sBIGNUM), \
___BIGASTORE(___hp,-1,___U64_from_UM32(___u32_temp)), \
___TAG((___hp-(1+___WORDS(1<<3))),___tSUBTYPED))))
#else
#define ___S32BOX(x) ___FIX(___CAST_S64(x))
#define ___U32BOX(x) ___FIX(___CAST_U64(x))
#endif
#define ___S64BOX(x) \
(___s64_temp=(x), \
(___s64_temp >= ___MIN_FIX && ___s64_temp <= ___MAX_FIX \
? ___FIX(___s64_temp) \
: (___ALLOC_ALIGN64(1+___WORDS(1<<3)), \
___hp[-(1+___WORDS(1<<3))] = ___MAKE_HD_BYTES(1<<3,___sBIGNUM), \
___BIGASTORESIGNED(___hp,-1,___s64_temp), \
___TAG((___hp-(1+___WORDS(1<<3))),___tSUBTYPED))))
#define ___U64BOX(x) \
(___u64_temp=(x), \
(___u64_temp <= ___CAST_U64(___MAX_FIX) \
? ___FIX(___u64_temp) \
: (___CAST_S64(___u64_temp) < 0 \
? (___ALLOC_ALIGN64(1+___WORDS(2<<3)), \
___hp[-(1+___WORDS(2<<3))] = ___MAKE_HD_BYTES(2<<3,___sBIGNUM), \
___BIGASTORE(___hp,-2,___u64_temp), \
___BIGASTORE(___hp,-1,0), \
___TAG((___hp-(1+___WORDS(2<<3))),___tSUBTYPED)) \
: (___ALLOC_ALIGN64(1+___WORDS(1<<3)), \
___hp[-(1+___WORDS(1<<3))] = ___MAKE_HD_BYTES(1<<3,___sBIGNUM), \
___BIGASTORE(___hp,-1,___u64_temp), \
___TAG((___hp-(1+___WORDS(1<<3))),___tSUBTYPED)))))
#endif
#if ___BIG_ABASE_WIDTH == 32
#if ___SCMOBJ_WIDTH == 32
#define ___BIGFROMFIX(x) \
(___ALLOC(1+___WORDS(1<<2)), \
___hp[-(1+___WORDS(1<<2))] = ___MAKE_HD_BYTES(1<<2,___sBIGNUM), \
___BIGASTORESIGNED(___hp,-1,___INT(x)), \
___TAG((___hp-(1+___WORDS(1<<2))),___tSUBTYPED))
#else
#define ___BIGFROMFIX(x) \
(___ALLOC(1+___WORDS(2<<2)), \
___hp[-(1+___WORDS(2<<2))] = ___MAKE_HD_BYTES(2<<2,___sBIGNUM), \
___BIGASTORE(___hp,-2,___S64_lo32(___INT(x))), \
___BIGASTORESIGNED(___hp,-1,___S64_hi32(___INT(x))), \
___TAG((___hp-(1+___WORDS(2<<2))),___tSUBTYPED))
#endif
#else
#define ___BIGFROMFIX(x) \
(___ALLOC_ALIGN64(1+___WORDS(1<<3)), \
___hp[-(1+___WORDS(1<<3))] = ___MAKE_HD_BYTES(1<<3,___sBIGNUM), \
___BIGASTORESIGNED(___hp,-1,___CAST(___BIGADIGIT,___INT(x))), \
___TAG((___hp-(1+___WORDS(1<<3))),___tSUBTYPED))
#endif
#define ___BIGALESSP(x,y,i) \
(___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) \
< (___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(i)>>___TB)))
#define ___BIGAEQP(x,y,i) \
(___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) \
== (___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(i)>>___TB)))
#define ___BIGAONESP(x,i) \
(___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) == ___BIG_ABASE_MIN_1)
#define ___BIGAZEROP(x,i) \
(___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) == 0)
#define ___BIGANEGATIVEP(x,i) \
(___BIGAFETCHSIGNED(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) < 0)
#define ___BIGTOFIX(x) \
(___BIGATEMP=___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),0), \
(___BIGATEMP == ___CAST(___BIGADIGIT,___INT(___FIX(___BIGATEMP))) ? ___FIX(___BIGATEMP) : ___FAL))
#define ___BIGACAT(x,i,hi,j,lo,k,divider) \
___BIGATEMP=((___BIGADIGIT)___BIGAFETCH(___BODY_AS(hi,___tSUBTYPED),(j)>>___TB) << ___INT(divider)) | \
((___BIGADIGIT)___BIGAFETCH(___BODY_AS(lo,___tSUBTYPED),(k)>>___TB) >> (___BIG_ABASE_WIDTH - ___INT(divider))); \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP);
#define ___BIGAAND(x,i,y,j) \
___BIGATEMP= ___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) & ___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(j)>>___TB); \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP);
#define ___BIGAIOR(x,i,y,j) \
___BIGATEMP= ___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) | ___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(j)>>___TB); \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP);
#define ___BIGAXOR(x,i,y,j) \
___BIGATEMP= ___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB) ^ ___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(j)>>___TB); \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP);
#define ___BIGANOT(x,i) \
___BIGATEMP= ~___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB); \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP);
#define ___BIGNEGATIVEP(x) \
(___BIGAFETCHSIGNED(___BODY_AS(x,___tSUBTYPED),___FIXSUB(___BIGALENGTH(x),___FIX_1)>>___TB) < 0)
#define ___BIGACOPY(result,i,y,j) \
___BIGASTORE(___BODY_AS(result,___tSUBTYPED),(i)>>___TB, \
___BIGAFETCH(___BODY_AS(y,___tSUBTYPED),(j)>>___TB));
#define ___BIGAINC(x,i) \
(___BIGATEMP = (___BIGADIGIT)___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB)+(___BIGADIGIT) 1, \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP), \
(___BIGATEMP == 0 ? ___FIX_1 : ___FIX_0))
#define ___BIGADEC(x,i) \
(___BIGATEMP = (___BIGADIGIT)___BIGAFETCH(___BODY_AS(x,___tSUBTYPED),(i)>>___TB)-(___BIGADIGIT) 1, \
___BIGASTORE(___BODY_AS(x,___tSUBTYPED),(i)>>___TB,(___BIGADIGIT)___BIGATEMP), \
(___BIGATEMP == ___BIG_ABASE_MIN_1 ? ___FIX_1 : ___FIX_0))
#define ___BIGAADD(result,i,y,j,carry) \
(carry ? (___BIGATEMP=(___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i))+ \
(___BIGADIGIT)___BIGAFETCH(___BODY_AS( y,___tSUBTYPED),___INT(j))+ \
(___BIGADIGIT) 1, \
((___BIGADIGIT) ___BIGATEMP <= (___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i)) \
? \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_1) \
: \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_0))) \
: \
(___BIGATEMP=(___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i))+ \
(___BIGADIGIT)___BIGAFETCH(___BODY_AS( y,___tSUBTYPED),___INT(j)), \
((___BIGADIGIT) ___BIGATEMP < (___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i)) \
? \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_1) \
: \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_0))))
#define ___BIGASUB(result,i,y,j,borrow) \
(borrow ? (___BIGATEMP=(___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i))- \
(___BIGADIGIT)___BIGAFETCH(___BODY_AS( y,___tSUBTYPED),___INT(j))- \
(___BIGADIGIT) 1, \
((___BIGADIGIT) ___BIGATEMP >= (___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i)) \
? \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_1) \
: \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_0))) \
: \
(___BIGATEMP=(___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i))- \
(___BIGADIGIT)___BIGAFETCH(___BODY_AS( y,___tSUBTYPED),___INT(j)), \
((___BIGADIGIT) ___BIGATEMP > (___BIGADIGIT)___BIGAFETCH(___BODY_AS(result,___tSUBTYPED),___INT(i)) \
? \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_1) \
: \
(___BIGASTORE(___BODY_AS(result,___tSUBTYPED),___INT(i),(___BIGADIGIT)___BIGATEMP), ___FIX_0))))
#if ___BIG_MBASE_WIDTH == 16
#ifdef ___BIG_ENDIAN
#if ___BIG_ABASE_WIDTH == 64
#define ___BIG_END_MFLIP(x)((x)^___FIX(3))
#else
#define ___BIG_END_MFLIP(x)((x)^___FIX(1))
#endif
#else
#define ___BIG_END_MFLIP(x)(x)
#endif
#define ___BIGMLENGTH(v) ___U16VECTORLENGTH(v)
#define ___BIGMFETCH(base,i) ___FETCH_U16(base,i)
#define ___BIGMSTORE(base,i,val) ___STORE_U16(base,i,val)
#define ___BIGMDIGIT ___U16
#define ___BIGMDOUBLEDIGIT ___U32
#else
#ifdef ___BIG_ENDIAN
#define ___BIG_END_MFLIP(x)((x)^___FIX(1))
#else
#define ___BIG_END_MFLIP(x)(x)
#endif
#define ___BIGMLENGTH(v) ___U32VECTORLENGTH(v)
#define ___BIGMFETCH(base,i) ___FETCH_U32(base,i)
#define ___BIGMSTORE(base,i,val) ___STORE_U32(base,i,val)
#define ___BIGMDIGIT ___U32
#define ___BIGMDOUBLEDIGIT ___U64
#endif
#define ___BIG_MBASE ((___BIGMDOUBLEDIGIT)1 << ___BIG_MBASE_WIDTH)
#define ___BIGMREF(x,j) \
___FIX(___BIGMFETCH(___BODY_AS(x,___tSUBTYPED),___BIG_END_MFLIP(j)>>___TB))
#define ___BIGMSET(result,i,carry) \
___BIGMSTORE(___BODY_AS(result,___tSUBTYPED),___BIG_END_MFLIP(i)>>___TB,___INT(carry));
#define ___BIGMMUL(result,i,y,j,multiplier,carry) \
(___temp=(___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(result,___tSUBTYPED),___INT(___BIG_END_MFLIP(i))) \
+ (___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(y,___tSUBTYPED),___INT(___BIG_END_MFLIP(j))) \
* (___BIGMDOUBLEDIGIT)___INT(multiplier) \
+ (___BIGMDOUBLEDIGIT)___INT(carry), \
___BIGMSTORE(___BODY_AS(result,___tSUBTYPED),___INT(___BIG_END_MFLIP(i)),(___BIGMDIGIT)___temp), \
___FIX((___BIGMDOUBLEDIGIT)___temp >> ___BIG_MBASE_WIDTH))
#define ___BIGMDIV(u,i,v,k,q,borrow) \
(___temp = (___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(i))) \
-(___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(v,___tSUBTYPED),___INT(___BIG_END_MFLIP(k))) \
* (___BIGMDOUBLEDIGIT)___INT(q) \
+ (___BIGMDOUBLEDIGIT)___INT(borrow),\
___BIGMSTORE(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(i)),((___BIGMDIGIT) ___temp)), \
___temp >>= ___BIG_MBASE_WIDTH, \
(___temp > 0 ? ___FIX(___temp - ___BIG_MBASE) : ___FIX(___temp)))
#define ___BIGMQUO(u,j,v) \
___FIX((((___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(j))) << ___BIG_MBASE_WIDTH) \
+___BIGMFETCH(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(j-___FIX(1)))))/___INT(v))
#define ___BIGMREM(u,j,v,q) \
___FIX((((___BIGMDOUBLEDIGIT)___BIGMFETCH(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(j))) << ___BIG_MBASE_WIDTH) \
+___BIGMFETCH(___BODY_AS(u,___tSUBTYPED),___INT(___BIG_END_MFLIP(j-___FIX(1))))) \
-((___BIGMDOUBLEDIGIT)___INT(v)*(___BIGMDOUBLEDIGIT)___INT(q)))
#define ___BIGMTESTP(q,v,r,u) \
(((___BIGMDOUBLEDIGIT)___INT(v)*___INT(q))>((___BIGMDOUBLEDIGIT)___INT(r) << ___BIG_MBASE_WIDTH) +___INT(u))
#ifdef ___BIG_ENDIAN
#if ___BIG_ABASE_WIDTH == 64
#define ___BIG_END_FFLIP(x)((x)^___FIX(7))
#else
#define ___BIG_END_FFLIP(x)((x)^___FIX(3))
#endif
#else
#define ___BIG_END_FFLIP(x)(x)
#endif
#define ___BIGFREF(x,j)___U8VECTORREF(x,___BIG_END_FFLIP(j))
#define ___BIGFSET(result,i,carry)___U8VECTORSET(result,___BIG_END_FFLIP(i),carry)
#define ___BIGFLENGTH(x)___U8VECTORLENGTH(x)
/*---------------------------------------------------------------------------*/
/* Inlinable operations (for 'apply' and 'ifjump' GVM instructions) */
/* APPLY-able operations */
#define ___TYPE(x)___FIX(___TYP(x))
#define ___TYPECAST(x,y)(((x)&~___TMASK)+___INT(y))
#define ___SUBTYPE(x)((*___UNTAG(x)&___SMASK)>>(___HTB-___TB))
#define ___SUBTYPESET(x,y)___temp=(x);___HEADER(___temp)=(___HEADER(___temp)&~___SMASK)+((y)<<(___HTB-___TB));
/* IFJUMP-able operations */
#define ___FALSEP(x)((x)==___FAL)
#define ___BOOLEANP(x)(((x)==___FAL)||((x)==___TRU))
#define ___NULLP(x)((x)==___NUL)
#define ___UNBOUNDP(x)(((___temp=(x))==___UNB1)||(___temp==___UNB2))
#define ___EQP(x,y)((x)==(y))
#define ___EOFP(x)((x)==___EOF)
/* IFJUMP-able operations */
#define ___FIXNUMP(x)___TESTTYPE(x,___tFIXNUM)
#define ___FLONUMP(x)___TESTSUBTYPE(x,___sFLONUM)
#define ___SPECIALP(x)___TESTTYPE(x,___tSPECIAL)
#define ___PAIRP(x)___TESTTYPE(x,___tPAIR)
#define ___PAIRMUTABLEP(obj)(___HD_TYP(*___UNTAG_AS(obj,___tPAIR))!=___PERM)
#define ___SUBTYPEDP(x)___TESTTYPE(x,___tSUBTYPED)
#define ___SUBTYPEDMUTABLEP(obj)(___HD_TYP(*___UNTAG_AS(obj,___tSUBTYPED))!=___PERM)
#define ___SUBTYPEDVECTORP(x)___TESTSUBTYPETAG(x,___sVECTOR)
#define ___SUBTYPEDSYMBOLP(x)___TESTSUBTYPETAG(x,___sSYMBOL)
#define ___SUBTYPEDFLONUMP(x)___TESTSUBTYPETAG(x,___sFLONUM)
#define ___SUBTYPEDBIGNUMP(x)___TESTSUBTYPETAG(x,___sBIGNUM)
#define ___VECTORP(x)___TESTSUBTYPE(x,___sVECTOR)
#define ___RATNUMP(x)___TESTSUBTYPE(x,___sRATNUM)
#define ___CPXNUMP(x)___TESTSUBTYPE(x,___sCPXNUM)
#define ___STRUCTUREP(x)___TESTSUBTYPE(x,___sSTRUCTURE)
#define ___BOXP(x)(___TYP((___temp=x))==___tSUBTYPED&&(___HEADER(___temp)&___LSMASK)==___MAKE_HD((___BOX_SIZE<<___LWS),___sBOXVALUES,0))
#define ___VALUESP(x)(___TYP((___temp=x))==___tSUBTYPED&&___TESTSUBTYPETAG(___temp,___sBOXVALUES)&&(___HEADER(___temp)&___LSMASK)!=___MAKE_HD((___BOX_SIZE<<___LWS),___sBOXVALUES,0))
#define ___MEROONP(x)___TESTSUBTYPE(x,___sMEROON)
#define ___JAZZP(x)___TESTSUBTYPE(x,___sJAZZ)
#define ___SYMBOLP(x)___TESTSUBTYPE(x,___sSYMBOL)
#define ___KEYWORDP(x)___TESTSUBTYPE(x,___sKEYWORD)
#define ___SYMKEYP(x)(___SYMBOLP(x)||___KEYWORDP(x))
#define ___FRAMEP(x)___TESTSUBTYPE(x,___sFRAME)
#define ___CONTINUATIONP(x)___TESTSUBTYPE(x,___sCONTINUATION)
#define ___PROMISEP(x)___TESTSUBTYPE(x,___sPROMISE)
#define ___WILLP(x)___TESTLENGTHSUBTYPE(x,(___WILL_SIZE<<___LWS),___sWEAK)
#define ___GCHASHTABLEP(x)(___TYP((___temp=(x)))==___tSUBTYPED&&___TESTHEADERTAG((___temp=___HEADER(___temp)),___sWEAK)&&(___temp&___LSMASK)!=___MAKE_HD((___WILL_SIZE<<___LWS),___sWEAK,0))
#define ___MEMALLOCATEDP(x)___MEM_ALLOCATED(x)
#define ___PROCEDUREP(x)___TESTSUBTYPE(x,___sPROCEDURE)
#define ___RETURNP(x)___TESTSUBTYPE(x,___sRETURN)
#define ___FOREIGNP(x)___TESTSUBTYPE(x,___sFOREIGN)
#define ___STRINGP(x)___TESTSUBTYPE(x,___sSTRING)
#define ___S8VECTORP(x)___TESTSUBTYPE(x,___sS8VECTOR)
#define ___U8VECTORP(x)___TESTSUBTYPE(x,___sU8VECTOR)
#define ___S16VECTORP(x)___TESTSUBTYPE(x,___sS16VECTOR)
#define ___U16VECTORP(x)___TESTSUBTYPE(x,___sU16VECTOR)
#define ___S32VECTORP(x)___TESTSUBTYPE(x,___sS32VECTOR)
#define ___U32VECTORP(x)___TESTSUBTYPE(x,___sU32VECTOR)
#define ___S64VECTORP(x)___TESTSUBTYPE(x,___sS64VECTOR)
#define ___U64VECTORP(x)___TESTSUBTYPE(x,___sU64VECTOR)
#define ___F32VECTORP(x)___TESTSUBTYPE(x,___sF32VECTOR)
#define ___F64VECTORP(x)___TESTSUBTYPE(x,___sF64VECTOR)
#define ___BIGNUMP(x)___TESTSUBTYPE(x,___sBIGNUM)
#define ___CHARP(x)(___TYP((___temp=x))==___tSPECIAL&&___temp>=0)
#define ___NUMBERP(x)___COMPLEXP(x)
#define ___COMPLEXP(x)((___TYP((___temp=(x)))==___tFIXNUM)||(___TYP(___temp)==___tSUBTYPED&&((___temp=(___HEADER(___temp)&___SMASK))==(___sFLONUM<<___HTB)||___temp==(___sBIGNUM<<___HTB)||___temp==(___sRATNUM<<___HTB)||___temp==(___sCPXNUM<<___HTB))))
/* APPLY-able operations */
#define ___FIX_0 ___FIX(0)
#define ___FIXPOS(x)((___WORD)(x))
#define ___FIXMAX(x,y)(((x)<(y))?(y):(x))
#define ___FIXMIN(x,y)(((x)<(y))?(x):(y))
#define ___FIXADD(x,y)((___WORD)((x)+(y)))
#ifndef ___FIXADDP
#define ___FIXADDP(x,y)(___temp=___FIXADD(x,y),___EXPECT_FALSE(((___temp^(x))&(___temp^(y)))<0)?___FAL:___temp)
#endif
#define ___FIX_1 ___FIX(1)
#define ___FIXMUL(x,y)((___WORD)((x)*___INT(y)))
#define ___FIXMULP(x,y)(___EXPECT_FALSE(___FIXQUO((___temp=___FIXMUL(x,y)),y)!=(x))?___FAL:___temp)
#define ___FIXNEG(x)((___WORD)(-(x)))
#define ___FIXNEGP(x)(___EXPECT_FALSE((x)==___FIX(___MIN_FIX))?___FAL:___FIXNEG(x))
#define ___FIXSUB(x,y)((___WORD)((x)-(y)))
#ifndef ___FIXSUBP
#define ___FIXSUBP(x,y)(___temp=___FIXSUB(x,y),___EXPECT_FALSE(((___temp^(x))&((y)^(x)))<0)?___FAL:___temp)
#endif
#define ___FIXQUO(x,y)___FIX(((x)/(y)))
#define ___FIXREM(x,y)((___WORD)((x)%(y)))/****is this ok?*******/
#define ___FIXMOD(x,y)((___temp=___FIXREM((___ps->temp1=x),(___ps->temp2=y)))==0?___FIX(0):((___ps->temp1<0)==(___ps->temp2<0)?___temp:___FIXADD(___temp,___ps->temp2)))
#define ___FIXNOT(x)((___WORD)((x)^~___TMASK))
#define ___FIXAND(x,y)((___WORD)((x)&(y)))
#define ___FIX_M1 ___FIX(-1)
#define ___FIXIOR(x,y)((___WORD)((x)|(y)))
#define ___FIXXOR(x,y)((___WORD)((x)^(y)))
#define ___FIXIF(x,y,z)((___WORD)(((x)&(y))|(~(x)&(z))))
#define ___FIXABS(x)((x)<0?___FIXNEG(x):(x))
#define ___FIXABSP(x)((x)<0?((___EXPECT_FALSE((x)==___FIX(___MIN_FIX))?___FAL:___FIXNEG(x))):(x))
#if ___SCMOBJ_WIDTH == 32
#define ___SCMOBJ_MASK(x,y)y
#define ___BITCOUNT_TEMP() \
(___temp=(___temp&___SCMOBJ_MASK(0x55555555,0x55555555))+ \
((___temp>>1)&___SCMOBJ_MASK(0x55555555,0x55555555)), \
___temp=(___temp&___SCMOBJ_MASK(0x33333333,0x33333333))+ \
((___temp>>2)&___SCMOBJ_MASK(0x33333333,0x33333333)), \
___temp=(___temp&___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f))+ \
((___temp>>4)&___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f)), \
___temp=___temp+(___temp>>8), \
___temp=___temp+(___temp>>16), \
___FIX(___temp&0xff))
#define ___FIXLENGTH(x) \
(((___temp=___INT(x))<0)&&(___temp=~___temp), \
___temp|=(___temp>>1), \
___temp|=(___temp>>2), \
___temp|=(___temp>>4), \
___temp|=(___temp>>8), \
___temp|=(___temp>>16), \
___BITCOUNT_TEMP())
#define ___FIXFIRSTBITSET(x) \
(((___temp=(x))==0) \
?___FIX(-1) \
:(___temp=(___temp&-___temp), \
___FIX((((___temp&~___SCMOBJ_MASK(0x55555555,0x55555555))!=0)| \
(((___temp&~___SCMOBJ_MASK(0x33333333,0x33333333))!=0)<<1)| \
(((___temp&~___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f))!=0)<<2)| \
(((___temp&~___SCMOBJ_MASK(0x00ff00ff,0x00ff00ff))!=0)<<3)| \
(((___temp&~___SCMOBJ_MASK(0x0000ffff,0x0000ffff))!=0)<<4))-___TB)))
#else
#define ___SCMOBJ_MASK(x,y)((___CAST(___SCMOBJ,x)<<32)|y)
#define ___BITCOUNT_TEMP() \
(___temp=((___temp)&___SCMOBJ_MASK(0x55555555,0x55555555))+ \
(((___temp)>>1)&___SCMOBJ_MASK(0x55555555,0x55555555)), \
___temp=(___temp&___SCMOBJ_MASK(0x33333333,0x33333333))+ \
((___temp>>2)&___SCMOBJ_MASK(0x33333333,0x33333333)), \
___temp=(___temp&___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f))+ \
((___temp>>4)&___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f)), \
___temp=___temp+(___temp>>8), \
___temp=___temp+(___temp>>16), \
___temp=___temp+(___temp>>32), \
___FIX(___temp&0xff))
#define ___FIXLENGTH(x) \
(((___temp=___INT(x))<0)&&(___temp=~___temp), \
___temp|=(___temp>>1), \
___temp|=(___temp>>2), \
___temp|=(___temp>>4), \
___temp|=(___temp>>8), \
___temp|=(___temp>>16), \
___temp|=(___temp>>32), \
___BITCOUNT_TEMP())
#define ___FIXFIRSTBITSET(x) \
(((___temp=(x))==0) \
?___FIX(-1) \
:(___temp=(___temp&-___temp), \
___FIX((((___temp&~___SCMOBJ_MASK(0x55555555,0x55555555))!=0)| \
(((___temp&~___SCMOBJ_MASK(0x33333333,0x33333333))!=0)<<1)| \
(((___temp&~___SCMOBJ_MASK(0x0f0f0f0f,0x0f0f0f0f))!=0)<<2)| \
(((___temp&~___SCMOBJ_MASK(0x00ff00ff,0x00ff00ff))!=0)<<3)| \
(((___temp&~___SCMOBJ_MASK(0x0000ffff,0x0000ffff))!=0)<<4)| \
(((___temp&~___SCMOBJ_MASK(0x00000000,0xffffffff))!=0)<<5))-___TB)))
#endif
#define ___FIXBITCOUNT(x) \
((((___temp=___INT(x))<0)&&(___temp=~___temp)),___BITCOUNT_TEMP())
#define ___FIXBITSETP(x,y)((y)&(___CAST(___SCMOBJ,1)<<(___INT(x)+___TB)))
#define ___FIXASH(x,y)((y)<0?___FIXASHR(x,(y)>=___FIX(-___FIX_WIDTH)?-(y):___FIX(___FIX_WIDTH)):___FIXASHL(x,(y)<=___FIX(___FIX_WIDTH)?(y):___FIX(___FIX_WIDTH)))
#define ___FIXASHP(x,y)((y)<0?___FIXASHR(x,(y)>=___FIX(-___FIX_WIDTH)?-(y):___FIX(___FIX_WIDTH)):___FIXASHLP2(x,(y)<=___FIX(___FIX_WIDTH)?(y):___FIX(___FIX_WIDTH)))
#define ___FIXASHL(x,y)((x)<<___INT(y))
#define ___FIXASHLP(x,y)((y)>=___FIX(0)?___FIXASHLP2(x,(y)<=___FIX(___FIX_WIDTH)?(y):___FIX(___FIX_WIDTH)):___FAL)
#define ___FIXASHLP2(x,y)((x)==((___temp=___FIXASHL(x,y))>>___INT(y))?___temp:___FAL)
#define ___FIXASHR(x,y)(((x)>>___INT(y))&~___TMASK)
#define ___FIXASHRP(x,y)((y)>=___FIX(0)?___FIXASHR(x,(y)<=___FIX(___FIX_WIDTH)?(y):___FIX(___FIX_WIDTH)):___FAL)
#define ___FIXLSHR(x,y)((___WORD)(((unsigned ___WORD)(x)>>___INT(y))&~___TMASK))
#define ___FIXLSHRP(x,y)((y)>=___FIX(0)?___FIXLSHR(x,(y)<=___FIX(___FIX_WIDTH)?(y):___FIX(___FIX_WIDTH)):___FAL)
#define ___FIXTOCHR(x)(((x)&~___TMASK)+___tSPECIAL)
#define ___FIXFROMCHR(x)((x)&~___TMASK)
/* IFJUMP-able operations */
#define ___FIXZEROP(x)((x)==0)
#define ___FIXPOSITIVEP(x)((x)>0)
#define ___FIXNEGATIVEP(x)((x)<0)
#define ___FIXODDP(x)((x)&___FIX(1))
#define ___FIXEVENP(x)!((x)&___FIX(1))
#define ___FIXEQ(x,y)((x)==(y))
#define ___FIXLT(x,y)((x)<(y))
#define ___FIXGT(x,y)((x)>(y))
#define ___FIXLE(x,y)((x)<=(y))
#define ___FIXGE(x,y)((x)>=(y))
/* APPLY-able operations */
#define ___F64TOFIX(x)___FIX(x)
#define ___F64FROMFIX(x)___INT(x)
#define ___F64_0 0.0
#define ___F64POS(x)x
#define ___F64MAX(x,y)(___F64NANP(x)?x:(((x)>(y))?(x):(y)))
#define ___F64MIN(x,y)(___F64NANP(x)?x:(((x)<(y))?(x):(y)))
#define ___F64ADD(x,y)((x)+(y))
#define ___F64_1 1.0
#define ___F64MUL(x,y)((x)*(y))
#define ___F64NEG(x)(-(x))
#define ___F64SUB(x,y)((x)-(y))
#define ___F64INV(x)(1.0/(x))
#define ___F64DIV(x,y)((x)/(y))
#define ___F64ABS(x)___CLIBEXT(fabs)(x)
#define ___F64FLOOR(x)___CLIBEXT(floor)(x)
#define ___F64CEILING(x)___CLIBEXT(ceil)(x)
#define ___F64TRUNCATE(x)___EXT(___trunc)(x)
#define ___F64ROUND(x)___EXT(___round)(x)
#define ___F64EXP(x)___CLIBEXT(exp)(x)
#define ___F64LOG(x)___CLIBEXT(log)(x)
#define ___F64SIN(x)___CLIBEXT(sin)(x)
#define ___F64COS(x)___CLIBEXT(cos)(x)
#define ___F64TAN(x)___CLIBEXT(tan)(x)
#define ___F64ASIN(x)___CLIBEXT(asin)(x)
#define ___F64ACOS(x)___CLIBEXT(acos)(x)
#define ___F64ATAN(x)___CLIBEXT(atan)(x)
#ifdef ___GOOD_ATAN2
#define ___F64ATAN2(y,x)___CLIBEXT(atan2)(y,x)
#else
#define ___F64ATAN2(y,x)___EXT(___atan2)(y,x)
#endif
#ifdef ___GOOD_POW
#define ___F64EXPT(x,y)___CLIBEXT(pow)(x,y)
#else
#define ___F64EXPT(x,y)___EXT(___pow)(x,y)
#endif
#define ___F64SQRT(x)___CLIBEXT(sqrt)(x)
#define ___F64COPYSIGN(x,y)___EXT(___copysign)(x,y)
/* IFJUMP-able operations */
#define ___F64INTEGERP(x)(!___F64INFINITEP(x) && (x)==___F64FLOOR(x))
#define ___F64ZEROP(x)((x)==0.0)
#define ___F64POSITIVEP(x)((x)>0.0)
#define ___F64NEGATIVEP(x)((x)<0.0)
#define ___F64ODDP(x)(___F64INTEGERP(x) && (x)!=2.0*___CLIBEXT(floor)((x)*0.5))
#define ___F64EVENP(x)(___F64INTEGERP(x) && (x)==2.0*___CLIBEXT(floor)((x)*0.5))
#define ___F64FINITEP(x)___EXT(___isfinite)(x)
#define ___F64INFINITEP(x)((x)!=0.0 && (x)==2.0*(x))
#ifdef ___USE_ISNAN
#define ___F64NANP(x)___EXT(___isnan)(x)
#else
#define ___F64NANP(x)((x)!=(x))
#endif
#if ___SCMOBJ_WIDTH == 32
#define ___F64FROMFIXEXACTP(x)(1)
#else
#define ___F64FROMFIXEXACTP(x)(___INT(x)==(___WORD)(___F64)___INT(x))
#endif
#define ___F64EQ(x,y)((x)==(y))
#define ___F64LT(x,y)((x)<(y))
#define ___F64GT(x,y)((x)>(y))
#define ___F64LE(x,y)((x)<=(y))
#define ___F64GE(x,y)((x)>=(y))
/* IFJUMP-able operations */
#define ___CHAREQP(x,y)((x)==(y))
#define ___CHARLTP(x,y)((x)<(y))
#define ___CHARGTP(x,y)((x)>(y))
#define ___CHARLEP(x,y)((x)<=(y))
#define ___CHARGEP(x,y)((x)>=(y))
#define ___CHARALPHABETICP(x)___EXT(___iswalpha(___INT(x)))
#define ___CHARNUMERICP(x)___EXT(___iswdigit(___INT(x)))
#define ___CHARWHITESPACEP(x)___EXT(___iswspace(___INT(x)))
#define ___CHARUPPERCASEP(x)___EXT(___iswupper(___INT(x)))
#define ___CHARLOWERCASEP(x)___EXT(___iswlower(___INT(x)))
#define ___CHARUPCASE(x)___CHR(___EXT(___towupper(___INT(x))))
#define ___CHARDOWNCASE(x)___CHR(___EXT(___towlower(___INT(x))))
/* APPLY-able operations */
#define ___PAIR_SIZE 2
#define ___PAIR_CDR_OFS 0
#define ___PAIR_CAR_OFS 1
#define ___PAIR_CAR(obj)(*(___BODY_AS(obj,___tPAIR)+___PAIR_CAR_OFS))
#define ___PAIR_CDR(obj)(*(___BODY_AS(obj,___tPAIR)+___PAIR_CDR_OFS))
#define ___ALLOC_PAIR_EXPR(x,y)(___hp[0]=___MAKE_HD_WORDS(___PAIR_SIZE,___sPAIR), \
___hp[___PAIR_CAR_OFS+1]=x,___hp[___PAIR_CDR_OFS+1]=y,___ALLOC(___PAIR_SIZE+1))
#define ___ALLOC_PAIR(x,y){___hp[0]=___MAKE_HD_WORDS(___PAIR_SIZE,___sPAIR); \
___hp[___PAIR_CAR_OFS+1]=x;___hp[___PAIR_CDR_OFS+1]=y;___ALLOC(___PAIR_SIZE+1);}
#define ___CONS(x,y)(___ALLOC_PAIR_EXPR(x,y),___TAG((___hp-___PAIR_SIZE-1),___tPAIR))
#define ___SETCAR(obj,car)___PAIR_CAR(obj)=car;
#define ___SETCDR(obj,cdr)___PAIR_CDR(obj)=cdr;
#define ___CAR(obj)___PAIR_CAR(obj)
#define ___CDR(obj)___PAIR_CDR(obj)
#define ___CAAR(obj)___CAR(___CAR(obj))
#define ___CADR(obj)___CAR(___CDR(obj))
#define ___CDAR(obj)___CDR(___CAR(obj))
#define ___CDDR(obj)___CDR(___CDR(obj))
#define ___CAAAR(obj)___CAR(___CAR(___CAR(obj)))
#define ___CAADR(obj)___CAR(___CAR(___CDR(obj)))
#define ___CADAR(obj)___CAR(___CDR(___CAR(obj)))
#define ___CADDR(obj)___CAR(___CDR(___CDR(obj)))
#define ___CDAAR(obj)___CDR(___CAR(___CAR(obj)))
#define ___CDADR(obj)___CDR(___CAR(___CDR(obj)))
#define ___CDDAR(obj)___CDR(___CDR(___CAR(obj)))
#define ___CDDDR(obj)___CDR(___CDR(___CDR(obj)))
#define ___CAAAAR(obj)___CAR(___CAR(___CAR(___CAR(obj))))
#define ___CAAADR(obj)___CAR(___CAR(___CAR(___CDR(obj))))
#define ___CAADAR(obj)___CAR(___CAR(___CDR(___CAR(obj))))
#define ___CAADDR(obj)___CAR(___CAR(___CDR(___CDR(obj))))
#define ___CADAAR(obj)___CAR(___CDR(___CAR(___CAR(obj))))
#define ___CADADR(obj)___CAR(___CDR(___CAR(___CDR(obj))))
#define ___CADDAR(obj)___CAR(___CDR(___CDR(___CAR(obj))))
#define ___CADDDR(obj)___CAR(___CDR(___CDR(___CDR(obj))))
#define ___CDAAAR(obj)___CDR(___CAR(___CAR(___CAR(obj))))
#define ___CDAADR(obj)___CDR(___CAR(___CAR(___CDR(obj))))
#define ___CDADAR(obj)___CDR(___CAR(___CDR(___CAR(obj))))
#define ___CDADDR(obj)___CDR(___CAR(___CDR(___CDR(obj))))
#define ___CDDAAR(obj)___CDR(___CDR(___CAR(___CAR(obj))))
#define ___CDDADR(obj)___CDR(___CDR(___CAR(___CDR(obj))))
#define ___CDDDAR(obj)___CDR(___CDR(___CDR(___CAR(obj))))
#define ___CDDDDR(obj)___CDR(___CDR(___CDR(___CDR(obj))))
/* APPLY-able operations */
#define ___BOX(x)(___ALLOC(2),___hp[-2]=___MAKE_HD_WORDS(1,___sBOXVALUES), \
___hp[-1]=x,___TAG((___hp-2),___tSUBTYPED))
#define ___UNBOX(x)___BODY_AS(x,___tSUBTYPED)[0]
#define ___SETBOX(x,y)___BODY_AS(x,___tSUBTYPED)[0]=y;
#define ___VECTORLENGTH(x)___FIX(___HD_FIELDS(___HEADER(x)))
#define ___VECTORREF(x,y)*(___WORD*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(___LWS-___TB)))
#define ___VECTORSET(x,y,z)*(___WORD*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(___LWS-___TB)))=z;
#define ___VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+___LWS));
#define ___STRINGLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>___LCS))
#define ___STRINGREF(x,y)___CHR(___CS_SELECT( \
___FETCH_U8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB), \
___FETCH_U16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB), \
___FETCH_U32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB)))
#define ___STRINGSET(x,y,z)___CS_SELECT( \
___STORE_U8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z)), \
___STORE_U16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z)), \
___STORE_U32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z)));
#define ___STRINGSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+___LCS));
#define ___S8VECTORLENGTH(x)___FIX(___HD_BYTES(___HEADER(x)))
#define ___S8VECTORREF(x,y) \
___FIX(___FETCH_S8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___S8VECTORSET(x,y,z) \
___STORE_S8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z));
#define ___S8VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB));
#define ___U8VECTORLENGTH(x)___FIX(___HD_BYTES(___HEADER(x)))
#define ___U8VECTORREF(x,y) \
___FIX(___FETCH_U8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___U8VECTORSET(x,y,z) \
___STORE_U8(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z));
#define ___U8VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB));
#define ___S16VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>1))
#define ___S16VECTORREF(x,y) \
___FIX(___FETCH_S16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___S16VECTORSET(x,y,z) \
___STORE_S16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z));
#define ___S16VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+1));
#define ___U16VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>1))
#define ___U16VECTORREF(x,y) \
___FIX(___FETCH_U16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___U16VECTORSET(x,y,z) \
___STORE_U16(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___INT(z));
#define ___U16VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+1));
#define ___S32VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>2))
#define ___S32VECTORREF(x,y) \
___S32BOX(___FETCH_S32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___S32VECTORSET(x,y,z) \
___STORE_S32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___S32UNBOX(z));
#define ___S32VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+2));
#define ___U32VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>2))
#define ___U32VECTORREF(x,y) \
___U32BOX(___FETCH_U32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___U32VECTORSET(x,y,z) \
___STORE_U32(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___U32UNBOX(z));
#define ___U32VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+2));
#define ___S64VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>3))
#define ___S64VECTORREF(x,y) \
___S64BOX(___FETCH_S64(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___S64VECTORSET(x,y,z) \
___STORE_S64(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___S64UNBOX(z));
#define ___S64VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+3));
#define ___U64VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>3))
#define ___U64VECTORREF(x,y) \
___U64BOX(___FETCH_U64(___BODY_AS(x,___tSUBTYPED),(y)>>___TB))
#define ___U64VECTORSET(x,y,z) \
___STORE_U64(___BODY_AS(x,___tSUBTYPED),(y)>>___TB,___U64UNBOX(z));
#define ___U64VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+3));
#define ___F32VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>2))
#ifdef ___F32
#define ___F32VECTORREF(x,y)*(___F32*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(2-___TB)))
#define ___F32VECTORSET(x,y,z)*(___F32*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(2-___TB)))=z;
#else
#define ___F32VECTORREF(x,y)0.0
#define ___F32VECTORSET(x,y,z);
#endif
#define ___F32VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+2));
#define ___F64VECTORLENGTH(x)___FIX((___HD_BYTES(___HEADER(x))>>3))
#define ___F64VECTORREF(x,y)*(___F64*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(3-___TB)))
#define ___F64VECTORSET(x,y,z)*(___F64*)(((___WORD)___BODY_AS(x,___tSUBTYPED))+((y)<<(3-___TB)))=z;
#define ___F64VECTORSHRINK(x,y)___temp=x;___HEADER(___temp)=(___HEADER(___temp)&~___LMASK)+((y)<<(___LF-___TB+3));
#define ___TYPEID(x)___VECTORREF(x,___FIX(1))
#define ___TYPENAME(x)___VECTORREF(x,___FIX(2))
#define ___TYPEFLAGS(x)___VECTORREF(x,___FIX(3))
#define ___TYPESUPER(x)___VECTORREF(x,___FIX(4))
#define ___TYPEFIELDS(x)___VECTORREF(x,___FIX(5))
#define ___STRUCTURETYPE(x)___VECTORREF(x,___FIX(0))
#define ___STRUCTURETYPESET(x,y)___VECTORSET(x,___FIX(0),y)
#define ___STRUCTUREDIOP(x,typeid)(___TESTSUBTYPE(x,___sSTRUCTURE)&&___TYPEID(___STRUCTURETYPE(___temp))==(typeid))
#define ___UNCHECKEDSTRUCTUREREF(x,y,type,proc)___VECTORREF(x,y)
#define ___UNCHECKEDSTRUCTURESET(x,y,z,type,proc)___VECTORSET(x,z,y)
#define ___CLOSURELENGTH(x)___FIX(___HD_FIELDS(___HEADER(x)))
#define ___CLOSURECODE(x)___CLO(x,0)
#define ___CLOSUREREF(x,y)___CLO(x,___INT(y))
#define ___CLOSURESET(x,y,z)___SET_CLO(x,___INT(y),z)
#define ___GLOBALVARREF(gv)((___glo_struct*)___FIELD(gv,___SYMBOL_GLOBAL))->val
#define ___GLOBALVARPRIMREF(gv)((___glo_struct*)___FIELD(gv,___SYMBOL_GLOBAL))->prm
#define ___GLOBALVARSET(gv,x)((___glo_struct*)___FIELD(gv,___SYMBOL_GLOBAL))->val = x;
#define ___GLOBALVARPRIMSET(gv,x)((___glo_struct*)___FIELD(gv,___SYMBOL_GLOBAL))->prm = x;
#define ___MAKEPROMISE(x) \
(___ALLOC(___PROMISE_SIZE+1), \
___hp[-3]=___MAKE_HD_WORDS(___PROMISE_SIZE,___sPROMISE), \
___hp[-2]=x, ___hp[-1]=___TAG((___hp-___PROMISE_SIZE-1),___tSUBTYPED))
#define ___MAKEWILL(testator,action) \
(___hp[0]=___MAKE_HD_WORDS(___WILL_SIZE,___sWEAK), \
___hp[1]=___ps->nonexecutable_wills, \
___hp[2]=testator, \
___hp[3]=action, \
___ps->nonexecutable_wills=___TAG(___hp,0), \
___ALLOC(___WILL_SIZE+1), \
___TAG((___hp-___WILL_SIZE-1),___tSUBTYPED))
#define ___WILLTESTATOR(x)___BODY_AS(x,___tSUBTYPED)[1]
#define ___EXECUTABLE_WILL 1
#define ___UNMARKED_TESTATOR_WILL 2
#define ___GCHASHTABLEREF(x,y)___EXT(___gc_hash_table_ref)(x,y)
#define ___GCHASHTABLESET(x,y,z)___EXT(___gc_hash_table_set)(x,y,z)
#define ___GCHASHTABLEREHASH(x,y)___EXT(___gc_hash_table_rehash)(x,y)
#define ___GCHASHTABLE_HASH1(obj,mod) ((((obj)>>___TB)&___MAX_FIX)%(mod))
#define ___GCHASHTABLE_HASH2(obj,mod) (((((obj)>>___TB)&___MAX_FIX)%((mod)-1))+1)
#define ___GCHASHTABLE_FLAG_WEAK_KEYS 1
#define ___GCHASHTABLE_FLAG_WEAK_VALS 2
#define ___GCHASHTABLE_FLAG_KEY_MOVED 4
#define ___GCHASHTABLE_FLAG_ENTRY_DELETED 8
#define ___GCHASHTABLE_FLAG_MEM_ALLOC_KEYS 16
#define ___GCHASHTABLE_FLAG_NEED_REHASH 32
#define ___GCHASHTABLE_NEXT 0
#define ___GCHASHTABLE_FLAGS 1
#define ___GCHASHTABLE_COUNT 2
#define ___GCHASHTABLE_MIN_COUNT 3
#define ___GCHASHTABLE_FREE 4
#define ___GCHASHTABLE_KEY0 5
#define ___GCHASHTABLE_VAL0 6
#define ___CURRENTTHREAD ___ps->current_thread
#define ___RUNQUEUE ___ps->run_queue
#define ___THREAD_SAVE \
if (___R0 == ___GSTATE->handler_break) \
frame = ___STK(-___BREAK_FRAME_NEXT); \
else \
{ \
___SET_STK(-___FRAME_STACK_RA,___R0) \
___R0 = ___GSTATE->handler_break; \
frame = ___CAST(___SCMOBJ,___fp); \
___ADJFP(___BREAK_FRAME_SPACE) \
___SET_STK(-___BREAK_FRAME_NEXT,frame) \
___ps->stack_break = ___fp; \
} \
thread = ___ps->current_thread; \
___FIELD(___FIELD(thread,___THREAD_CONT),___CONTINUATION_FRAME) = frame;
#define ___JUMP_THREAD_SAVE1(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ thread; \
___SCMOBJ frame; \
___POP_ARGS1(proc) \
___THREAD_SAVE \
___PUSH_ARGS1(thread) \
jump(___SET_NARGS(1),proc) \
}
#define ___JUMP_THREAD_SAVE2(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ thread; \
___SCMOBJ frame; \
___POP_ARGS2(proc,arg1) \
___THREAD_SAVE \
___PUSH_ARGS2(thread,arg1) \
jump(___SET_NARGS(2),proc) \
}
#define ___JUMP_THREAD_SAVE3(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ thread; \
___SCMOBJ frame; \
___POP_ARGS3(proc,arg1,arg2) \
___THREAD_SAVE \
___PUSH_ARGS3(thread,arg1,arg2) \
jump(___SET_NARGS(3),proc) \
}
#define ___JUMP_THREAD_SAVE4(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ arg3; \
___SCMOBJ thread; \
___SCMOBJ frame; \
___POP_ARGS4(proc,arg1,arg2,arg3) \
___THREAD_SAVE \
___PUSH_ARGS4(thread,arg1,arg2,arg3) \
jump(___SET_NARGS(4),proc) \
}
#define ___THREAD_RESTORE \
{ ___SCMOBJ cont = ___FIELD(thread,___THREAD_CONT); \
___fp = ___ps->stack_break; \
___SET_STK(-___BREAK_FRAME_NEXT,___FIELD(cont,___CONTINUATION_FRAME)) \
___FIELD(cont,___CONTINUATION_FRAME) = ___FIX(0); \
___ps->current_thread = thread; \
___SET_R0(___GSTATE->handler_break) \
}
#define ___JUMP_THREAD_RESTORE2(jump) \
{ ___SCMOBJ thread; \
___SCMOBJ proc; \
___POP_ARGS2(thread,proc) \
___THREAD_RESTORE \
jump(___SET_NARGS(0),proc) \
}
#define ___JUMP_THREAD_RESTORE3(jump) \
{ ___SCMOBJ thread; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___POP_ARGS3(thread,proc,arg1) \
___THREAD_RESTORE \
___PUSH_ARGS1(arg1) \
jump(___SET_NARGS(1),proc) \
}
#define ___JUMP_THREAD_RESTORE4(jump) \
{ ___SCMOBJ thread; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___POP_ARGS4(thread,proc,arg1,arg2) \
___THREAD_RESTORE \
___PUSH_ARGS2(arg1,arg2) \
jump(___SET_NARGS(2),proc) \
}
#define ___JUMP_THREAD_RESTORE5(jump) \
{ ___SCMOBJ thread; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ arg3; \
___POP_ARGS5(thread,proc,arg1,arg2,arg3) \
___THREAD_RESTORE \
___PUSH_ARGS3(arg1,arg2,arg3) \
jump(___SET_NARGS(3),proc) \
}
#define ___FRAME_OVERHEAD(n) (___FRAME_SPACE(n)-(n))
#define ___RETI_RA (-___FRAME_OVERHEAD(___NB_GVM_REGS+1))
#define ___FRAME_RETI_RA (1-___FRAME_RESERVE-___RETI_RA)
#define ___SYMKEY_NAME 0
#define ___SYMKEY_HASH 1
#define ___SYMKEY_NEXT 2
#define ___SYMBOL_GLOBAL 3
#define ___PROMISE_THUNK 0
#define ___PROMISE_RESULT 1
#define ___CONTINUATION_FRAME 0
#define ___CONTINUATION_DENV 1
#define ___THREAD_CONT 19
#define ___THREAD_DENV 20
#define ___THREAD_DENV_CACHE1 21
#define ___THREAD_DENV_CACHE2 22
#define ___THREAD_DENV_CACHE3 23
#define ___ENV_NAME_VAL 0
#define ___ENV_LEFT 1
#define ___ENV_RIGHT 2
#define ___DENV_LOCAL 0
#define ___DENV_DYNWIND 1
#define ___DENV_INTERRUPT_MASK 2
#define ___DENV_DEBUGGING_SETTINGS 3
#define ___DENV_EXCEPTION_HANDLER 4
#define ___DENV_INPUT_PORT 5
#define ___DENV_OUTPUT_PORT 6
#define ___FRAME_EXTRA_SLOTS 1
#define ___FRAME_STACK_RA 0
#define ___FRAME_RA 0
#define ___FRAME_STORE_RA(ra) \
if (___fp != ___ps->stack_break) \
___SET_STK(-___FRAME_STACK_RA,ra)
#define ___FRAME_FETCH_RA \
((___fp != ___ps->stack_break) \
? ___STK(-___FRAME_STACK_RA) \
: ___GSTATE->handler_break)
#define ___CONTINUATION_CAPTURE \
if (___R0 == ___GSTATE->handler_break) \
frame = ___STK(-___BREAK_FRAME_NEXT); \
else \
{ \
___SET_STK(-___FRAME_STACK_RA,___R0) \
___R0 = ___GSTATE->handler_break; \
frame = ___CAST(___SCMOBJ,___fp); \
} \
___ADJFP(___ROUND_TO_MULT(___SUBTYPED_OVERHEAD+___CONTINUATION_SIZE,___FRAME_ALIGN)) \
___SET_STK(0,___MAKE_HD_WORDS(___CONTINUATION_SIZE,___sCONTINUATION)) \
___SET_STK(-1,frame) \
___SET_STK(-2,___FIELD(___ps->current_thread,___THREAD_DENV)) \
cont = ___TAG(&___STK(0),___tSUBTYPED); \
___ADJFP(___BREAK_FRAME_SPACE) \
___SET_STK(-___BREAK_FRAME_NEXT,frame) \
___ps->stack_break = ___fp;
#define ___JUMP_CONTINUATION_CAPTURE1(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ frame; \
___SCMOBJ cont; \
___POP_ARGS1(proc) \
___CONTINUATION_CAPTURE \
___PUSH_ARGS1(cont); \
jump(___SET_NARGS(1),proc) \
}
#define ___JUMP_CONTINUATION_CAPTURE2(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ frame; \
___SCMOBJ cont; \
___POP_ARGS2(proc,arg1) \
___CONTINUATION_CAPTURE \
___PUSH_ARGS2(cont,arg1); \
jump(___SET_NARGS(2),proc) \
}
#define ___JUMP_CONTINUATION_CAPTURE3(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ frame; \
___SCMOBJ cont; \
___POP_ARGS3(proc,arg1,arg2) \
___CONTINUATION_CAPTURE \
___PUSH_ARGS3(cont,arg1,arg2); \
jump(___SET_NARGS(3),proc) \
}
#define ___JUMP_CONTINUATION_CAPTURE4(jump) \
{ ___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ arg3; \
___SCMOBJ frame; \
___SCMOBJ cont; \
___POP_ARGS4(proc,arg1,arg2,arg3) \
___CONTINUATION_CAPTURE \
___PUSH_ARGS4(cont,arg1,arg2,arg3); \
jump(___SET_NARGS(4),proc) \
}
#define ___CONTINUATION_GRAFT_NO_WINDING \
___fp = ___ps->stack_break; \
___SET_STK(-___BREAK_FRAME_NEXT,___FIELD(cont,___CONTINUATION_FRAME)) \
temp = ___FIELD(cont,___CONTINUATION_DENV); \
thread = ___ps->current_thread; \
___FIELD(thread,___THREAD_DENV) = temp; \
temp = ___FIELD(___FIELD(temp,___DENV_LOCAL),___ENV_NAME_VAL); \
___FIELD(thread,___THREAD_DENV_CACHE1) = temp; \
___FIELD(thread,___THREAD_DENV_CACHE2) = temp; \
___FIELD(thread,___THREAD_DENV_CACHE3) = temp; \
___SET_R0(___GSTATE->handler_break)
#define ___JUMP_CONTINUATION_GRAFT_NO_WINDING2(jump) \
{ ___SCMOBJ cont; \
___SCMOBJ proc; \
___SCMOBJ temp; \
___SCMOBJ thread; \
___POP_ARGS2(cont,proc) \
___CONTINUATION_GRAFT_NO_WINDING \
jump(___SET_NARGS(0),proc) \
}
#define ___JUMP_CONTINUATION_GRAFT_NO_WINDING3(jump) \
{ ___SCMOBJ cont; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ temp; \
___SCMOBJ thread; \
___POP_ARGS3(cont,proc,arg1) \
___CONTINUATION_GRAFT_NO_WINDING \
___PUSH_ARGS1(arg1) \
jump(___SET_NARGS(1),proc) \
}
#define ___JUMP_CONTINUATION_GRAFT_NO_WINDING4(jump) \
{ ___SCMOBJ cont; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ temp; \
___SCMOBJ thread; \
___POP_ARGS4(cont,proc,arg1,arg2) \
___CONTINUATION_GRAFT_NO_WINDING \
___PUSH_ARGS2(arg1,arg2) \
jump(___SET_NARGS(2),proc) \
}
#define ___JUMP_CONTINUATION_GRAFT_NO_WINDING5(jump) \
{ ___SCMOBJ cont; \
___SCMOBJ proc; \
___SCMOBJ arg1; \
___SCMOBJ arg2; \
___SCMOBJ arg3; \
___SCMOBJ temp; \
___SCMOBJ thread; \
___POP_ARGS5(cont,proc,arg1,arg2,arg3) \
___CONTINUATION_GRAFT_NO_WINDING \
___PUSH_ARGS3(arg1,arg2,arg3) \
jump(___SET_NARGS(3),proc) \
}
#define ___JUMP_CONTINUATION_RETURN_NO_WINDING2(jump) \
{ ___SCMOBJ cont; \
___SCMOBJ result; \
___SCMOBJ temp; \
___SCMOBJ thread; \
___POP_ARGS2(cont,result) \
___SET_R1(result) \
___fp = ___ps->stack_break; \
___SET_STK(-___BREAK_FRAME_NEXT,___FIELD(cont,___CONTINUATION_FRAME)) \
temp = ___FIELD(cont,___CONTINUATION_DENV); \
thread = ___ps->current_thread; \
___FIELD(thread,___THREAD_DENV) = temp; \
temp = ___FIELD(___FIELD(temp,___DENV_LOCAL),___ENV_NAME_VAL); \
___FIELD(thread,___THREAD_DENV_CACHE1) = temp; \
___FIELD(thread,___THREAD_DENV_CACHE2) = temp; \
___FIELD(thread,___THREAD_DENV_CACHE3) = temp; \
___JUMPPRM(___NOTHING,___GSTATE->handler_break) \
}
/*---------------------------------------------------------------------------*/
/* Stack manipulation */
#define ___FP_AFTER(fp1,fp2)((fp1) < (fp2))
#define ___FP_PUSH(fp,val)*--fp=(val);
#define ___FP_POP(fp)*fp++
#define ___FP_STK(fp,fpo)fp[-(fpo)]
#define ___FP_SET_STK(fp,fpo,val)fp[-(fpo)]=(val);
#define ___FP_ADJFP(fp,fpa)fp-=(fpa);
#define ___PUSH(val)___FP_PUSH(___fp,val)
#define ___POP ___FP_POP(___fp)
#define ___STK(fpo)___FP_STK(___fp,fpo)
#define ___SET_STK(fpo,val)___FP_SET_STK(___fp,fpo,val)
#define ___ADJFP(fpa)___FP_ADJFP(___fp,fpa)
#define ___PSSTK(fpo)___FP_STK(___PSFP,fpo)
#define ___PSADJFP(fpa)___FP_ADJFP(___PSFP,fpa)
#define ___PRM(i,glo)___GLOSTRUCT(i,glo).prm
#define ___GLO(i,glo)___GLOSTRUCT(i,glo).val
#define ___SET_GLO(i,glo,x)___GLOSTRUCT(i,glo).val=x;
#ifdef ___BIND_LATE
#define ___GLOSTRUCT(i,glo)(*(___glo_struct*)___glo_tbl[i])
#else
#define ___GLOSTRUCT(i,glo)glo
#endif
#define ___HOST_PROC ___SM(___MH_PROC,___PH_PROC)
#define ___HOST_LBL0 ___SM(1,___PH_LBL0)
#define ___BEGIN_M_COD ___SM(___BEGIN_COD,___NOTHING)
#define ___END_M_COD ___SM(___END_COD,___NOTHING)
#define ___BEGIN_M_HLBL ___SM(___BEGIN_HLBL,___NOTHING)
#define ___DEF_M_HLBL_INTRO ___SM(___DEF_HLBL_INTRO,___NOTHING)
#define ___DEF_M_HLBL(id)___SM(___DEF_HLBL(id),___NOTHING)
#define ___END_M_HLBL ___SM(___END_HLBL,___NOTHING)
#define ___BEGIN_M_SW ___SM(___BEGIN_SW,___NOTHING)
#define ___END_M_SW ___SM(___END_SW,___NOTHING)
#define ___BEGIN_P_COD ___SM(___NOTHING,___BEGIN_COD)
#define ___END_P_COD ___SM(___NOTHING,___END_COD)
#define ___BEGIN_P_HLBL ___SM(___NOTHING,___BEGIN_HLBL)
#define ___DEF_P_HLBL_INTRO ___SM(___NOTHING,___DEF_HLBL_INTRO)
#define ___DEF_P_HLBL(id)___SM(___NOTHING,___DEF_HLBL(id))
#define ___END_P_HLBL ___SM(___NOTHING,___END_HLBL)
#define ___BEGIN_P_SW ___SM(___NOTHING,___BEGIN_SW)
#define ___END_P_SW ___SM(___NOTHING,___END_SW)
#define ___D_ALL ___SM(___MD_ALL,___PD_ALL)
#define ___R_ALL ___SM(___MR_ALL,___PR_ALL)
#define ___W_ALL ___SM(___MW_ALL,___PW_ALL)
#define ___BEGIN_COD \
___HIDDEN ___WORD ___HOST_PROC ___P((___processor_state ___ps),(___ps) \
___processor_state ___ps;){ \
register ___WORD ___pc, ___start, ___temp; \
register ___S32 ___s32_temp; /*******************/ \
register ___U32 ___u32_temp; /*******************/ \
register ___S64 ___s64_temp; /*******************/ \
register ___U64 ___u64_temp; /*******************/ \
___D_ALL
#define ___END_COD \
___ps->pc=___pc; ___W_ALL return ___pc; }
#ifdef ___DEBUG_HOST_CHANGES
#define ___REGISTER_HOST_ENTRY \
___EXT(___register_host_entry) (___start, ___MODULE_NAME);
#else
#define ___REGISTER_HOST_ENTRY
#endif
#ifdef ___USE_LABEL_VALUES
#define ___SETUP_HOST_LABEL 1
#define ___BEGIN_HLBL static void *___hlbl_tbl[]={
#define ___DEF_HLBL_INTRO 0,
#define ___DEF_HLBL(id)&&id,
#define ___END_HLBL \
0}; if (___EXPECT_FALSE(___ps == 0)) return ___CAST(___WORD,___hlbl_tbl);
#define ___BEGIN_SW \
___R_ALL ___start=___MLBL(___HOST_LBL0); ___pc=___ps->pc; \
___REGISTER_HOST_ENTRY \
goto *___LABEL_HOST_LABEL(___pc);
#define ___DEF_SW(n)
#ifdef ___USE_INLINE_JUMPS
#define ___END_SW \
___jumpext:
#define ___JUMP(dest) \
{___pc=dest; \
if (___EXPECT_TRUE(___LABEL_HOST(___pc) == ___HOST_PROC)) \
goto *___LABEL_HOST_LABEL(___pc); \
goto ___jumpext;}
#else
#define ___END_SW \
___jump: \
if (___EXPECT_TRUE(___LABEL_HOST(___pc) == ___HOST_PROC)) \
goto *___LABEL_HOST_LABEL(___pc); \
___jumpext:
#define ___JUMP(dest){___pc=dest;goto ___jump;}
#endif
#define ___JUMPEXT(dest){___pc=dest;goto ___jumpext;}
#else
#define ___SETUP_HOST_LABEL 0
#define ___BEGIN_HLBL
#define ___DEF_HLBL_INTRO
#define ___DEF_HLBL(id)
#define ___END_HLBL
#define ___BEGIN_SW \
___R_ALL ___start=___MLBL(___HOST_LBL0); ___pc=___ps->pc; \
___REGISTER_HOST_ENTRY \
___jump: \
switch((___pc-=___start)/(___LS*___WS)) \
{
#define ___DEF_SW(n)case ___PH_LBL0-___HOST_LBL0+n:
#define ___END_SW \
}___pc+=___start;___jumpext:
#define ___JUMP(dest){___pc=dest;goto ___jump;}
#define ___JUMPEXT(dest){___pc=dest;goto ___jumpext;}
#endif
#define ___BEGIN_P_SLBL ___SM(___NOTHING,___BEGIN_SLBL)
#define ___DEF_P_SLBL(id)
#define ___END_P_SLBL ___SM(___NOTHING,___END_SLBL)
#define ___LS 4
#define ___PSHEAP ___ps->hp
#define ___D_HEAP register ___WORD *___hp;
#define ___R_HEAP ___hp=___PSHEAP;
#define ___W_HEAP ___PSHEAP=___hp;
#define ___PSFP ___ps->fp
#define ___D_FP register ___WORD *___fp;
#define ___R_FP ___fp=___PSFP;
#define ___W_FP ___PSFP=___fp;
/*---------------------------------------------------------------------------*/
/* GVM registers */
#ifndef ___MAX_LOCAL_GVM_REGS
#define ___MAX_LOCAL_GVM_REGS 25
#endif
#if ___NB_ARG_REGS == 0
#define ___PUSH_ARGS1(a)___PUSH(a)
#define ___POP_ARGS1(a)a = ___POP;
#define ___PUSH_ARGS2(a,b)___PUSH(a)___PUSH(b)
#define ___POP_ARGS2(a,b)b = ___POP; a = ___POP;
#define ___PUSH_ARGS3(a,b,c)___PUSH(a)___PUSH(b)___PUSH(c)
#define ___POP_ARGS3(a,b,c)c = ___POP; b = ___POP; a = ___POP;
#define ___PUSH_ARGS4(a,b,c,d)___PUSH(a)___PUSH(b)___PUSH(c)___PUSH(d)
#define ___POP_ARGS4(a,b,c,d)d = ___POP; c = ___POP; b = ___POP; a = ___POP;
#define ___PUSH_ARGS5(a,b,c,d,e)___PUSH(a)___PUSH(b)___PUSH(c)___PUSH(d)___PUSH(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___POP; d = ___POP; c = ___POP; b = ___POP; a = ___POP;
#else
#define ___PUSH_ARGS1(a)___SET_R1(a)
#define ___POP_ARGS1(a)a = ___R1;
#if ___NB_ARG_REGS == 1
#define ___PUSH_ARGS2(a,b)___PUSH(a)___SET_R1(b)
#define ___POP_ARGS2(a,b)b = ___R1; a = ___POP;
#define ___PUSH_ARGS3(a,b,c)___PUSH(a)___PUSH(b)___SET_R1(c)
#define ___POP_ARGS3(a,b,c)c = ___R1; b = ___POP; a = ___POP;
#define ___PUSH_ARGS4(a,b,c,d)___PUSH(a)___PUSH(b)___PUSH(c)___SET_R1(d)
#define ___POP_ARGS4(a,b,c,d)d = ___R1; c = ___POP; b = ___POP; a = ___POP;
#define ___PUSH_ARGS5(a,b,c,d,e)___PUSH(a)___PUSH(b)___PUSH(c)___PUSH(d)___SET_R1(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___R1; d = ___POP; c = ___POP; b = ___POP; a = ___POP;
#else
#define ___PUSH_ARGS2(a,b)___SET_R1(a)___SET_R2(b)
#define ___POP_ARGS2(a,b)b = ___R2; a = ___R1;
#if ___NB_ARG_REGS == 2
#define ___PUSH_ARGS3(a,b,c)___PUSH(a)___SET_R1(b)___SET_R2(c)
#define ___POP_ARGS3(a,b,c)c = ___R2; b = ___R1; a = ___POP;
#define ___PUSH_ARGS4(a,b,c,d)___PUSH(a)___PUSH(b)___SET_R1(c)___SET_R2(d)
#define ___POP_ARGS4(a,b,c,d)d = ___R2; c = ___R1; b = ___POP; a = ___POP;
#define ___PUSH_ARGS5(a,b,c,d,e)___PUSH(a)___PUSH(b)___PUSH(c)___SET_R1(d)___SET_R2(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___R2; d = ___R1; c = ___POP; b = ___POP; a = ___POP;
#else
#define ___PUSH_ARGS3(a,b,c)___SET_R1(a)___SET_R2(b)___SET_R3(c)
#define ___POP_ARGS3(a,b,c)c = ___R3; b = ___R2; a = ___R1;
#if ___NB_ARG_REGS == 3
#define ___PUSH_ARGS4(a,b,c,d)___PUSH(a)___SET_R1(b)___SET_R2(c)___SET_R3(d)
#define ___POP_ARGS4(a,b,c,d)d = ___R3; c = ___R2; b = ___R1; a = ___POP;
#define ___PUSH_ARGS5(a,b,c,d,e)___PUSH(a)___PUSH(b)___SET_R1(c)___SET_R2(d)___SET_R3(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___R3; d = ___R2; c = ___R1; b = ___POP; a = ___POP;
#else
#define ___PUSH_ARGS4(a,b,c,d)___SET_R1(a)___SET_R2(b)___SET_R3(c)___SET_R4(d)
#define ___POP_ARGS4(a,b,c,d)d = ___R4; c = ___R3; b = ___R2; a = ___R1;
#if ___NB_ARG_REGS == 4
#define ___PUSH_ARGS5(a,b,c,d,e)___PUSH(a)___SET_R1(b)___SET_R2(c)___SET_R3(d)___SET_R4(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___R4; d = ___R3; c = ___R2; b = ___R1; a = ___POP;
#else
#define ___PUSH_ARGS5(a,b,c,d,e)___SET_R1(a)___SET_R2(b)___SET_R3(c)___SET_R4(d)___SET_R5(e)
#define ___POP_ARGS5(a,b,c,d,e)e = ___R5; d = ___R4; c = ___R3; b = ___R2; a = ___R1;
#endif
#endif
#endif
#endif
#endif
#define ___PSR0 ___ps->r[0]
#if ___MAX_LOCAL_GVM_REGS > 0
#define ___D_R0 register ___WORD ___r0;
#define ___R_R0 ___r0=___PSR0;
#define ___W_R0 ___PSR0=___r0;
#define ___R0 ___r0
#else
#define ___D_R0
#define ___R_R0
#define ___W_R0
#define ___R0 ___PSR0
#endif
#define ___SET_R0(val)___R0=val;
#define ___PUSH_R0 ___PUSH(___R0)
#define ___POP_R0 ___SET_R0(___POP)
#if ___NB_ARG_REGS == 0
#define ___PUSH_ARGS_IN_REGS(na)
#define ___POP_ARGS_IN_REGS(na)
#define ___PSSELF ___PSR1
#define ___SELF ___R1
#define ___LD_ARG_REGS
#define ___ST_ARG_REGS
#endif
#define ___PSR1 ___ps->r[1]
#if ___MAX_LOCAL_GVM_REGS > 1
#define ___D_R1 register ___WORD ___r1;
#define ___R_R1 ___r1=___PSR1;
#define ___W_R1 ___PSR1=___r1;
#define ___R1 ___r1
#else
#define ___D_R1
#define ___R_R1
#define ___W_R1
#define ___R1 ___PSR1
#endif
#define ___SET_R1(val)___R1=(val);
#define ___PUSH_R1_TO_R1 ___PUSH(___R1)
#define ___POP_R1_TO_R1 ___SET_R1(___POP)
#define ___LD_R1_TO_R1 ___D_R1 ___R_R1
#define ___ST_R1_TO_R1 ___W_R1
#if ___NB_ARG_REGS == 1
#define ___PUSH_ARGS_IN_REGS(na) \
if ((na)>0) ___PUSH_R1_TO_R1
#define ___POP_ARGS_IN_REGS(na) \
if ((na)>0) ___POP_R1_TO_R1
#define ___PSSELF ___PSR2
#define ___SELF ___R2
#define ___LD_ARG_REGS ___LD_R1_TO_R1
#define ___ST_ARG_REGS ___ST_R1_TO_R1
#endif
#if ___NB_GVM_REGS == 2
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R1
#define ___POP_REGS ___POP_R1_TO_R1 ___POP_R0
#else
#define ___PSR2 ___ps->r[2]
#if ___MAX_LOCAL_GVM_REGS > 2
#define ___D_R2 register ___WORD ___r2;
#define ___R_R2 ___r2=___PSR2;
#define ___W_R2 ___PSR2=___r2;
#define ___R2 ___r2
#else
#define ___D_R2
#define ___R_R2
#define ___W_R2
#define ___R2 ___PSR2
#endif
#define ___SET_R2(val)___R2=(val);
#define ___PUSH_R1_TO_R2 ___PUSH_R1_TO_R1 ___PUSH(___R2)
#define ___POP_R2_TO_R1 ___SET_R2(___POP)___POP_R1_TO_R1
#define ___LD_R1_TO_R2 ___D_R2 ___LD_R1_TO_R1 ___R_R2
#define ___ST_R1_TO_R2 ___ST_R1_TO_R1 ___W_R2
#if ___NB_ARG_REGS == 2
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
default: ___PUSH_R1_TO_R2 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
default: ___POP_R2_TO_R1 \
}
#define ___PSSELF ___PSR3
#define ___SELF ___R3
#define ___LD_ARG_REGS ___LD_R1_TO_R2
#define ___ST_ARG_REGS ___ST_R1_TO_R2
#endif
#if ___NB_GVM_REGS == 3
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R2
#define ___POP_REGS ___POP_R2_TO_R1 ___POP_R0
#else
#define ___PSR3 ___ps->r[3]
#if ___MAX_LOCAL_GVM_REGS > 3
#define ___D_R3 register ___WORD ___r3;
#define ___R_R3 ___r3=___PSR3;
#define ___W_R3 ___PSR3=___r3;
#define ___R3 ___r3
#else
#define ___D_R3
#define ___R_R3
#define ___W_R3
#define ___R3 ___PSR3
#endif
#define ___SET_R3(val)___R3=(val);
#define ___PUSH_R1_TO_R3 ___PUSH_R1_TO_R2 ___PUSH(___R3)
#define ___POP_R3_TO_R1 ___SET_R3(___POP)___POP_R2_TO_R1
#define ___LD_R1_TO_R3 ___D_R3 ___LD_R1_TO_R2 ___R_R3
#define ___ST_R1_TO_R3 ___ST_R1_TO_R2 ___W_R3
#if ___NB_ARG_REGS == 3
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
default: ___PUSH_R1_TO_R3 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
default: ___POP_R3_TO_R1 \
}
#define ___PSSELF ___PSR4
#define ___SELF ___R4
#define ___LD_ARG_REGS ___LD_R1_TO_R3
#define ___ST_ARG_REGS ___ST_R1_TO_R3
#endif
#if ___NB_GVM_REGS == 4
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R3
#define ___POP_REGS ___POP_R3_TO_R1 ___POP_R0
#else
#define ___PSR4 ___ps->r[4]
#if ___MAX_LOCAL_GVM_REGS > 4
#define ___D_R4 register ___WORD ___r4;
#define ___R_R4 ___r4=___PSR4;
#define ___W_R4 ___PSR4=___r4;
#define ___R4 ___r4
#else
#define ___D_R4
#define ___R_R4
#define ___W_R4
#define ___R4 ___PSR4
#endif
#define ___SET_R4(val)___R4=(val);
#define ___PUSH_R1_TO_R4 ___PUSH_R1_TO_R3 ___PUSH(___R4)
#define ___POP_R4_TO_R1 ___SET_R4(___POP)___POP_R3_TO_R1
#define ___LD_R1_TO_R4 ___D_R4 ___LD_R1_TO_R3 ___R_R4
#define ___ST_R1_TO_R4 ___ST_R1_TO_R3 ___W_R4
#if ___NB_ARG_REGS == 4
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
default: ___PUSH_R1_TO_R4 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
default: ___POP_R4_TO_R1 \
}
#define ___PSSELF ___PSR5
#define ___SELF ___R5
#define ___LD_ARG_REGS ___LD_R1_TO_R4
#define ___ST_ARG_REGS ___ST_R1_TO_R4
#endif
#if ___NB_GVM_REGS == 5
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R4
#define ___POP_REGS ___POP_R4_TO_R1 ___POP_R0
#else
#define ___PSR5 ___ps->r[5]
#if ___MAX_LOCAL_GVM_REGS > 5
#define ___D_R5 register ___WORD ___r5;
#define ___R_R5 ___r5=___PSR5;
#define ___W_R5 ___PSR5=___r5;
#define ___R5 ___r5
#else
#define ___D_R5
#define ___R_R5
#define ___W_R5
#define ___R5 ___PSR5
#endif
#define ___SET_R5(val)___R5=(val);
#define ___PUSH_R1_TO_R5 ___PUSH_R1_TO_R4 ___PUSH(___R5)
#define ___POP_R5_TO_R1 ___SET_R5(___POP)___POP_R4_TO_R1
#define ___LD_R1_TO_R5 ___D_R5 ___LD_R1_TO_R4 ___R_R5
#define ___ST_R1_TO_R5 ___ST_R1_TO_R4 ___W_R5
#if ___NB_ARG_REGS == 5
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
default: ___PUSH_R1_TO_R5 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
default: ___POP_R5_TO_R1 \
}
#define ___PSSELF ___PSR6
#define ___SELF ___R6
#define ___LD_ARG_REGS ___LD_R1_TO_R5
#define ___ST_ARG_REGS ___ST_R1_TO_R5
#endif
#if ___NB_GVM_REGS == 6
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R5
#define ___POP_REGS ___POP_R5_TO_R1 ___POP_R0
#else
#define ___PSR6 ___ps->r[6]
#if ___MAX_LOCAL_GVM_REGS > 6
#define ___D_R6 register ___WORD ___r6;
#define ___R_R6 ___r6=___PSR6;
#define ___W_R6 ___PSR6=___r6;
#define ___R6 ___r6
#else
#define ___D_R6
#define ___R_R6
#define ___W_R6
#define ___R6 ___PSR6
#endif
#define ___SET_R6(val)___R6=(val);
#define ___PUSH_R1_TO_R6 ___PUSH_R1_TO_R5 ___PUSH(___R6)
#define ___POP_R6_TO_R1 ___SET_R6(___POP)___POP_R5_TO_R1
#define ___LD_R1_TO_R6 ___D_R6 ___LD_R1_TO_R5 ___R_R6
#define ___ST_R1_TO_R6 ___ST_R1_TO_R5 ___W_R6
#if ___NB_ARG_REGS == 6
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
default: ___PUSH_R1_TO_R6 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
default: ___POP_R6_TO_R1 \
}
#define ___PSSELF ___PSR7
#define ___SELF ___R7
#define ___LD_ARG_REGS ___LD_R1_TO_R6
#define ___ST_ARG_REGS ___ST_R1_TO_R6
#endif
#if ___NB_GVM_REGS == 7
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R6
#define ___POP_REGS ___POP_R6_TO_R1 ___POP_R0
#else
#define ___PSR7 ___ps->r[7]
#if ___MAX_LOCAL_GVM_REGS > 7
#define ___D_R7 register ___WORD ___r7;
#define ___R_R7 ___r7=___PSR7;
#define ___W_R7 ___PSR7=___r7;
#define ___R7 ___r7
#else
#define ___D_R7
#define ___R_R7
#define ___W_R7
#define ___R7 ___PSR7
#endif
#define ___SET_R7(val)___R7=(val);
#define ___PUSH_R1_TO_R7 ___PUSH_R1_TO_R6 ___PUSH(___R7)
#define ___POP_R7_TO_R1 ___SET_R7(___POP)___POP_R6_TO_R1
#define ___LD_R1_TO_R7 ___D_R7 ___LD_R1_TO_R6 ___R_R7
#define ___ST_R1_TO_R7 ___ST_R1_TO_R6 ___W_R7
#if ___NB_ARG_REGS == 7
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
default: ___PUSH_R1_TO_R7 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
default: ___POP_R7_TO_R1 \
}
#define ___PSSELF ___PSR8
#define ___SELF ___R8
#define ___LD_ARG_REGS ___LD_R1_TO_R7
#define ___ST_ARG_REGS ___ST_R1_TO_R7
#endif
#if ___NB_GVM_REGS == 8
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R7
#define ___POP_REGS ___POP_R7_TO_R1 ___POP_R0
#else
#define ___PSR8 ___ps->r[8]
#if ___MAX_LOCAL_GVM_REGS > 8
#define ___D_R8 register ___WORD ___r8;
#define ___R_R8 ___r8=___PSR8;
#define ___W_R8 ___PSR8=___r8;
#define ___R8 ___r8
#else
#define ___D_R8
#define ___R_R8
#define ___W_R8
#define ___R8 ___PSR8
#endif
#define ___SET_R8(val)___R8=(val);
#define ___PUSH_R1_TO_R8 ___PUSH_R1_TO_R7 ___PUSH(___R8)
#define ___POP_R8_TO_R1 ___SET_R8(___POP)___POP_R7_TO_R1
#define ___LD_R1_TO_R8 ___D_R8 ___LD_R1_TO_R7 ___R_R8
#define ___ST_R1_TO_R8 ___ST_R1_TO_R7 ___W_R8
#if ___NB_ARG_REGS == 8
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
case 7: ___PUSH_R1_TO_R7 break; \
default: ___PUSH_R1_TO_R8 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
case 7: ___POP_R7_TO_R1 break; \
default: ___POP_R8_TO_R1 \
}
#define ___PSSELF ___PSR9
#define ___SELF ___R9
#define ___LD_ARG_REGS ___LD_R1_TO_R8
#define ___ST_ARG_REGS ___ST_R1_TO_R8
#endif
#if ___NB_GVM_REGS == 9
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R8
#define ___POP_REGS ___POP_R8_TO_R1 ___POP_R0
#else
#define ___PSR9 ___ps->r[9]
#if ___MAX_LOCAL_GVM_REGS > 9
#define ___D_R9 register ___WORD ___r9;
#define ___R_R9 ___r9=___PSR9;
#define ___W_R9 ___PSR9=___r9;
#define ___R9 ___r9
#else
#define ___D_R9
#define ___R_R9
#define ___W_R9
#define ___R9 ___PSR9
#endif
#define ___SET_R9(val)___R9=(val);
#define ___PUSH_R1_TO_R9 ___PUSH_R1_TO_R8 ___PUSH(___R9)
#define ___POP_R9_TO_R1 ___SET_R9(___POP)___POP_R8_TO_R1
#define ___LD_R1_TO_R9 ___D_R9 ___LD_R1_TO_R8 ___R_R9
#define ___ST_R1_TO_R9 ___ST_R1_TO_R8 ___W_R9
#if ___NB_ARG_REGS == 9
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
case 7: ___PUSH_R1_TO_R7 break; \
case 8: ___PUSH_R1_TO_R8 break; \
default: ___PUSH_R1_TO_R9 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
case 7: ___POP_R7_TO_R1 break; \
case 8: ___POP_R8_TO_R1 break; \
default: ___POP_R9_TO_R1 \
}
#define ___PSSELF ___PSR10
#define ___SELF ___R10
#define ___LD_ARG_REGS ___LD_R1_TO_R9
#define ___ST_ARG_REGS ___ST_R1_TO_R9
#endif
#if ___NB_GVM_REGS == 10
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R9
#define ___POP_REGS ___POP_R9_TO_R1 ___POP_R0
#else
#define ___PSR10 ___ps->r[10]
#if ___MAX_LOCAL_GVM_REGS > 10
#define ___D_R10 register ___WORD ___r10;
#define ___R_R10 ___r10=___PSR10;
#define ___W_R10 ___PSR10=___r10;
#define ___R10 ___r10
#else
#define ___D_R10
#define ___R_R10
#define ___W_R10
#define ___R10 ___PSR10
#endif
#define ___SET_R10(val)___R10=(val);
#define ___PUSH_R1_TO_R10 ___PUSH_R1_TO_R9 ___PUSH(___R10)
#define ___POP_R10_TO_R1 ___SET_R10(___POP)___POP_R9_TO_R1
#define ___LD_R1_TO_R10 ___D_R10 ___LD_R1_TO_R9 ___R_R10
#define ___ST_R1_TO_R10 ___ST_R1_TO_R9 ___W_R10
#if ___NB_ARG_REGS == 10
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
case 7: ___PUSH_R1_TO_R7 break; \
case 8: ___PUSH_R1_TO_R8 break; \
case 9: ___PUSH_R1_TO_R9 break; \
default: ___PUSH_R1_TO_R10 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
case 7: ___POP_R7_TO_R1 break; \
case 8: ___POP_R8_TO_R1 break; \
case 9: ___POP_R9_TO_R1 break; \
default: ___POP_R10_TO_R1 \
}
#define ___PSSELF ___PSR11
#define ___SELF ___R11
#define ___LD_ARG_REGS ___LD_R1_TO_R10
#define ___ST_ARG_REGS ___ST_R1_TO_R10
#endif
#if ___NB_GVM_REGS == 11
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R10
#define ___POP_REGS ___POP_R10_TO_R1 ___POP_R0
#else
#define ___PSR11 ___ps->r[11]
#if ___MAX_LOCAL_GVM_REGS > 11
#define ___D_R11 register ___WORD ___r11;
#define ___R_R11 ___r11=___PSR11;
#define ___W_R11 ___PSR11=___r11;
#define ___R11 ___r11
#else
#define ___D_R11
#define ___R_R11
#define ___W_R11
#define ___R11 ___PSR11
#endif
#define ___SET_R11(val)___R11=(val);
#define ___PUSH_R1_TO_R11 ___PUSH_R1_TO_R10 ___PUSH(___R11)
#define ___POP_R11_TO_R1 ___SET_R11(___POP)___POP_R10_TO_R1
#define ___LD_R1_TO_R11 ___D_R11 ___LD_R1_TO_R10 ___R_R11
#define ___ST_R1_TO_R11 ___ST_R1_TO_R10 ___W_R11
#if ___NB_ARG_REGS == 11
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
case 7: ___PUSH_R1_TO_R7 break; \
case 8: ___PUSH_R1_TO_R8 break; \
case 9: ___PUSH_R1_TO_R9 break; \
case 10: ___PUSH_R1_TO_R10 break; \
default: ___PUSH_R1_TO_R11 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
case 7: ___POP_R7_TO_R1 break; \
case 8: ___POP_R8_TO_R1 break; \
case 9: ___POP_R9_TO_R1 break; \
case 10: ___POP_R10_TO_R1 break; \
default: ___POP_R11_TO_R1 \
}
#define ___PSSELF ___PSR12
#define ___SELF ___R12
#define ___LD_ARG_REGS ___LD_R1_TO_R11
#define ___ST_ARG_REGS ___ST_R1_TO_R11
#endif
#if ___NB_GVM_REGS == 12
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R11
#define ___POP_REGS ___POP_R11_TO_R1 ___POP_R0
#else
#define ___PSR12 ___ps->r[12]
#if ___MAX_LOCAL_GVM_REGS > 12
#define ___D_R12 register ___WORD ___r12;
#define ___R_R12 ___r12=___PSR12;
#define ___W_R12 ___PSR12=___r12;
#define ___R12 ___r12
#else
#define ___D_R12
#define ___R_R12
#define ___W_R12
#define ___R12 ___PSR12
#endif
#define ___SET_R12(val)___R12=(val);
#define ___PUSH_R1_TO_R12 ___PUSH_R1_TO_R11 ___PUSH(___R12)
#define ___POP_R12_TO_R1 ___SET_R12(___POP)___POP_R11_TO_R1
#define ___LD_R1_TO_R12 ___D_R12 ___LD_R1_TO_R11 ___R_R12
#define ___ST_R1_TO_R12 ___ST_R1_TO_R11 ___W_R12
#if ___NB_ARG_REGS == 12
#define ___PUSH_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___PUSH_R1_TO_R1 break; \
case 2: ___PUSH_R1_TO_R2 break; \
case 3: ___PUSH_R1_TO_R3 break; \
case 4: ___PUSH_R1_TO_R4 break; \
case 5: ___PUSH_R1_TO_R5 break; \
case 6: ___PUSH_R1_TO_R6 break; \
case 7: ___PUSH_R1_TO_R7 break; \
case 8: ___PUSH_R1_TO_R8 break; \
case 9: ___PUSH_R1_TO_R9 break; \
case 10: ___PUSH_R1_TO_R10 break; \
case 11: ___PUSH_R1_TO_R11 break; \
default: ___PUSH_R1_TO_R12 \
}
#define ___POP_ARGS_IN_REGS(na) \
switch (na) \
{ \
case 0: break; \
case 1: ___POP_R1_TO_R1 break; \
case 2: ___POP_R2_TO_R1 break; \
case 3: ___POP_R3_TO_R1 break; \
case 4: ___POP_R4_TO_R1 break; \
case 5: ___POP_R5_TO_R1 break; \
case 6: ___POP_R6_TO_R1 break; \
case 7: ___POP_R7_TO_R1 break; \
case 8: ___POP_R8_TO_R1 break; \
case 9: ___POP_R9_TO_R1 break; \
case 10: ___POP_R10_TO_R1 break; \
case 11: ___POP_R11_TO_R1 break; \
default: ___POP_R12_TO_R1 \
}
#define ___PSSELF ___PSR13
#define ___SELF ___R13
#define ___LD_ARG_REGS ___LD_R1_TO_R12
#define ___ST_ARG_REGS ___ST_R1_TO_R12
#endif
#if ___NB_GVM_REGS == 13
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R12
#define ___POP_REGS ___POP_R12_TO_R1 ___POP_R0
#else
#define ___PSR13 ___ps->r[13]
#if ___MAX_LOCAL_GVM_REGS > 13
#define ___D_R13 register ___WORD ___r13;
#define ___R_R13 ___r13=___PSR13;
#define ___W_R13 ___PSR13=___r13;
#define ___R13 ___r13
#else
#define ___D_R13
#define ___R_R13
#define ___W_R13
#define ___R13 ___PSR13
#endif
#define ___SET_R13(val)___R13=(val);
#define ___PUSH_R1_TO_R13 ___PUSH_R1_TO_R12 ___PUSH(___R13)
#define ___POP_R13_TO_R1 ___SET_R13(___POP)___POP_R12_TO_R1
#define ___LD_R1_TO_R13 ___D_R13 ___LD_R1_TO_R12 ___R_R13
#define ___ST_R1_TO_R13 ___ST_R1_TO_R12 ___W_R13
#if ___NB_GVM_REGS == 14
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R13
#define ___POP_REGS ___POP_R13_TO_R1 ___POP_R0
#else
#define ___PSR14 ___ps->r[14]
#if ___MAX_LOCAL_GVM_REGS > 14
#define ___D_R14 register ___WORD ___r14;
#define ___R_R14 ___r14=___PSR14;
#define ___W_R14 ___PSR14=___r14;
#define ___R14 ___r14
#else
#define ___D_R14
#define ___R_R14
#define ___W_R14
#define ___R14 ___PSR14
#endif
#define ___SET_R14(val)___R14=(val);
#define ___PUSH_R1_TO_R14 ___PUSH_R1_TO_R13 ___PUSH(___R14)
#define ___POP_R14_TO_R1 ___SET_R14(___POP)___POP_R13_TO_R1
#define ___LD_R1_TO_R14 ___D_R14 ___LD_R1_TO_R13 ___R_R14
#define ___ST_R1_TO_R14 ___ST_R1_TO_R13 ___W_R14
#if ___NB_GVM_REGS == 15
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R14
#define ___POP_REGS ___POP_R14_TO_R1 ___POP_R0
#else
#define ___PSR15 ___ps->r[15]
#if ___MAX_LOCAL_GVM_REGS > 15
#define ___D_R15 register ___WORD ___r15;
#define ___R_R15 ___r15=___PSR15;
#define ___W_R15 ___PSR15=___r15;
#define ___R15 ___r15
#else
#define ___D_R15
#define ___R_R15
#define ___W_R15
#define ___R15 ___PSR15
#endif
#define ___SET_R15(val)___R15=(val);
#define ___PUSH_R1_TO_R15 ___PUSH_R1_TO_R14 ___PUSH(___R15)
#define ___POP_R15_TO_R1 ___SET_R15(___POP)___POP_R14_TO_R1
#define ___LD_R1_TO_R15 ___D_R15 ___LD_R1_TO_R14 ___R_R15
#define ___ST_R1_TO_R15 ___ST_R1_TO_R14 ___W_R15
#if ___NB_GVM_REGS == 16
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R15
#define ___POP_REGS ___POP_R15_TO_R1 ___POP_R0
#else
#define ___PSR16 ___ps->r[16]
#if ___MAX_LOCAL_GVM_REGS > 16
#define ___D_R16 register ___WORD ___r16;
#define ___R_R16 ___r16=___PSR16;
#define ___W_R16 ___PSR16=___r16;
#define ___R16 ___r16
#else
#define ___D_R16
#define ___R_R16
#define ___W_R16
#define ___R16 ___PSR16
#endif
#define ___SET_R16(val)___R16=(val);
#define ___PUSH_R1_TO_R16 ___PUSH_R1_TO_R15 ___PUSH(___R16)
#define ___POP_R16_TO_R1 ___SET_R16(___POP)___POP_R15_TO_R1
#define ___LD_R1_TO_R16 ___D_R16 ___LD_R1_TO_R15 ___R_R16
#define ___ST_R1_TO_R16 ___ST_R1_TO_R15 ___W_R16
#if ___NB_GVM_REGS == 17
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R16
#define ___POP_REGS ___POP_R16_TO_R1 ___POP_R0
#else
#define ___PSR17 ___ps->r[17]
#if ___MAX_LOCAL_GVM_REGS > 17
#define ___D_R17 register ___WORD ___r17;
#define ___R_R17 ___r17=___PSR17;
#define ___W_R17 ___PSR17=___r17;
#define ___R17 ___r17
#else
#define ___D_R17
#define ___R_R17
#define ___W_R17
#define ___R17 ___PSR17
#endif
#define ___SET_R17(val)___R17=(val);
#define ___PUSH_R1_TO_R17 ___PUSH_R1_TO_R16 ___PUSH(___R17)
#define ___POP_R17_TO_R1 ___SET_R17(___POP)___POP_R16_TO_R1
#define ___LD_R1_TO_R17 ___D_R17 ___LD_R1_TO_R16 ___R_R17
#define ___ST_R1_TO_R17 ___ST_R1_TO_R16 ___W_R17
#if ___NB_GVM_REGS == 18
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R17
#define ___POP_REGS ___POP_R17_TO_R1 ___POP_R0
#else
#define ___PSR18 ___ps->r[18]
#if ___MAX_LOCAL_GVM_REGS > 18
#define ___D_R18 register ___WORD ___r18;
#define ___R_R18 ___r18=___PSR18;
#define ___W_R18 ___PSR18=___r18;
#define ___R18 ___r18
#else
#define ___D_R18
#define ___R_R18
#define ___W_R18
#define ___R18 ___PSR18
#endif
#define ___SET_R18(val)___R18=(val);
#define ___PUSH_R1_TO_R18 ___PUSH_R1_TO_R17 ___PUSH(___R18)
#define ___POP_R18_TO_R1 ___SET_R18(___POP)___POP_R17_TO_R1
#define ___LD_R1_TO_R18 ___D_R18 ___LD_R1_TO_R17 ___R_R18
#define ___ST_R1_TO_R18 ___ST_R1_TO_R17 ___W_R18
#if ___NB_GVM_REGS == 19
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R18
#define ___POP_REGS ___POP_R18_TO_R1 ___POP_R0
#else
#define ___PSR19 ___ps->r[19]
#if ___MAX_LOCAL_GVM_REGS > 19
#define ___D_R19 register ___WORD ___r19;
#define ___R_R19 ___r19=___PSR19;
#define ___W_R19 ___PSR19=___r19;
#define ___R19 ___r19
#else
#define ___D_R19
#define ___R_R19
#define ___W_R19
#define ___R19 ___PSR19
#endif
#define ___SET_R19(val)___R19=(val);
#define ___PUSH_R1_TO_R19 ___PUSH_R1_TO_R18 ___PUSH(___R19)
#define ___POP_R19_TO_R1 ___SET_R19(___POP)___POP_R18_TO_R1
#define ___LD_R1_TO_R19 ___D_R19 ___LD_R1_TO_R18 ___R_R19
#define ___ST_R1_TO_R19 ___ST_R1_TO_R18 ___W_R19
#if ___NB_GVM_REGS == 20
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R19
#define ___POP_REGS ___POP_R19_TO_R1 ___POP_R0
#else
#define ___PSR20 ___ps->r[20]
#if ___MAX_LOCAL_GVM_REGS > 20
#define ___D_R20 register ___WORD ___r20;
#define ___R_R20 ___r20=___PSR20;
#define ___W_R20 ___PSR20=___r20;
#define ___R20 ___r20
#else
#define ___D_R20
#define ___R_R20
#define ___W_R20
#define ___R20 ___PSR20
#endif
#define ___SET_R20(val)___R20=(val);
#define ___PUSH_R1_TO_R20 ___PUSH_R1_TO_R19 ___PUSH(___R20)
#define ___POP_R20_TO_R1 ___SET_R20(___POP)___POP_R19_TO_R1
#define ___LD_R1_TO_R20 ___D_R20 ___LD_R1_TO_R19 ___R_R20
#define ___ST_R1_TO_R20 ___ST_R1_TO_R19 ___W_R20
#if ___NB_GVM_REGS == 21
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R20
#define ___POP_REGS ___POP_R20_TO_R1 ___POP_R0
#else
#define ___PSR21 ___ps->r[21]
#if ___MAX_LOCAL_GVM_REGS > 21
#define ___D_R21 register ___WORD ___r21;
#define ___R_R21 ___r21=___PSR21;
#define ___W_R21 ___PSR21=___r21;
#define ___R21 ___r21
#else
#define ___D_R21
#define ___R_R21
#define ___W_R21
#define ___R21 ___PSR21
#endif
#define ___SET_R21(val)___R21=(val);
#define ___PUSH_R1_TO_R21 ___PUSH_R1_TO_R20 ___PUSH(___R21)
#define ___POP_R21_TO_R1 ___SET_R21(___POP)___POP_R20_TO_R1
#define ___LD_R1_TO_R21 ___D_R21 ___LD_R1_TO_R20 ___R_R21
#define ___ST_R1_TO_R21 ___ST_R1_TO_R20 ___W_R21
#if ___NB_GVM_REGS == 22
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R21
#define ___POP_REGS ___POP_R21_TO_R1 ___POP_R0
#else
#define ___PSR22 ___ps->r[22]
#if ___MAX_LOCAL_GVM_REGS > 22
#define ___D_R22 register ___WORD ___r22;
#define ___R_R22 ___r22=___PSR22;
#define ___W_R22 ___PSR22=___r22;
#define ___R22 ___r22
#else
#define ___D_R22
#define ___R_R22
#define ___W_R22
#define ___R22 ___PSR22
#endif
#define ___SET_R22(val)___R22=(val);
#define ___PUSH_R1_TO_R22 ___PUSH_R1_TO_R21 ___PUSH(___R22)
#define ___POP_R22_TO_R1 ___SET_R22(___POP)___POP_R21_TO_R1
#define ___LD_R1_TO_R22 ___D_R22 ___LD_R1_TO_R21 ___R_R22
#define ___ST_R1_TO_R22 ___ST_R1_TO_R21 ___W_R22
#if ___NB_GVM_REGS == 23
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R22
#define ___POP_REGS ___POP_R22_TO_R1 ___POP_R0
#else
#define ___PSR23 ___ps->r[23]
#if ___MAX_LOCAL_GVM_REGS > 23
#define ___D_R23 register ___WORD ___r23;
#define ___R_R23 ___r23=___PSR23;
#define ___W_R23 ___PSR23=___r23;
#define ___R23 ___r23
#else
#define ___D_R23
#define ___R_R23
#define ___W_R23
#define ___R23 ___PSR23
#endif
#define ___SET_R23(val)___R23=(val);
#define ___PUSH_R1_TO_R23 ___PUSH_R1_TO_R22 ___PUSH(___R23)
#define ___POP_R23_TO_R1 ___SET_R23(___POP)___POP_R22_TO_R1
#define ___LD_R1_TO_R23 ___D_R23 ___LD_R1_TO_R22 ___R_R23
#define ___ST_R1_TO_R23 ___ST_R1_TO_R22 ___W_R23
#if ___NB_GVM_REGS == 24
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R23
#define ___POP_REGS ___POP_R23_TO_R1 ___POP_R0
#else
#define ___PSR24 ___ps->r[24]
#if ___MAX_LOCAL_GVM_REGS > 24
#define ___D_R24 register ___WORD ___r24;
#define ___R_R24 ___r24=___PSR24;
#define ___W_R24 ___PSR24=___r24;
#define ___R24 ___r24
#else
#define ___D_R24
#define ___R_R24
#define ___W_R24
#define ___R24 ___PSR24
#endif
#define ___SET_R24(val)___R24=(val);
#define ___PUSH_R1_TO_R24 ___PUSH_R1_TO_R23 ___PUSH(___R24)
#define ___POP_R24_TO_R1 ___SET_R24(___POP)___POP_R23_TO_R1
#define ___LD_R1_TO_R24 ___D_R24 ___LD_R1_TO_R23 ___R_R24
#define ___ST_R1_TO_R24 ___ST_R1_TO_R23 ___W_R24
#if ___NB_GVM_REGS == 25
#define ___PUSH_REGS ___PUSH_R0 ___PUSH_R1_TO_R24
#define ___POP_REGS ___POP_R24_TO_R1 ___POP_R0
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
/*---------------------------------------------------------------------------*/
/* Labels and switches */
#define ___NOT(x)!x
#define ___AND(x,y)(x&&y)
#define ___MLBL(n)___lp+((n)*___LS*___WS)
#define ___LBL(n)___start+((___PH_LBL0-___HOST_LBL0+n)*___LS*___WS)
#define ___DEF_SLBL(n,lbl)___DEF_SW(n)___DEF_GLBL(lbl)
#define ___DEF_GLBL(lbl)lbl:
#define ___GOTO(lbl)goto lbl;
#define ___IF_GOTO(test,lbl)if (test) ___GOTO(lbl)
#define ___JUMPINT(nargs,prc,lbl)___SM(___GOTO(lbl),{nargs ___JUMP(prc)})
#define ___JUMPEXTPRM(nargs,val){nargs ___JUMPEXT(val)}
#define ___JUMPEXTNOTSAFE(nargs,val) \
{nargs ___SELF=val; \
___JUMPEXT(___LABEL_ENTRY_OR_DESCR(___SELF))}
#define ___JUMPPRM(nargs,val){nargs ___JUMP(val)}
#define ___JUMPNOTSAFE(nargs,val) \
{nargs ___SELF=val; \
___JUMP(___LABEL_ENTRY_OR_DESCR(___SELF))}
#define ___JUMPSAFE(nargs,val) ___JUMPNOTSAFE(nargs,val) /***************/
#define ___JUMPGENNOTSAFE(nargs,val)___JUMPNOTSAFE(nargs,val)
#define ___JUMPGLONOTSAFE(nargs,i,glo)___JUMPNOTSAFE(nargs,___GLO(i,glo))
#define ___JUMPGENSAFE(nargs,val) \
{nargs ___SELF=val; \
if (___EXPECT_TRUE(___PROCEDUREP(___SELF))) \
___JUMP(___LABEL_ENTRY_OR_DESCR(___SELF)) \
___ps->temp1=___SELF;___JUMPEXTPRM(___NOTHING,___GSTATE->handler_not_proc)}
#define ___JUMPGLOSAFE(nargs,i,glo) \
{nargs ___SELF=___GLO(i,glo); \
if (___EXPECT_TRUE(___PROCEDUREP(___SELF))) \
___JUMP(___LABEL_ENTRY_OR_DESCR(___SELF)) \
___ps->temp4=(___WORD)&___GLOSTRUCT(i,glo);___JUMPEXTPRM(___NOTHING,___GSTATE->handler_not_proc_glo)}
#ifdef ___NOT_SAFE_CALLS
#undef ___JUMPGENSAFE
#undef ___JUMPGLOSAFE
#define ___JUMPGENSAFE(nargs,val)___JUMPGENNOTSAFE(nargs,val)
#define ___JUMPGLOSAFE(nargs,i,glo)___JUMPGLONOTSAFE(nargs,i,glo)
#endif
#ifdef ___SAFE_CALLS
#undef ___JUMPGENNOTSAFE
#undef ___JUMPGLONOTSAFE
#define ___JUMPGENNOTSAFE(nargs,val)___JUMPGENSAFE(nargs,val)
#define ___JUMPGLONOTSAFE(nargs,i,glo)___JUMPGLOSAFE(nargs,i,glo)
#endif
#define ___BEGIN_SWITCH(x) switch (x) {
#define ___SWITCH_CASE_GOTO(obj,lbl) case (obj): ___GOTO(lbl)
#define ___END_SWITCH }
#define ___BEGIN_SWITCH_FIXNUM(x) { ___SCMOBJ ___sw = (x); \
if (___EXPECT_TRUE(___FIXNUMP(___sw))) switch(___INT(___sw)) {
#define ___SWITCH_FIXNUM_CASE_GOTO(obj,lbl) case (___INT(obj)): ___GOTO(lbl)
#define ___END_SWITCH_FIXNUM }}
#define ___BEGIN_SWITCH_CHAR(x) { ___SCMOBJ ___sw = (x); \
if (___EXPECT_TRUE(___CHARP(___sw))) switch(___INT(___sw)) {
#define ___SWITCH_CHAR_CASE_GOTO(obj,lbl) case (___INT(obj)): ___GOTO(lbl)
#define ___END_SWITCH_CHAR }}
#define ___BEGIN_SWITCH_SYMKEY(x,mod,guard) { ___SCMOBJ ___sw = (x); \
if (___EXPECT_TRUE(guard(___sw))) switch(___INT(___FIELD(___sw,___SYMKEY_HASH)) & ((mod)-1)) {
#define ___SWITCH_SYMKEY_CASE(hash) case (hash):
#define ___SWITCH_SYMKEY_CASE_GOTO(obj,lbl) ___IF_GOTO(___EQP(___sw,obj),lbl)
#define ___END_SWITCH_SYMKEY }}
/*---------------------------------------------------------------------------*/
#define ___PRC(i)___start+((i-___HOST_LBL0)*___LS*___WS)
#define ___SET_NARGS(n)___ps->na=n;
#define ___IF_NARGS_EQ(n,code)if (___EXPECT_TRUE(___ps->na==n)) {code} else
#define ___WRONG_NARGS(lbl,nb_req,nb_opt,nb_key) \
{___ps->temp1=___LBL(lbl); \