diff options
| author | Paul Eggert | 2011-11-10 00:14:27 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-11-10 00:14:27 -0800 |
| commit | 6a0bf43d7c5961297aa5024aec534e5bab73c8af (patch) | |
| tree | b823825dae7da76be667a0ddb157bff2bd029ac7 /src/s | |
| parent | 9a4de110224cc0ea32a9c680db3f4355484236a6 (diff) | |
| download | emacs-6a0bf43d7c5961297aa5024aec534e5bab73c8af.tar.gz emacs-6a0bf43d7c5961297aa5024aec534e5bab73c8af.zip | |
Standardize on VIRT_ADDR_VARIES behavior; otherwise, valgrind
does not work on some platforms. Problem reported by Andreas Schwab in
<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
* puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
is set, removing the need for VIRT_ADDRESS_VARIES.
(PURE_P): Use a more-efficient implementation that needs just one
comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
to 4 (xorl, subq, cmpq, setbe).
* alloc.c (pure): Always extern now, since that's the
VIRT_ADDR_VARIES behavior.
(PURE_POINTER_P): Use a single comparison, not two, for
consistency with the new puresize.h.
* lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
* m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
Remove VIRT_ADDR_VARIES no longer needed.
Diffstat (limited to 'src/s')
| -rw-r--r-- | src/s/cygwin.h | 3 | ||||
| -rw-r--r-- | src/s/hpux10-20.h | 8 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/s/cygwin.h b/src/s/cygwin.h index af5308ff7bb..8f5a0ab1fc7 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h | |||
| @@ -91,9 +91,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 91 | why it needed to be changed. */ | 91 | why it needed to be changed. */ |
| 92 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 92 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 93 | 93 | ||
| 94 | /* Virtual addresses of pure and impure space can vary, as on Windows. */ | ||
| 95 | #define VIRT_ADDR_VARIES | ||
| 96 | |||
| 97 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls | 94 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls |
| 98 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. | 95 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. |
| 99 | As malloc is not the Cygwin malloc, the Cygwin memalign always | 96 | As malloc is not the Cygwin malloc, the Cygwin memalign always |
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 1cd91a41b55..98bee64eb08 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h | |||
| @@ -100,14 +100,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 100 | header sections which lose when `static' is defined away, as it is | 100 | header sections which lose when `static' is defined away, as it is |
| 101 | on HP-UX. (You get duplicate symbol errors on linking). */ | 101 | on HP-UX. (You get duplicate symbol errors on linking). */ |
| 102 | #undef _FILE_OFFSET_BITS | 102 | #undef _FILE_OFFSET_BITS |
| 103 | |||
| 104 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 105 | pure and impure space as loaded can vary, and even their | ||
| 106 | relative order cannot be relied on. | ||
| 107 | |||
| 108 | Otherwise Emacs assumes that text space precedes data space, | ||
| 109 | numerically. */ | ||
| 110 | #define VIRT_ADDR_VARIES | ||
| 111 | 103 | ||
| 112 | /* The data segment on this machine always starts at address 0x40000000. */ | 104 | /* The data segment on this machine always starts at address 0x40000000. */ |
| 113 | #define DATA_SEG_BITS 0x40000000 | 105 | #define DATA_SEG_BITS 0x40000000 |