From patchwork Thu Jul 16 04:03:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 496538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 B50361402B5 for ; Thu, 16 Jul 2015 14:05:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=dvhYnK2M; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=dp6OJRiDN8et4xlgj lxO6qW6SuvP3K7qqFNi8skEXKPsHOfMlPazCQl0LkzyHiT6lhq9e5+VxkP03yNlP qvkiorNezOBmSAbCsA++9fdPJGq4/YWpjbb0kkhWRkNPK2zuL8e3ielXmnZmoTfD kw4OcZgpF4dvjdeYJIkQtfoyG4= 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=D0kJUKJ/ytfjN2gCR6SudQn h4Jc=; b=dvhYnK2MvehZXKUqIr7iAImX6EDVCZhuW1n5+FvLDxpvV0HfrgB0lDi 6e7FzcZ+EUB0hRinpATIpLFENSPHiQVyuNtEt1CAWwX4bDzDwUruaNXQwdPkQSGW bwJlb+sV1hI9Gh5hDQbnGZhdhb5uxFbS7ns2CY5foFvy8kz9qzQI= Received: (qmail 122932 invoked by alias); 16 Jul 2015 04:05:17 -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 122901 invoked by uid 89); 16 Jul 2015 04:05:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Jul 2015 04:05:14 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1ZFaQ2-0003Iq-Ts from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Wed, 15 Jul 2015 21:05:10 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.224.2; Wed, 15 Jul 2015 21:05:10 -0700 Message-ID: <55A72D0C.2010503@codesourcery.com> Date: Wed, 15 Jul 2015 22:03:24 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: GCC Patches Subject: Re: [patch, nios2] stack limit checking improvements References: <55A56388.6040101@codesourcery.com> In-Reply-To: <55A56388.6040101@codesourcery.com> On 07/14/2015 01:31 PM, Sandra Loosemore wrote: > 2015-07-14 Sandra Loosemore > > gcc/ > * config/nios2/nios2.c (TEMP_REG_NUM): Move define up in file. > (nios2_emit_stack_limit_check): Add size parameter. Handle > -fstack-limit-symbol as well as -fstack-limit-register. > (nios2_expand_prologue): Emit only a single stack limit check, > even if multiple stack adjustments are required. > (nios2_option_override): Diagnose unsupported combination of -fpic > and -stack-limit-symbol. > > gcc/testsuite/ > * gcc.target/nios2/nios2-stack-check-1.c: Adjust patterns. > * gcc.target/nios2/nios2-stack-check-2.c: Likewise. > * gcc.target/nios2/nios2-stack-check-3.c: New test case. Ooops -- this patch caused a possibly-uninitialized-variable warning.(Mainline compiles had been very noisy with other random warnings while I was working on this, and it was easy to overlook one more warning....) Anyway, fixed now with this followup patch. -Sandra Index: gcc/config/nios2/nios2.c =================================================================== --- gcc/config/nios2/nios2.c (revision 225856) +++ gcc/config/nios2/nios2.c (working copy) @@ -563,7 +563,7 @@ nios2_create_cfa_notes (rtx_insn *insn, static void nios2_emit_stack_limit_check (int size) { - rtx sum; + rtx sum = NULL_RTX; if (GET_CODE (stack_limit_rtx) == SYMBOL_REF) {