14467b65ff6e342ad4e8bef86f4e948f56e814bdfDaniel Dunbar/* ===-- int_lib.h - configuration header for compiler-rt  -----------------===
20e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *
30e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *                     The LLVM Compiler Infrastructure
40e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *
59ad441ffec97db647fee3725b3424284fb913e14Howard Hinnant * This file is dual licensed under the MIT and the University of Illinois Open
69ad441ffec97db647fee3725b3424284fb913e14Howard Hinnant * Source Licenses. See LICENSE.TXT for details.
70e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *
80e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan * ===----------------------------------------------------------------------===
90e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *
104467b65ff6e342ad4e8bef86f4e948f56e814bdfDaniel Dunbar * This file is a configuration header for compiler-rt.
110e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan * This file is not part of the interface of this library.
120e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan *
130e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan * ===----------------------------------------------------------------------===
140e4ad9c55a8554a220af3dc6b0fc4b0a5d64c025Edward O'Callaghan */
15b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
16b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#ifndef INT_LIB_H
17b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#define INT_LIB_H
18b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
190a3e35011f3c312f2b10f61e1540b058baff8cf6Daniel Dunbar/* Assumption: Signed integral is 2's complement. */
200a3e35011f3c312f2b10f61e1540b058baff8cf6Daniel Dunbar/* Assumption: Right shift of signed negative is arithmetic shift. */
210a3e35011f3c312f2b10f61e1540b058baff8cf6Daniel Dunbar/* Assumption: Endianness is little or big (not mixed). */
220a3e35011f3c312f2b10f61e1540b058baff8cf6Daniel Dunbar
230ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar/* ABI macro definitions */
240ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar
250ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar#if __ARM_EABI__
260ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar# define ARM_EABI_FNALIAS(aeabi_name, name)         \
270ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar  void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
280ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
290ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar#else
300ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar# define ARM_EABI_FNALIAS(aeabi_name, name)
310ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar# define COMPILER_RT_ABI
320ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar#endif
330ae9d258a484ba5ede154f729660ad21bd0ade2eDaniel Dunbar
342bf93403298e46a32423c9e66d26b5436d0748eaDaniel Dunbar/* Include the standard compiler builtin headers we use functionality from. */
35b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#include <limits.h>
36c31717b18c76a584eb36e49a31eff6810118b834Nick Kledzik#include <stdint.h>
3723d1542758b351aca24b4a99b4947e9e1fa97c43Daniel Dunbar#include <stdbool.h>
382bf93403298e46a32423c9e66d26b5436d0748eaDaniel Dunbar#include <float.h>
392bf93403298e46a32423c9e66d26b5436d0748eaDaniel Dunbar
40396a72f4854bdc09e465bf2ab96e62303850ee41Daniel Dunbar/* Include the commonly used internal type definitions. */
41396a72f4854bdc09e465bf2ab96e62303850ee41Daniel Dunbar#include "int_types.h"
42b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
43401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar/* Include internal utility function declarations. */
44401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar#include "int_util.h"
45401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar
460898ee9197a0049e479a12f4c5b3c65e3deaf03bEdward O'Callaghan#endif /* INT_LIB_H */
47