From patchwork Mon Feb 11 01:09:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 1039518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-495759-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=axis.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="RYVIMFvX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43ySPL0vnHz9s1l for ; Mon, 11 Feb 2019 12:09:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=K6w RjtFPKVgsVAQ4mJZxxcw4wZkTawkfUka8h3ki2MfSt4ZFSyTliJS0Zv6JofhQ1UZ YDMkqWZEVR+Bcb5mCuRb3UGeTdE6hwX6o611PSkF3a4Q5abuu+T9Fk/a5/xvn4Y+ x8Jpa5XI8VT/ofob/URT0ooWSHJii6Fxq7/9wRCE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; s=default; bh=EUKcmqFJe LYRdJLtIdufLNpFNz4=; b=RYVIMFvXU7DJvv7xfK6RsnajQkMc/j+eGCCJ67mXk ouR0O6Dz7AsG88ibO9lBBfFL/rP1zLAX/kedA5PHXCFt5erRf0Y9hjDI44us50jp EiNWRgcpY+2E5DeDV29u5EV2aTNfSGHrfHZUrXBzQDbNfGLFUSnVBlFiZM7gXAiS EI= Received: (qmail 100061 invoked by alias); 11 Feb 2019 01:09:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 100052 invoked by uid 89); 11 Feb 2019 01:09:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=here's, heres X-HELO: bastet.se.axis.com Received: from bastet.se.axis.com (HELO bastet.se.axis.com) (195.60.68.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Feb 2019 01:09:33 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 9E62C182C5 for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) X-Axis-User: NO X-Axis-NonUser: YES Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id oYzXVVybPckt for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id 32897181DE for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 208BE1A060 for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1563E1A05E for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from seth.se.axis.com (unknown [10.0.2.172]) by boulder02.se.axis.com (Postfix) with ESMTP for ; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 093051AB; Mon, 11 Feb 2019 02:09:31 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id x1B19UDl021722; Mon, 11 Feb 2019 02:09:30 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id x1B19UWh021718; Mon, 11 Feb 2019 02:09:30 +0100 Date: Mon, 11 Feb 2019 02:09:30 +0100 Message-Id: <201902110109.x1B19UWh021718@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org In-reply-to: <201902110105.x1B15BPC021610@ignucius.se.axis.com> (message from Hans-Peter Nilsson on Mon, 11 Feb 2019 02:05:11 +0100) Subject: Follow-up-fix 2 to "[PATCH] Move PR84877 fix elsewhere (PR bootstrap/88450)" MIME-Version: 1.0 Here's the follow-up, getting rid of the observed alignment-padding in execute/930126-1.c: the x parameter in f spuriously being runtime-aligned to BITS_PER_WORD. I separated this change because this is an older issue, a change introduced in r94104 where BITS_PER_WORD was chosen perhaps because we expect register-sized writes into this area. Here, we instead align to a minimum of PREFERRED_STACK_BOUNDARY, but of course gated on ! STRICT_ALIGNMENT. Regtested cris-elf and x86_64-pc-linux-gnu. Ok to commit? gcc: * function.c (assign_parm_setup_block): If not STRICT_ALIGNMENT, instead of always BITS_PER_WORD, align the stacked parameter to a minimum PREFERRED_STACK_BOUNDARY. brgds, H-P --- function.c.orig2 Sat Feb 9 00:53:17 2019 +++ function.c Sat Feb 9 23:21:35 2019 @@ -2912,7 +2912,10 @@ assign_parm_setup_block (struct assign_p size_stored = CEIL_ROUND (size, UNITS_PER_WORD); if (stack_parm == 0) { - SET_DECL_ALIGN (parm, MAX (DECL_ALIGN (parm), BITS_PER_WORD)); + HOST_WIDE_INT min_parm_align + = STRICT_ALIGNMENT ? BITS_PER_WORD : PREFERRED_STACK_BOUNDARY; + + SET_DECL_ALIGN (parm, MAX (DECL_ALIGN (parm), min_parm_align)); if (DECL_ALIGN (parm) > MAX_SUPPORTED_STACK_ALIGNMENT) { rtx allocsize = gen_int_mode (size_stored, Pmode);