aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-01-17 20:54:23 -0800
committerPaul Eggert2011-01-17 20:54:23 -0800
commit7cae64b4eed192a49ea258089639ec44da6095e2 (patch)
treeb985de2a995674ad01ead7920526e80b9b4798b6 /src
parent9cc3a0c79c5a6af2691b2b566f8e3eb3654b806f (diff)
downloademacs-7cae64b4eed192a49ea258089639ec44da6095e2.tar.gz
emacs-7cae64b4eed192a49ea258089639ec44da6095e2.zip
Improve performance on non-GCC hosts with __aligned__.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/config.in3
-rw-r--r--src/lisp.h8
3 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f91ec458464..6e950569fbc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-01-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lisp.h (DECL_ALIGN): Define if HAVE_ATTRIBUTE_ALIGNED, not if
4 defined __GNUC__. ../configure now checks for this GCC feature,
5 which is now also supported by IBM and Oracle compilers.
6 (USE_LSB_TAG) [defined DECL_ALIGN]: Also define if defined __sun,
7 since Solaris malloc returns mult-of-8.
8
12011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> 92011-01-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * image.c (syms_of_image): Don't access XSYMBOL's internals directly. 11 * image.c (syms_of_image): Don't access XSYMBOL's internals directly.
diff --git a/src/config.in b/src/config.in
index d8a9722d316..62e83eea334 100644
--- a/src/config.in
+++ b/src/config.in
@@ -115,6 +115,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
115/* Define to 1 if ALSA is available. */ 115/* Define to 1 if ALSA is available. */
116#undef HAVE_ALSA 116#undef HAVE_ALSA
117 117
118/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
119#undef HAVE_ATTRIBUTE_ALIGNED
120
118/* Define to 1 if strtold conforms to C99. */ 121/* Define to 1 if strtold conforms to C99. */
119#undef HAVE_C99_STRTOLD 122#undef HAVE_C99_STRTOLD
120 123
diff --git a/src/lisp.h b/src/lisp.h
index d00dbdc5def..5424bf7b83d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -122,16 +122,18 @@ extern void die (const char *, const char *, int) NO_RETURN;
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