The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
/*
 * jit-defs.h - Define the primitive numeric types for use by the JIT.
 *
 * Copyright (C) 2004  Southern Storm Software, Pty Ltd.
 *
 * The libjit library is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * The libjit library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the libjit library.  If not, see
 * <http://www.gnu.org/licenses/>.
 */

#ifndef	_JIT_DEFS_H
#define	_JIT_DEFS_H

#ifdef	__cplusplus
extern	"C" {
#endif

#ifdef _MSC_VER
#define JIT_EXPORT_DATA extern __declspec(dllimport)
#else
#define JIT_EXPORT_DATA extern
#endif

@JIT_INT64_INCLUDE@

typedef @JITINT8@ jit_sbyte;
typedef @JITUINT8@ jit_ubyte;
typedef @JITINT16@ jit_short;
typedef unsigned @JITINT16@ jit_ushort;
typedef @JITINT32@ jit_int;
typedef unsigned @JITINT32@ jit_uint;
typedef @JITNATIVEINT@ jit_nint;
typedef unsigned @JITNATIVEINT@ jit_nuint;
#if defined(__cplusplus) && defined(__GNUC__)
typedef @JITINT64CXX@ jit_long;
typedef unsigned @JITINT64CXX@ jit_ulong;
#else
typedef @JITINT64@ jit_long;
typedef unsigned @JITINT64@ jit_ulong;
#endif
typedef @JITFLOAT32@ jit_float32;
typedef @JITFLOAT64@ jit_float64;
typedef @JITNATIVEFLOAT@ jit_nfloat;
typedef void *jit_ptr;

#define	@JITNATIVEINTDEFINE@ 1
@JITNFLOATISDOUBLE@

#if defined(__cplusplus) && defined(__GNUC__)
#define	JIT_NOTHROW		@JITTHROWIDIOM@
#else
#define	JIT_NOTHROW
#endif

#define	jit_min_int		(((jit_int)1) << (sizeof(jit_int) * 8 - 1))
#define	jit_max_int		((jit_int)(~jit_min_int))
#define	jit_max_uint	((jit_uint)(~((jit_uint)0)))
#define	jit_min_long	(((jit_long)1) << (sizeof(jit_long) * 8 - 1))
#define	jit_max_long	((jit_long)(~jit_min_long))
#define	jit_max_ulong	((jit_ulong)(~((jit_ulong)0)))

#ifdef	__cplusplus
};
#endif

#endif /* _JIT_DEFS_H */