From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9B8023857811 for ; Mon, 9 Nov 2020 15:17:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9B8023857811 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A9F3HIp113178; Mon, 9 Nov 2020 10:17:38 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 34q71mu310-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Nov 2020 10:17:38 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0A9FBxBb002786; Mon, 9 Nov 2020 15:17:37 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04wdc.us.ibm.com with ESMTP id 34q5ne9b0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Nov 2020 15:17:37 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0A9FHZr214877356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Nov 2020 15:17:35 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5AC86E053; Mon, 9 Nov 2020 15:17:35 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE23D6E05B; Mon, 9 Nov 2020 15:17:34 +0000 (GMT) Received: from li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com (unknown [9.80.216.51]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 9 Nov 2020 15:17:34 +0000 (GMT) Date: Mon, 9 Nov 2020 09:17:32 -0600 From: "Paul A. Clarke" To: Peter Bergner Cc: Segher Boessenkool , Bill Schmidt , Tulio Magno Quites Machado Filho , GCC Patches Subject: Re: [PATCH] rs6000: Fix default alignment ABI break caused by MMA base support Message-ID: <20201109151732.GA734100@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-09_08:2020-11-05, 2020-11-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 phishscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011090106 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 15:17:41 -0000 On Fri, Nov 06, 2020 at 04:18:00PM -0600, Peter Bergner via Gcc-patches wrote: > As part of the MMA base support, we incremented BIGGEST_ALIGNMENT in > order to align the __vector_pair and __vector_quad types to 256 and 512 > bits respectively. This had the unintended effect of changing the > default alignment used by __attribute__ ((__aligned__)) which causes > an ABI break because of some dodgy code in GLIBC's struct pthread > (GLIBC is going to fix that too). The fix in GCC is to revert the > BIGGEST_ALIGNMENT change and to force the alignment on the type itself > rather than the mode used by the type. [snip] > diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h > index bbd8060e143..5a47aa14722 100644 > --- a/gcc/config/rs6000/rs6000.h > +++ b/gcc/config/rs6000/rs6000.h > @@ -776,8 +776,10 @@ extern unsigned rs6000_pointer_size; > /* Allocation boundary (in *bits*) for the code of a function. */ > #define FUNCTION_BOUNDARY 32 > > -/* No data type wants to be aligned rounder than this. */ > -#define BIGGEST_ALIGNMENT (TARGET_MMA ? 512 : 128) > +/* No data type is required to be aligned rounder than this. Warning, if > + BIGGEST_ALIGNMENT is changed, then this may be an ABI break. An example > + of where this can break an ABI is in GLIBC's struct _Unwind_Exception. */ Instead of calling out something that is expected to be fixed, should you instead call out that it will change the alignment of anything using "__attribute__ ((__aligned__))"? > +#define BIGGEST_ALIGNMENT 128 [snip] PC