From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8960 invoked by alias); 24 Apr 2002 02:24:34 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8917 invoked from network); 24 Apr 2002 02:24:33 -0000 Received: from unknown (HELO potter.sfbay.redhat.com) (205.180.83.107) by sources.redhat.com with SMTP; 24 Apr 2002 02:24:33 -0000 Received: from dot.sfbay.redhat.com (dot.sfbay.redhat.com [172.16.24.7]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g3O2Npv23320; Tue, 23 Apr 2002 19:23:51 -0700 Received: (from rth@localhost) by dot.sfbay.redhat.com (8.11.6/8.11.6) id g3O2OO801082; Tue, 23 Apr 2002 19:24:24 -0700 X-Authentication-Warning: dot.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Tue, 23 Apr 2002 19:35:00 -0000 From: Richard Henderson To: Richard Kenner Cc: Mark Mitchell , Eric Christopher , gcc@gcc.gnu.org Subject: Re: mips n64 eh failures Message-ID: <20020423192424.A1077@redhat.com> Mail-Followup-To: Richard Henderson , Richard Kenner , Mark Mitchell , Eric Christopher , gcc@gcc.gnu.org References: <14800000.1019552485@gandalf.codesourcery.com> <20020423122254.A775@redhat.com> <29950000.1019593338@gandalf.codesourcery.com> <20020423132840.A823@redhat.com> <32140000.1019594105@gandalf.codesourcery.com> <20020423161543.B939@redhat.com> <43820000.1019604427@gandalf.codesourcery.com> <20020423165325.A983@redhat.com> <20020423171253.A999@redhat.com> <20020423180250.A1045@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020423180250.A1045@redhat.com>; from rth@redhat.com on Tue, Apr 23, 2002 at 06:02:50PM -0700 X-SW-Source: 2002-04/txt/msg01221.txt.bz2 The bug is here: revision 1.361 date: 2001/10/18 21:34:08; author: kenner; state: Exp; lines: +85 -41 * emit-rtl.c (gen_reg_rtx): Also reallocate reg_decl array. (offset_address): New function. (free_emit_status): Free regno_decl. (init_emit): Pass proper number of elements to xcalloc. Allocate regno_decl. (mark_emit_status): Mark regno_decl values. * expr.c (highest_pow2_factor): New function. (expand_assigment): Use it and offset_address. Properly handle ptr_mode vs. Pmode in offset calculation. (store_constructor, expand_expr_unaligned): Likewise. (expand_expr, case COMPONENT_EXPR): Likewise. expr.c:3709: to_rtx = offset_address (to_rtx, offset_rtx, highest_pow2_factor (offset)); offset = arg 0 arg 0 arg 0 arg 1 >> arg 1 > in that the two parm_decls have highest_pow2_factor == 1, which forces the entire block of memory to have alignment 8. Which causes the mips backend to attempt an unaligned store, which fails for some reason. So there is in fact a secondary bug in the mips backend. Namely, the movsi_usw and movdi_usd patterns are identical if the argument is the constant zero. Patch for that pending. But the *primary* bug is that an unaligned store isn't necessary. The following test case shows the bug on both mips and alpha. r~ typedef long unsigned int size_t; typedef int sword __attribute__ ((mode (SI))); typedef unsigned int uword __attribute__ ((mode (SI))); typedef unsigned int uaddr __attribute__ ((mode (pointer))); typedef int saddr __attribute__ ((mode (pointer))); struct fde_vector { void *orig_data; size_t count; struct dwarf_fde *array[]; }; struct dwarf_fde { uword length; sword CIE_delta; unsigned char pc_begin[]; } __attribute__ ((packed, aligned (__alignof__ (void *)))); typedef struct dwarf_fde fde; struct object; void fde_split (fde **probe, struct fde_vector *linear, struct fde_vector *erratic) { erratic->array[probe - linear->array] = 0; }