comparison src/lisp.h @ 112352:19348bd13f81

Improve performance on non-GCC hosts with __aligned__.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 17 Jan 2011 20:54:23 -0800
parents 28ca83ef1128
children 011b1eb5c384
comparison
equal deleted inserted replaced
112351:176503f61eb1 112352:19348bd13f81
120 /* First, try and define DECL_ALIGN(type,var) which declares a static 120 /* First, try and define DECL_ALIGN(type,var) which declares a static
121 variable VAR of type TYPE with the added requirement that it be 121 variable VAR of type TYPE with the added requirement that it be
122 TYPEBITS-aligned. */ 122 TYPEBITS-aligned. */
123 #ifndef NO_DECL_ALIGN 123 #ifndef NO_DECL_ALIGN
124 # ifndef DECL_ALIGN 124 # ifndef DECL_ALIGN
125 /* What compiler directive should we use for non-gcc compilers? -stef */ 125 # if HAVE_ATTRIBUTE_ALIGNED
126 # if defined (__GNUC__)
127 # define DECL_ALIGN(type, var) \ 126 # define DECL_ALIGN(type, var) \
128 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var 127 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
128 # else
129 /* What directives do other compilers use? */
129 # endif 130 # endif
130 # endif 131 # endif
131 #endif 132 #endif
132 133
133 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ 134 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */
134 #if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined DARWIN_OS 135 #if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
136 || defined DARWIN_OS || defined __sun)
135 /* We also need to be able to specify mult-of-8 alignment on static vars. */ 137 /* We also need to be able to specify mult-of-8 alignment on static vars. */
136 # if defined DECL_ALIGN 138 # if defined DECL_ALIGN
137 # define USE_LSB_TAG 139 # define USE_LSB_TAG
138 # endif 140 # endif
139 #endif 141 #endif