1/* 2 * Copyright (c) 2016, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#if !defined(ECLIPSECLP_SIZES_H_) 11#define ECLIPSECLP_SIZES_H_ 1 12 13/* 14 * Eclipse needs to know the exact sizes of various types at compile time. Thus, 15 * we cannot just use sizeof but have to define the sizes here. 16 */ 17 18/* Type sizes. */ 19// #undef SIZEOF_INT 20// #undef SIZEOF_LONG 21// #undef SIZEOF_CHAR_P 22// #undef SIZEOF_LONG_P 23#if defined(__x86_64__) 24# define SIZEOF_INT 4 25# define SIZEOF_LONG 8 26# define SIZEOF_CHAR_P 8 27# define SIZEOF_LONG_P 8 28# if !defined(_FPU_SETCW) 29# define _FPU_SETCW 30# endif 31# if !defined(_FPU_RC_DOWN) 32# define _FPU_RC_DOWN 33# endif 34# if !defined(__x86_64) 35# define __x86_64 36# endif 37# if !defined(__SSE_MATH__) 38# define __SSE_MATH__ 39# endif 40#elif defined(__x86__) 41# define SIZEOF_INT 4 42# define SIZEOF_LONG 4 43# define SIZEOF_CHAR_P 4 44# define SIZEOF_LONG_P 4 45# if !defined(_FPU_RC_DOWN) 46# define _FPU_RC_DOWN 47# endif 48#elif defined(__arm__) 49# define SIZEOF_INT 4 50# define SIZEOF_LONG 4 51# define SIZEOF_CHAR_P 4 52# define SIZEOF_LONG_P 4 53#elif defined(__aarch64__) 54# define SIZEOF_INT 4 55# define SIZEOF_LONG 8 56# define SIZEOF_CHAR_P 8 57# define SIZEOF_LONG_P 8 58#else 59# error Unknown architecture 60#endif 61 62#endif 63