/* Provide Declarations */ #include #include /* get a declaration for alloca */ #if defined(__CYGWIN__) || defined(__MINGW32__) extern void *_alloca(unsigned long); #define alloca(x) _alloca(x) #elif defined(__APPLE__) extern void *__builtin_alloca(unsigned long); #define alloca(x) __builtin_alloca(x) #elif defined(__sun__) #if defined(__sparcv9) extern void *__builtin_alloca(unsigned long); #else extern void *__builtin_alloca(unsigned int); #endif #define alloca(x) __builtin_alloca(x) #elif defined(__FreeBSD__) || defined(__OpenBSD__) #define alloca(x) __builtin_alloca(x) #elif !defined(_MSC_VER) #include #endif #ifndef __GNUC__ /* Can only support "linkonce" vars with GCC */ #define __attribute__(X) #endif #if defined(__GNUC__) && defined(__APPLE_CC__) #define __ATTRIBUTE_WEAK__ #elif defined(__GNUC__) #define __ATTRIBUTE_WEAK__ __attribute__((weak)) #else #define __ATTRIBUTE_WEAK__ #endif #ifdef __GNUC__ #define LLVM_NAN(NanStr) __builtin_nan(NanStr) /* Double */ #define LLVM_NANF(NanStr) __builtin_nanf(NanStr) /* Float */ #define LLVM_NANS(NanStr) __builtin_nans(NanStr) /* Double */ #define LLVM_NANSF(NanStr) __builtin_nansf(NanStr) /* Float */ #define LLVM_INF __builtin_inf() /* Double */ #define LLVM_INFF __builtin_inff() /* Float */ #define LLVM_PREFETCH(addr,rw,locality) __builtin_prefetch(addr,rw,locality) #define __ATTRIBUTE_CTOR__ __attribute__((constructor)) #define __ATTRIBUTE_DTOR__ __attribute__((destructor)) #else #define LLVM_NAN(NanStr) ((double)0.0) /* Double */ #define LLVM_NANF(NanStr) 0.0F /* Float */ #define LLVM_NANS(NanStr) ((double)0.0) /* Double */ #define LLVM_NANSF(NanStr) 0.0F /* Float */ #define LLVM_INF ((double)0.0) /* Double */ #define LLVM_INFF 0.0F /* Float */ #define LLVM_PREFETCH(addr,rw,locality) /* PREFETCH */ #define __ATTRIBUTE_CTOR__ #define __ATTRIBUTE_DTOR__ #endif #define CODE_FOR_MAIN() /* Any target-specific code for main()*/ #if defined(__GNUC__) && !defined(__llvm__) #if defined(i386) || defined(__i386__) || defined(__i386) || defined(__x86_64__) #undef CODE_FOR_MAIN #define CODE_FOR_MAIN() \ {short F;__asm__ ("fnstcw %0" : "=m" (*&F)); \ F=(F&~0x300)|0x200;__asm__("fldcw %0"::"m"(*&F));} #endif #endif #ifndef __cplusplus typedef unsigned char bool; #endif /* Support for floating point constants */ typedef unsigned long long ConstantDoubleTy; typedef unsigned int ConstantFloatTy; /* Global Declarations */ /* Function Declarations */ double fmod(double, double); float fmodf(float, float); unsigned test(unsigned ltmp_0_1); signed char *malloc(); void free(signed char *); void abort(void); void write(int , signed char *, int ); /* Function Bodies */ unsigned test(unsigned ltmp_0_1) { return (ltmp_0_1 + 42u); }