From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: start_of_data and RISCOS Date: Sun, 21 Jul 2002 15:31:51 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1027279963 24395 127.0.0.1 (21 Jul 2002 19:32:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 21 Jul 2002 19:32:43 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17WMRc-0006LI-00 for ; Sun, 21 Jul 2002 21:32:40 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17WMf6-0005Sw-00 for ; Sun, 21 Jul 2002 21:46:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17WMRb-0001pQ-00; Sun, 21 Jul 2002 15:32:39 -0400 Original-Received: from 208-59-178-90.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([208.59.178.90] helo=raeburn.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17WMQq-0001ju-00 for ; Sun, 21 Jul 2002 15:31:52 -0400 Original-Received: from kal-el.raeburn.org (mail@kal-el.raeburn.org [18.101.0.230]) by raeburn.org (8.11.3/8.11.3) with ESMTP id g6LJVpf15781; Sun, 21 Jul 2002 15:31:51 -0400 (EDT) Original-Received: from raeburn by kal-el.raeburn.org with local (Exim 3.35 #1 (Debian)) id 17WMQp-00074O-00; Sun, 21 Jul 2002 15:31:51 -0400 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5947 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5947 Currently the preference order for defining start_of_data is to use the address of "etext" if BSD_SYSTEM is defined and DATA_SEG_BITS is not, regardless of whether DATA_START is defined. Since defining DATA_SEG_BITS also turns on the inclusive-or every time a Lisp_Object handle is turned into a pointer, I'd like to reverse that -- use DATA_START for start_of_data if it's defined, otherwise consider doing the etext bit. On a platform like the Alpha, where DATA_START is some large constant but all the DATA_SEG_BITS are allowed in the value of a Lisp_Object, it's a waste of cycles. The question is, are there any configurations that will break because of this? They'd have to be ones defining BSD_SYSTEM and DATA_START but not DATA_SEG_BITS. Perhaps an OS configuration simply leaves out an "#undef DATA_START" because it just worked to let BSD_SYSTEM dominate, and the DATA_START references in unexalpha.c and unexmips.c weren't used? Very few configurations define DATA_START but not DATA_SEG_BITS: m/intel386.h, if WINDOWSNT is defined m/mips.h, if not __linux__ m/windowsnt.h I hardly expect the Windows configuration to define BSD_SYSTEM, but the wide variety of MIPS operating systems does include some BSD-like ones. I've done some poking around at the config files, and it looks like MIPS running RISCOS 4 or 5 in BSD mode is the interesting case. Other MIPS configurations don't define BSD_SYSTEM, or they use a different m/ file which defines DATA_SEG_BITS or doesn't define DATA_START. But under RISCOS, it may be the case that DATA_START and BSD_SYSTEM are defined and DATA_SEG_BITS is not, so that it might be using "&etext" for start_of_data even though DATA_START is 0x800000. Does anyone have access to a RISCOS system who could check this, and see if my patch below will break things? If it does break things, it might be sufficient to #undef DATA_START on RISCOS, but that may break unexmips.c.... Ken Index: mem-limits.h =================================================================== RCS file: /cvsroot/emacs/emacs/src/mem-limits.h,v retrieving revision 1.29 diff -p -u -r1.29 mem-limits.h --- mem-limits.h 11 Dec 2001 22:18:16 -0000 1.29 +++ mem-limits.h 21 Jul 2002 18:33:44 -0000 @@ -79,10 +79,16 @@ extern POINTER start_of_data (); #define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS) #endif +#ifdef DATA_START +#define start_of_data() ((char *)DATA_START) +#endif + #ifdef BSD_SYSTEM #ifndef DATA_SEG_BITS +#ifndef DATA_START extern char etext; #define start_of_data() &etext +#endif #endif #endif Index: sysdep.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/sysdep.c,v retrieving revision 1.241 diff -p -u -r1.241 sysdep.c --- sysdep.c 21 Jul 2002 14:17:19 -0000 1.241 +++ sysdep.c 21 Jul 2002 18:33:44 -0000 @@ -2237,6 +2237,7 @@ start_of_text () * */ +#ifndef start_of_data char * start_of_data () { @@ -2259,6 +2260,7 @@ start_of_data () #endif /* ORDINARY_LINK */ #endif /* DATA_START */ } +#endif /* start_of_data */ #endif /* NEED_STARTS (not CANNOT_DUMP or not SYSTEM_MALLOC) */ /* init_system_name sets up the string for the Lisp function