From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17659 invoked by alias); 4 Dec 2002 22:22:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17650 invoked from network); 4 Dec 2002 22:22:08 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sources.redhat.com with SMTP; 4 Dec 2002 22:22:08 -0000 Received: from hiauly1.hia.nrc.ca (localhost [127.0.0.1]) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id gB4MM6ot000385; Wed, 4 Dec 2002 17:22:06 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) id gB4MM5Nv000384; Wed, 4 Dec 2002 17:22:05 -0500 (EST) Message-Id: <200212042222.gB4MM5Nv000384@hiauly1.hia.nrc.ca> Subject: Re: HP-UX PA long double alignment change To: dave@hiauly1.hia.nrc.ca (John David Anglin) Date: Wed, 04 Dec 2002 14:22:00 -0000 From: "John David Anglin" Cc: sje@cup.hp.com, gcc-patches@gcc.gnu.org, rth@redhat.com In-Reply-To: from "John David Anglin" at Dec 3, 2002 05:11:40 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00277.txt.bz2 > >From my reading of the documentation, I think you need both. > I wonder if GET_MODE_ALIGNMENT could be redefined? I have tested the following on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. There are no regressions and it reduces the alignment of long doubles in a simple manner. However, it does require modifying machmode.h to allow defining GET_MODE_ALIGNMENT in the target headers. Is this ok for main? Sorry Steve, I didn't mean to usurp your work. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2002-12-04 John David Anglin * machmode.h (GET_MODE_ALIGNMENT): Don't define if already defined. * pa.h (GET_MODE_ALIGNMENT): Define to obtain 64-bit alignment for TFmode on non 64-bit ports. Index: machmode.h =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/machmode.h,v retrieving revision 1.31 diff -u -3 -p -r1.31 machmode.h --- machmode.h 1 Nov 2002 09:35:24 -0000 1.31 +++ machmode.h 4 Dec 2002 19:13:33 -0000 @@ -159,7 +159,9 @@ extern enum machine_mode get_best_mode P extern unsigned get_mode_alignment PARAMS ((enum machine_mode)); +#ifndef GET_MODE_ALIGNMENT #define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE) +#endif /* For each class, get the narrowest mode in that class. */ Index: config/pa/pa.h =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.h,v retrieving revision 1.176 diff -u -3 -p -r1.176 pa.h --- config/pa/pa.h 27 Nov 2002 02:34:15 -0000 1.176 +++ config/pa/pa.h 4 Dec 2002 19:13:36 -0000 @@ -478,6 +478,11 @@ do { \ to 128 bits to allow for lock semaphores in the stack frame.*/ #define BIGGEST_ALIGNMENT 128 +/* TFmode data only needs 64-bit alignment on non 64-bit ports. */ +#undef GET_MODE_ALIGNMENT +#define GET_MODE_ALIGNMENT(MODE) \ + (!TARGET_64BIT && (MODE) == TFmode ? 64 : get_mode_alignment (MODE)) + /* Get around hp-ux assembler bug, and make strcpy of constants fast. */ #define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))