emacs/emacs-23.2-s390x.dif

116 lines
3.4 KiB
Plaintext
Raw Normal View History

--- src/lisp.h
+++ src/lisp.h 2010-10-18 13:46:05.240426350 +0000
@@ -375,7 +375,7 @@ enum pvec_type
For example, if tem is a Lisp_Object whose type is Lisp_Cons,
XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */
-#ifndef USE_LISP_UNION_TYPE
+#if !defined(USE_LISP_UNION_TYPE) && !defined(__s390x__)
/* Return a perfect hash of the Lisp_Object representation. */
#define XHASH(a) (a)
@@ -385,19 +385,31 @@ enum pvec_type
#define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1)
#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) & TYPEMASK))
#ifdef USE_2_TAGS_FOR_INTS
+#ifndef XINT
# define XINT(a) (((EMACS_INT) (a)) >> (GCTYPEBITS - 1))
+#endif
+#ifndef XUINT
# define XUINT(a) (((EMACS_UINT) (a)) >> (GCTYPEBITS - 1))
+#endif
# define make_number(N) (((EMACS_INT) (N)) << (GCTYPEBITS - 1))
#else
+#ifndef XINT
# define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
+#endif
+#ifndef XUINT
# define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS)
+#endif
# define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS)
#endif
+#ifndef XSET
#define XSET(var, type, ptr) \
(eassert (XTYPE (ptr) == 0), /* Check alignment. */ \
(var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))
+#endif
+#ifndef XPNTR
#define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK))
+#endif
#else /* not USE_LSB_TAG */
@@ -418,19 +430,29 @@ enum pvec_type
/* Extract the value of a Lisp_Object as a (un)signed integer. */
#ifdef USE_2_TAGS_FOR_INTS
+#ifndef XINT
# define XINT(a) ((((EMACS_INT) (a)) << (GCTYPEBITS - 1)) >> (GCTYPEBITS - 1))
+#endif
+#ifndef XUINT
# define XUINT(a) ((EMACS_UINT) ((a) & (1 + (VALMASK << 1))))
+#endif
# define make_number(N) ((((EMACS_INT) (N)) & (1 + (VALMASK << 1))))
#else
+#ifndef XINT
# define XINT(a) ((((EMACS_INT) (a)) << (BITS_PER_EMACS_INT - VALBITS)) \
>> (BITS_PER_EMACS_INT - VALBITS))
+#endif
+#ifndef XUINT
# define XUINT(a) ((EMACS_UINT) ((a) & VALMASK))
+#endif
# define make_number(N) \
((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
#endif
+#ifndef XSET
#define XSET(var, type, ptr) \
((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
+#endif
#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
@@ -457,14 +479,18 @@ enum pvec_type
#define XINT(a) ((a).s.val)
#endif /* EXPLICIT_SIGN_EXTEND */
+#ifndef XUINT
#define XUINT(a) ((a).u.val)
+#endif
#ifdef USE_LSB_TAG
+#ifndef XSET
# define XSET(var, vartype, ptr) \
(eassert ((((EMACS_UINT) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \
(var).u.val = ((EMACS_UINT) (ptr)) >> GCTYPEBITS, \
(var).u.type = ((char) (vartype)))
+#endif
/* Some versions of gcc seem to consider the bitfield width when issuing
the "cast to pointer from integer of different size" warning, so the
@@ -479,8 +505,10 @@ enum pvec_type
# define XFASTINT(a) ((a).i + 0)
# define XSETFASTINT(a, b) ((a).i = (b))
+#ifndef XSET
# define XSET(var, vartype, ptr) \
(((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
+#endif
#endif /* !USE_LSB_TAG */
--- src/m/ibms390x.h
+++ src/m/ibms390x.h 2009-08-11 12:47:07.000000000 +0000
@@ -78,7 +78,9 @@ NOTE-END */
working alloca function and it should be used. Undefine it if an
assembler-language alloca in the file alloca.s should be used. */
+#ifndef HAVE_ALLOCA
#define HAVE_ALLOCA
+#endif
/* On the 64 bit architecture, we can use 60 bits for addresses */