2009-10-28 01:48:46 +08:00
|
|
|
/* ===-- int_lib.h - configuration header for compiler-rt -----------------===
|
2009-08-05 09:47:29 +08:00
|
|
|
*
|
|
|
|
* The LLVM Compiler Infrastructure
|
|
|
|
*
|
2010-11-17 06:13:33 +08:00
|
|
|
* This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
* Source Licenses. See LICENSE.TXT for details.
|
2009-08-05 09:47:29 +08:00
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*
|
2009-10-28 01:48:46 +08:00
|
|
|
* This file is a configuration header for compiler-rt.
|
2009-08-05 09:47:29 +08:00
|
|
|
* This file is not part of the interface of this library.
|
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*/
|
2009-06-27 00:47:03 +08:00
|
|
|
|
|
|
|
#ifndef INT_LIB_H
|
|
|
|
#define INT_LIB_H
|
|
|
|
|
2011-11-16 02:34:44 +08:00
|
|
|
/* ABI macro definitions */
|
|
|
|
|
|
|
|
#if __ARM_EABI__
|
|
|
|
# define ARM_EABI_FNALIAS(aeabi_name, name) \
|
|
|
|
void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
|
|
|
|
# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
|
|
|
|
#else
|
|
|
|
# define ARM_EABI_FNALIAS(aeabi_name, name)
|
|
|
|
# define COMPILER_RT_ABI
|
|
|
|
#endif
|
|
|
|
|
2009-08-05 09:47:29 +08:00
|
|
|
/* Assumption: signed integral is 2's complement */
|
|
|
|
/* Assumption: right shift of signed negative is arithmetic shift */
|
2009-06-27 00:47:03 +08:00
|
|
|
|
|
|
|
#include <limits.h>
|
2011-01-08 03:09:06 +08:00
|
|
|
#include <stdint.h>
|
2009-08-06 03:06:50 +08:00
|
|
|
#include "endianness.h"
|
2009-08-04 11:30:10 +08:00
|
|
|
#include <math.h>
|
|
|
|
|
2010-04-01 01:00:48 +08:00
|
|
|
/* If compiling for kernel use, call panic() instead of abort(). */
|
|
|
|
#ifdef KERNEL_USE
|
|
|
|
extern void panic (const char *, ...);
|
|
|
|
#define compilerrt_abort() \
|
|
|
|
panic("%s:%d: abort in %s", __FILE__, __LINE__, __FUNCTION__)
|
|
|
|
#else
|
2010-04-01 01:00:45 +08:00
|
|
|
#define compilerrt_abort() abort()
|
2010-04-01 01:00:48 +08:00
|
|
|
#endif
|
2010-04-01 01:00:45 +08:00
|
|
|
|
2009-08-04 11:30:10 +08:00
|
|
|
#if !defined(INFINITY) && defined(HUGE_VAL)
|
|
|
|
#define INFINITY HUGE_VAL
|
2009-08-06 03:57:20 +08:00
|
|
|
#endif /* INFINITY */
|
2009-06-27 00:47:03 +08:00
|
|
|
|
2011-11-16 02:56:13 +08:00
|
|
|
/* Include the commonly used internal type definitions. */
|
|
|
|
#include "int_types.h"
|
2009-06-27 00:47:03 +08:00
|
|
|
|
2009-08-06 03:57:20 +08:00
|
|
|
#endif /* INT_LIB_H */
|