3 * File name: ir/adt/host.h
4 * Purpose: Declarations describing the host machine and C compiler.
5 * Author: Markus Armbruster
7 * Created: 1999 by getting from fiasco
9 * Copyright: (c) 1995, 1996 Markus Armbruster
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
22 /** A size handled efficiently by malloc(), at least 1K. */
23 #define PREF_MALLOC_SIZE 2048
26 /** A wrapper around GNU C's __attribute__ */
28 /* According to the documentation, the attributes we are interested in
29 work with 2.5, but we encountered trouble before 2.7. */
30 #if defined (__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 7
31 # define HAVE_ATTRIBUTE 1
32 # define ATTRIBUTE(attrs) __attribute__ (attrs)
34 # define ATTRIBUTE(attrs)
40 /** A type that has most constrained alignment. */
45 } aligned_type ATTRIBUTE ((aligned));
47 /** Inquiring about the alignment of a type. */
49 # define ALIGNOF(type) __alignof__ (type)
51 # define ALIGNOF(type) offsetof (struct { char c; type d; }, d)
54 /** Maximal alignment required for any type. */
55 #define MAX_ALIGN ALIGNOF (aligned_type)