From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126681 invoked by alias); 22 Aug 2019 22:58:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126671 invoked by uid 89); 22 Aug 2019 22:58:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=sk:bernde, berndedlingerhotmailde, U*bernd.edlinger, bernd.edlinger@hotmail.de X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Aug 2019 22:58:03 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F169189DAE0; Thu, 22 Aug 2019 22:58:02 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-44.rdu2.redhat.com [10.10.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD2C460925; Thu, 22 Aug 2019 22:58:00 +0000 (UTC) Subject: Re: [PATCH] Sanitizing the middle-end interface to the back-end for strict alignment To: Bernd Edlinger , Richard Biener Cc: "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Ramana Radhakrishnan , Kyrill Tkachov , Eric Botcazou , Jakub Jelinek References: From: Jeff Law Openpgp: preference=signencrypt Message-ID: Date: Fri, 23 Aug 2019 00:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg01603.txt.bz2 On 8/15/19 1:47 PM, Bernd Edlinger wrote: > Hi, > > this is the split out part from the "Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)" > which is sanitizing the middle-end interface to the back-end for strict alignment, > and a couple of bug-fixes that are necessary to survive boot-strap. > It is intended to be applied after the PR 89544 fix. > > I think it would be possible to change the default implementation of STACK_SLOT_ALIGNMENT > to make all stack variables always naturally aligned instead of doing that only > in assign_parm_setup_stack, but would still like to avoid changing too many things > that do not seem to have a problem. Since this would affect many targets, and more > kinds of variables that may probably not have a strict alignment problem. > But I am ready to take your advice though. > > > Boot-strapped and reg-tested on x86_64-pc-linux-gnu and arm-linux-gnueabihf > Is it OK for trunk? > > > Thanks > Bernd. > > > patch-strict-align.diff > > 2019-08-15 Bernd Edlinger > Richard Biener > > * expr.c (expand_assignment): Handle misaligned DECLs. > (expand_expr_real_1): Handle FUNCTION_DECL as unaligned. > * function.c (assign_parm_adjust_stack_rtl): Check movmisalign optab > too. > (assign_parm_setup_stack): Allocate properly aligned stack slots. > * varasm.c (build_constant_desc): Align constants of misaligned types. > * config/arm/arm.md (movdi, movsi, movhi, movhf, movsf, movdf): Check > strict alignment restrictions on memory addresses. > * config/arm/neon.md (movti, mov, mov): Likewise. > * config/arm/vec-common.md (mov): Likewise. I'll ack the generic bits. I have no clue if the ARM maintainers want the asserts or not. jeff