From patchwork Fri Nov 15 00:26:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1195248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513524-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="fsrRQvbL"; 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 47DfLB6Lz6z9s4Y for ; Fri, 15 Nov 2019 11:26:58 +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 :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=pYnrZlVv7Ngl9yy1Ojr5CQf7PAClLH 929ox5GlZIoUmWb+buDzT7dKruy8SxH4X28/lGlY9PAimFpVPG+6Jvv6sY4X1Kp6 U50q71KmOKZTdVoGjmGRq3VOp7R4/chwzlw7qXRTafE6IGbWWXrVKuabvRKe3aT0 PDilzZ4WaMblA= 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 :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=XJdcFXEQ08x5EeiFjauAz2W2nt0=; b=fsrR QvbLXc9Iuxg0o4m9RMdSD7JvAtAANPpb2AY8Re7krSh5VKB/itP3zdDRDYYYHATW IC8J1Brydf6UGj7llzS8RgMm/90neJyHaYIkwZb2rHypXFo/g9odJZP2ADquCzKG j9XdJ+V7cgoyYUMChebSe6ujLKrIhYQWk3RFLGI= Received: (qmail 122685 invoked by alias); 15 Nov 2019 00:26:51 -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 122677 invoked by uid 89); 15 Nov 2019 00:26:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Nov 2019 00:26:50 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xAF0NC2g063575; Thu, 14 Nov 2019 19:26:48 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2w9gyc10ej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 19:26:48 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id xAF0NDAe063695; Thu, 14 Nov 2019 19:26:48 -0500 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 2w9gyc10dy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 19:26:47 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xAF0P04c005794; Fri, 15 Nov 2019 00:26:46 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma03dal.us.ibm.com with ESMTP id 2w9gy4897m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Nov 2019 00:26:46 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAF0QjRR48628132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Nov 2019 00:26:45 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6824AC05B; Fri, 15 Nov 2019 00:26:45 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92EE4AC059; Fri, 15 Nov 2019 00:26:45 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.32.77.177]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 15 Nov 2019 00:26:45 +0000 (GMT) Date: Thu, 14 Nov 2019 19:26:44 -0500 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn Subject: [PATCH], V8, #6 of #6, Testsuite: Test -fstack-protect-strong works with prefixed addressing Message-ID: <20191115002644.GF19187@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn References: <20191115000852.GA18578@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191115000852.GA18578@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) This patch checks whether the -fstack-protect-strong option works with a large stack frame on -mcpu=future systems where prefixed instructions are generated. Can I check this into the FSF trunk? 2019-11-14 Michael Meissner * gcc.target/powerpc/prefix-stack-protect.c: New test to make sure -fstack-protect-strong works with prefixed addressing. --- /tmp/byVdyb_prefix-stack-protect.c 2019-11-13 17:45:35.374176204 -0500 +++ gcc/testsuite/gcc.target/powerpc/prefix-stack-protect.c 2019-11-13 17:45:35.143174125 -0500 @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr_ok } */ +/* { dg-options "-O2 -mdejagnu-cpu=future -fstack-protector-strong" } */ + +/* Test that we can handle large stack frames with -fstack-protector-strong and + prefixed addressing. */ + +extern long foo (char *); + +long +bar (void) +{ + char buffer[0x20000]; + return foo (buffer) + 1; +} + +/* { dg-final { scan-assembler {\mpld\M} } } */ +/* { dg-final { scan-assembler {\mpstd\M} } } */