aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c6
-rw-r--r--src/lisp.h24
2 files changed, 4 insertions, 26 deletions
diff --git a/src/alloc.c b/src/alloc.c
index b5b6dc2f05f..a9cdd77ef2e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -558,16 +558,12 @@ PNTR_ADD (char *p, EMACS_UINT i)
558 - ((EMACS_UINT) Lisp_Symbol << (USE_LSB_TAG ? 0 : VALBITS)))) \ 558 - ((EMACS_UINT) Lisp_Symbol << (USE_LSB_TAG ? 0 : VALBITS)))) \
559 : (char *) XLP (o) - (XLI (o) & ~VALMASK))) 559 : (char *) XLP (o) - (XLI (o) & ~VALMASK)))
560 560
561static ATTRIBUTE_UNUSED void * 561static ATTRIBUTE_NO_SANITIZE_UNDEFINED void *
562XPNTR (Lisp_Object a) 562XPNTR (Lisp_Object a)
563{ 563{
564 return macro_XPNTR (a); 564 return macro_XPNTR (a);
565} 565}
566 566
567#if DEFINE_KEY_OPS_AS_MACROS
568# define XPNTR(a) macro_XPNTR (a)
569#endif
570
571static void 567static void
572XFLOAT_INIT (Lisp_Object f, double n) 568XFLOAT_INIT (Lisp_Object f, double n)
573{ 569{
diff --git a/src/lisp.h b/src/lisp.h
index c2cb89de9d5..2d250fc52ce 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -421,19 +421,6 @@ typedef EMACS_INT Lisp_Word;
421 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) 421 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
422# define lisp_h_XFIXNAT(a) XFIXNUM (a) 422# define lisp_h_XFIXNAT(a) XFIXNUM (a)
423# define lisp_h_XFIXNUM(a) (XLI (a) >> INTTYPEBITS) 423# define lisp_h_XFIXNUM(a) (XLI (a) >> INTTYPEBITS)
424# ifdef __CHKP__
425# define lisp_h_XSYMBOL(a) \
426 (eassert (SYMBOLP (a)), \
427 (struct Lisp_Symbol *) ((char *) XUNTAG (a, Lisp_Symbol, \
428 struct Lisp_Symbol) \
429 + (intptr_t) lispsym))
430# else
431 /* If !__CHKP__ this is equivalent, and is a bit faster as of GCC 7. */
432# define lisp_h_XSYMBOL(a) \
433 (eassert (SYMBOLP (a)), \
434 (struct Lisp_Symbol *) ((intptr_t) XLI (a) - Lisp_Symbol \
435 + (char *) lispsym))
436# endif
437# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) 424# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK))
438#endif 425#endif
439 426
@@ -479,7 +466,6 @@ typedef EMACS_INT Lisp_Word;
479# define make_fixnum(n) lisp_h_make_fixnum (n) 466# define make_fixnum(n) lisp_h_make_fixnum (n)
480# define XFIXNAT(a) lisp_h_XFIXNAT (a) 467# define XFIXNAT(a) lisp_h_XFIXNAT (a)
481# define XFIXNUM(a) lisp_h_XFIXNUM (a) 468# define XFIXNUM(a) lisp_h_XFIXNUM (a)
482# define XSYMBOL(a) lisp_h_XSYMBOL (a)
483# define XTYPE(a) lisp_h_XTYPE (a) 469# define XTYPE(a) lisp_h_XTYPE (a)
484# endif 470# endif
485#endif 471#endif
@@ -1023,21 +1009,17 @@ INLINE bool
1023} 1009}
1024 1010
1025INLINE struct Lisp_Symbol * ATTRIBUTE_NO_SANITIZE_UNDEFINED 1011INLINE struct Lisp_Symbol * ATTRIBUTE_NO_SANITIZE_UNDEFINED
1026(XSYMBOL) (Lisp_Object a) 1012XSYMBOL (Lisp_Object a)
1027{ 1013{
1028#if USE_LSB_TAG
1029 return lisp_h_XSYMBOL (a);
1030#else
1031 eassert (SYMBOLP (a)); 1014 eassert (SYMBOLP (a));
1032 intptr_t i = (intptr_t) XUNTAG (a, Lisp_Symbol, struct Lisp_Symbol); 1015 intptr_t i = (intptr_t) XUNTAG (a, Lisp_Symbol, struct Lisp_Symbol);
1033 void *p = (char *) lispsym + i; 1016 void *p = (char *) lispsym + i;
1034# ifdef __CHKP__ 1017#ifdef __CHKP__
1035 /* Bypass pointer checking. Although this could be improved it is 1018 /* Bypass pointer checking. Although this could be improved it is
1036 probably not worth the trouble. */ 1019 probably not worth the trouble. */
1037 p = __builtin___bnd_set_ptr_bounds (p, sizeof (struct Lisp_Symbol)); 1020 p = __builtin___bnd_set_ptr_bounds (p, sizeof (struct Lisp_Symbol));
1038# endif
1039 return p;
1040#endif 1021#endif
1022 return p;
1041} 1023}
1042 1024
1043INLINE Lisp_Object 1025INLINE Lisp_Object