diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2010-12-03 21:55:23 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2010-12-03 21:55:23 +0100 |
commit | e5bd16703f901d9c8e7bc29da98e761f768161fc (patch) | |
tree | 20b8cb23b9eab33c0889f0b7ad9a85bf218560f5 | |
parent | 5ed63ab8a969472b2c4441a58b83fe228d1fe98a (diff) |
Remove EXPLICIT_SIGN_EXTEND.
* lisp.h (union Lisp_Object): Explicitly declare signedness of
bit-field.
(XINT): Remove variant for EXPLICIT_SIGN_EXTEND.
* m/alpha.h (EXPLICIT_SIGN_EXTEND): Don't define.
* m/amdx86-64.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ia64.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ibms390.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ibms390x.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/iris4d.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/m68k.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/sparc.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/template.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/hp800.h: Remove file.
* m/mips.h: Remove file.
* CPP-DEFINES (EXPLICIT_SIGN_EXTEND): Remove.
-rw-r--r-- | admin/CPP-DEFINES | 1 | ||||
-rw-r--r-- | admin/ChangeLog | 4 | ||||
-rw-r--r-- | src/ChangeLog | 17 | ||||
-rw-r--r-- | src/lisp.h | 20 | ||||
-rw-r--r-- | src/m/alpha.h | 7 | ||||
-rw-r--r-- | src/m/amdx86-64.h | 7 | ||||
-rw-r--r-- | src/m/hp800.h | 29 | ||||
-rw-r--r-- | src/m/ia64.h | 7 | ||||
-rw-r--r-- | src/m/ibms390.h | 7 | ||||
-rw-r--r-- | src/m/ibms390x.h | 7 | ||||
-rw-r--r-- | src/m/iris4d.h | 7 | ||||
-rw-r--r-- | src/m/m68k.h | 7 | ||||
-rw-r--r-- | src/m/mips.h | 29 | ||||
-rw-r--r-- | src/m/sparc.h | 4 | ||||
-rw-r--r-- | src/m/template.h | 7 |
15 files changed, 27 insertions, 133 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index b5f4d555ad..0346bb2e62 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -62,7 +62,6 @@ SIGTYPE SYSTEM_TYPE ** Machine specific macros, decribed in detail in src/m/template.h -EXPLICIT_SIGN_EXTEND LOAD_AVE_CVT LOAD_AVE_TYPE VIRT_ADDR_VARIES diff --git a/admin/ChangeLog b/admin/ChangeLog index 6d114eae00..f5c52f0937 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2010-12-03 Andreas Schwab <schwab@linux-m68k.org> + + * CPP-DEFINES (EXPLICIT_SIGN_EXTEND): Remove. + 2010-10-12 Glenn Morris <rgm@gnu.org> * notes/nextstep: Move here from ../nextstep/DEV-NOTES. diff --git a/src/ChangeLog b/src/ChangeLog index 6213a2d468..732c902b41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2010-12-03 Andreas Schwab <schwab@linux-m68k.org> + + * lisp.h (union Lisp_Object): Explicitly declare signedness of + bit-field. + (XINT): Remove variant for EXPLICIT_SIGN_EXTEND. + * m/alpha.h (EXPLICIT_SIGN_EXTEND): Don't define. + * m/amdx86-64.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/ia64.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/ibms390.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/ibms390x.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/iris4d.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/m68k.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/sparc.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/template.h (EXPLICIT_SIGN_EXTEND): Likewise. + * m/hp800.h: Remove file. + * m/mips.h: Remove file. + 2010-12-03 Jan Djärv <jan.h.d@swipnet.se> * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background diff --git a/src/lisp.h b/src/lisp.h index b6ae2dcd07..7c3c1f3780 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -267,7 +267,9 @@ union Lisp_Object struct { - EMACS_INT val : VALBITS; + /* Use explict signed, the signedness of a bit-field of type + int is implementation defined. */ + signed EMACS_INT val : VALBITS; enum Lisp_Type type : GCTYPEBITS; } s; struct @@ -290,7 +292,9 @@ union Lisp_Object struct { enum Lisp_Type type : GCTYPEBITS; - EMACS_INT val : VALBITS; + /* Use explict signed, the signedness of a bit-field of type + int is implementation defined. */ + signed EMACS_INT val : VALBITS; } s; struct { @@ -447,20 +451,8 @@ enum pvec_type #endif #define XHASH(a) ((a).i) - #define XTYPE(a) ((enum Lisp_Type) (a).u.type) - -#ifdef EXPLICIT_SIGN_EXTEND -/* Make sure we sign-extend; compilers have been known to fail to do so. - We additionally cast to EMACS_INT since it seems that some compilers - have been known to fail to do so, even though the bitfield is declared - as EMACS_INT already. */ -#define XINT(a) ((((EMACS_INT) (a).s.val) << (BITS_PER_EMACS_INT - VALBITS)) \ - >> (BITS_PER_EMACS_INT - VALBITS)) -#else #define XINT(a) ((a).s.val) -#endif /* EXPLICIT_SIGN_EXTEND */ - #define XUINT(a) ((a).u.val) #ifdef USE_LSB_TAG diff --git a/src/m/alpha.h b/src/m/alpha.h index 3b6d7da92d..0e7d182fee 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h @@ -30,13 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ /* __alpha defined automatically */ -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index 30aa267871..867d65f660 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h @@ -31,13 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define EMACS_INT long #define EMACS_UINT unsigned long -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/hp800.h b/src/m/hp800.h deleted file mode 100644 index 9998f701a6..0000000000 --- a/src/m/hp800.h +++ /dev/null @@ -1,29 +0,0 @@ -/* machine description file for hp9000 series 800 machines. - -Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2010 Free Software Foundation, Inc. - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ - -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - -/* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c - (do not change this comment) */ diff --git a/src/m/ia64.h b/src/m/ia64.h index bbf09ac878..e9cf07b678 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -31,13 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define EMACS_INT long #define EMACS_UINT unsigned long -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/ibms390.h b/src/m/ibms390.h index 0acc826a1e..1a19f7233a 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h @@ -19,13 +19,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index 6cbfbbcdbd..2ef14a2294 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h @@ -27,13 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define EMACS_INT long #define EMACS_UINT unsigned long -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#undef EXPLICIT_SIGN_EXTEND - /* On the 64 bit architecture, we can use 60 bits for addresses */ #define VALBITS 60 diff --git a/src/m/iris4d.h b/src/m/iris4d.h index 31f08d05cf..9e80324ee9 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h @@ -19,13 +19,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT). */ diff --git a/src/m/m68k.h b/src/m/m68k.h index 8d53424cce..df930d511f 100644 --- a/src/m/m68k.h +++ b/src/m/m68k.h @@ -24,13 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define m68k #endif -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - #ifdef GNU_LINUX #ifdef __ELF__ #define DATA_SEG_BITS 0x80000000 diff --git a/src/m/mips.h b/src/m/mips.h deleted file mode 100644 index b3a754c2b6..0000000000 --- a/src/m/mips.h +++ /dev/null @@ -1,29 +0,0 @@ -/* m- file for Mips machines. - -Copyright (C) 1987, 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ - -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - -/* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee - (do not change this comment) */ diff --git a/src/m/sparc.h b/src/m/sparc.h index 26ca3caaeb..fc5ea95c0e 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -20,10 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ /* __sparc__ is defined by the compiler by default. */ -/* XINT must explicitly sign-extend - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/template.h b/src/m/template.h index 4efc9158a4..0d8e78622a 100644 --- a/src/m/template.h +++ b/src/m/template.h @@ -22,13 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ does not define it automatically. Ones defined so far include m68k and many others */ -/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields - are always unsigned. - - This flag only matters if you use USE_LISP_UNION_TYPE. */ -#define EXPLICIT_SIGN_EXTEND - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long |