summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-06-07 15:41:51 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-06-07 15:44:15 -0700
commit302185156b6c20df5400a9956c09d6c24d29f652 (patch)
tree7d8e87dd55aaec9df6775bb0cc903cfba72cfed9 /src/lisp.h
parent8ea5d990f6315917bbd9c7b94856c52137405dad (diff)
downloademacs-302185156b6c20df5400a9956c09d6c24d29f652.tar.gz
Use __builtin_assume_aligned on untagged Lisp vals
* src/conf_post.h (__has_builtin, __builtin_assume_aligned): New macros, for compilers not already defining them. (__has_builtin___builtin_assume_aligned): New macro. * src/lisp.h (lisp_h_XUNTAG): Use __builtin_assume_aligned. This shrinks text space by 0.2% on x86-64 with GCC 6.1.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 1fc6130be0b..4042f4decb1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -341,7 +341,9 @@ error !;
(struct Lisp_Symbol *) ((intptr_t) XLI (a) - Lisp_Symbol \
+ (char *) lispsym))
# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK))
-# define lisp_h_XUNTAG(a, type) ((void *) (intptr_t) (XLI (a) - (type)))
+# define lisp_h_XUNTAG(a, type) \
+ __builtin_assume_aligned ((void *) (intptr_t) (XLI (a) - (type)), \
+ GCALIGNMENT)
#endif
/* When compiling via gcc -O0, define the key operations as macros, as