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: Re: 64-bit lossage Date: Sun, 21 Jul 2002 07:35:21 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027251464 14027 127.0.0.1 (21 Jul 2002 11:37:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 21 Jul 2002 11:37:44 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17WF1z-0003e8-00 for ; Sun, 21 Jul 2002 13:37:43 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17WFFJ-00035M-00 for ; Sun, 21 Jul 2002 13:51:29 +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 17WF0l-0003qE-00; Sun, 21 Jul 2002 07:36:27 -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 17WEzo-0003p2-00 for ; Sun, 21 Jul 2002 07:35:28 -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 g6LBZMf11799; Sun, 21 Jul 2002 07:35:22 -0400 (EDT) Original-Received: from raeburn by kal-el.raeburn.org with local (Exim 3.35 #1 (Debian)) id 17WEzh-0006sx-00; Sun, 21 Jul 2002 07:35:21 -0400 Original-To: Dave Love In-Reply-To: (Dave Love's message of "01 Jul 2002 17:18:21 +0100") Original-Lines: 165 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (i686-pc-linux-gnu) 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:5943 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5943 Dave Love writes: > It looks as though the current code is broken generally on 64-bit > systems (by induction from alpha-osf and mips-sgi, so not Which OS are you using on the Alpha? On the 5.1 machine I've got at work, with a source tree I've already started banging on for some of the lisp implementation issues I was complaining about recently, I'm having some problems with mmap. Not using mmap for buffer storage seems to fix the problem for the moment, but I'll investigate that further. This debugging is more tedious than expected -- no dbx license installed, and gdb-3.1 doesn't work. Let's hear it for printf! :-) I also noticed a number of compiler warnings about pointer mismatches where the pointer targets were of the wrong type (e.g., int vs long); I'll try to clean some of that up later. But they kind of get lost in the long list of complaints about mixing "char *" and "unsigned char *". > endian-related). I don't know since when, but it predates the > emacs-unicode branch, which it's hampering me working on. The symptom > is a crash (segv, if I remember correctly) in GC during dumping. My problem showed up in some buffer manipulation code, so maybe it's not the same problem. But like I said, I've already started making other changes in my tree.... Could you try the patch below? If it works, try re-enabling the use of mmap and see if that part is working on your system. It's not ready to be checked in, but your results will let me know if I'm on the right track. 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 11:18:17 -0000 @@ -81,8 +81,10 @@ extern POINTER start_of_data (); #ifdef BSD_SYSTEM #ifndef DATA_SEG_BITS +#ifndef DATA_START extern char etext; #define start_of_data() &etext +#endif #endif #endif Index: puresize.h =================================================================== RCS file: /cvsroot/emacs/emacs/src/puresize.h,v retrieving revision 1.65 diff -p -u -r1.65 puresize.h --- puresize.h 16 Apr 2002 17:27:42 -0000 1.65 +++ puresize.h 21 Jul 2002 11:18:17 -0000 @@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (830000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (930000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ Index: m/alpha.h =================================================================== RCS file: /cvsroot/emacs/emacs/src/m/alpha.h,v retrieving revision 1.45 diff -p -u -r1.45 alpha.h --- m/alpha.h 15 Apr 2002 13:16:00 -0000 1.45 +++ m/alpha.h 21 Jul 2002 11:18:17 -0000 @@ -29,8 +29,6 @@ NOTE-END */ -#define BITS_PER_LONG 64 -#define BITS_PER_EMACS_INT 64 #ifndef _LP64 #define _LP64 /* This doesn't appear to be necessary on OSF 4/5 -- fx. */ @@ -56,14 +54,8 @@ NOTE-END /* Use type EMACS_INT rather than a union, to represent Lisp_Object */ /* This is desirable for most machines. */ - #define NO_UNION_TYPE -/* Define the type to use. */ -#define EMACS_INT long -#define EMACS_UINT unsigned long -#define SPECIAL_EMACS_INT - /* 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. @@ -113,6 +105,7 @@ NOTE-END #ifdef __ELF__ #undef UNEXEC #define UNEXEC unexelf.o +#define DATA_START 0x140000000 #endif #ifndef __ELF__ @@ -122,11 +115,6 @@ NOTE-END #define TEXT_START 0x120000000 #define DATA_START 0x140000000 -/* This is necessary for mem-limits.h, so that start_of_data gives - the correct value */ - -#define DATA_SEG_BITS 0x140000000 - /* The program to be used for unexec. */ #define UNEXEC unexalpha.o @@ -164,28 +152,6 @@ NOTE-END #define LINUX_SBRK_BUG #endif - -#define PNTR_COMPARISON_TYPE unsigned long - -/* On the 64 bit architecture, we can use 60 bits for addresses */ - -#define VALBITS 60 - - -/* This definition of MARKBIT is necessary because of the comparison of - ARRAY_MARK_FLAG and MARKBIT in an #if in lisp.h, which cpp doesn't like. */ - -#define MARKBIT 0x8000000000000000L - - -/* Define XINT and XUINT so that they can take arguments of type int */ - -#define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS)) -#define XUINT(a) ((long) (a) & VALMASK) - -/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ - -#define XPNTR(a) XUINT (a) #ifndef NOT_C_CODE /* We need these because pointers are larger than the default ints. */ Index: s/osf5-0.h =================================================================== RCS file: /cvsroot/emacs/emacs/src/s/osf5-0.h,v retrieving revision 1.6 diff -p -u -r1.6 osf5-0.h --- s/osf5-0.h 10 Oct 2001 12:21:58 -0000 1.6 +++ s/osf5-0.h 21 Jul 2002 11:18:17 -0000 @@ -24,4 +24,4 @@ /* We have missing/inconsistent prototypes on 5.0, at least. */ #define INHIBIT_X11R6_XIM -#define USE_MMAP_FOR_BUFFERS 1 +/*#define USE_MMAP_FOR_BUFFERS 1*/