From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1723 invoked by alias); 4 Jun 2002 18:56:17 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 1563 invoked from network); 4 Jun 2002 18:56:14 -0000 Received: from unknown (HELO perdition.linnaean.org) (66.30.9.234) by sources.redhat.com with SMTP; 4 Jun 2002 18:56:14 -0000 Received: by perdition.linnaean.org (Postfix, from userid 5281) id 965E11BA1B; Tue, 4 Jun 2002 14:56:13 -0400 (EDT) From: Roland McGrath MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: GNU libc hackers Cc: Richard Henderson Subject: alpha div/rem and PAL/gentrap constants X-Zippy-Says: A KAISER ROLL?! What good is a Kaiser Roll without a little COLE SLAW on the SIDE? Message-Id: <20020604185613.965E11BA1B@perdition.linnaean.org> Date: Tue, 04 Jun 2002 11:56:00 -0000 X-SW-Source: 2002-06/txt/msg00003.txt.bz2 The files sysdeps/alpha/ldiv.S, sysdeps/alpha/div.S, sysdeps/alpha/divrem.h use this and expect it to define the macros PAL_gentrap and GEN_INTDIV: #ifdef __linux__ # include # include #else # include #endif For Hurd/Alpha we don't (yet) have any such header files (asm/*.h is pure Linuxism). I've looked at the BSDs, and they do have a machine/pal.h, so I think we will add that to Hurd. But the div code in BSD libc uses a literal -2 for GEN_INTDIV, and I haven't found any BSD header files that define names for those constants. (The BSD kernel code that sees the trap from divrem also uses a literal -2 in its code to recognize it.) I don't have access to an OSF/1 or Digital Unix system to see what header files those systems have for this stuff. Any opinions on which changes or new headers would be best to get libc to compile for non-Linux on Alpha? Right now I am using this: Index: sysdeps/alpha/div.S =================================================================== RCS file: /cvs/glibc/libc/sysdeps/alpha/div.S,v retrieving revision 1.3 diff -u -r1.3 div.S --- sysdeps/alpha/div.S 6 Jul 2001 04:55:45 -0000 1.3 +++ sysdeps/alpha/div.S 4 Jun 2002 18:36:09 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -24,6 +24,10 @@ # include #else # include +#endif + +#ifndef GEN_INTDIV +# define GEN_INTDIV -2 /* magic constant from OSF/1 used by all */ #endif .set noat Index: sysdeps/alpha/divrem.h =================================================================== RCS file: /cvs/glibc/libc/sysdeps/alpha/divrem.h,v retrieving revision 1.8 diff -u -r1.8 divrem.h --- sysdeps/alpha/divrem.h 6 Jul 2001 04:55:45 -0000 1.8 +++ sysdeps/alpha/divrem.h 4 Jun 2002 18:36:09 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -38,6 +38,10 @@ # include #else # include +#endif + +#ifndef GEN_INTDIV +# define GEN_INTDIV -2 /* magic constant from OSF/1 used by all */ #endif #define mask v0 Index: sysdeps/alpha/ldiv.S =================================================================== RCS file: /cvs/glibc/libc/sysdeps/alpha/ldiv.S,v retrieving revision 1.4 diff -u -r1.4 ldiv.S --- sysdeps/alpha/ldiv.S 6 Jul 2001 04:55:45 -0000 1.4 +++ sysdeps/alpha/ldiv.S 4 Jun 2002 18:36:09 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2001,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -24,6 +24,10 @@ # include #else # include +#endif + +#ifndef GEN_INTDIV +# define GEN_INTDIV -2 /* magic constant from OSF/1 used by all */ #endif .set noat