From patchwork Mon May 14 14:14:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 159028 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]) by ozlabs.org (Postfix) with SMTP id A673CB702E for ; Tue, 15 May 2012 00:14:46 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1337609686; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date: Cc:Content-Transfer-Encoding:Message-Id:References:To: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=FLMpnYtXZitRoB/mjHrz M9VaKXw=; b=yaY5ysuGclzb8KXjiL7+qkAV8dEw205naYc8YZGvzu+4qlVOPAFf WAgG18cJTubrUzct/uFFmllOU5A5S5Bm3T+oTlnPm1l8HUS0dUAXlGOJYdiLqXV5 gI5A/bEPcUgKmACyVG+oqJMD2Pm+tPprGA9r5ZFH9xwbzRWqso6GI3A= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=BMfLlwwKjTY1+wDhCFfRZ0OZyrl7GT+2eRU4zlwo9sZSfRPcWjMdVHU63TFBse A5hFxGCJbd2Jx1AhTs82xN0z4VzYeGrEvbCMuZBFcDkSplhr0glNkI61gAksGACS L3nj5/XOHG6sEINyFugk3GTaq+OOaWvgCn1iXJieVjb5k=; Received: (qmail 25204 invoked by alias); 14 May 2012 14:14:38 -0000 Received: (qmail 25189 invoked by uid 22791); 14 May 2012 14:14:36 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 May 2012 14:14:23 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 2242E29002D; Mon, 14 May 2012 16:14:28 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aZCIvu8Ue2Ha; Mon, 14 May 2012 16:14:28 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id DE2D3290028; Mon, 14 May 2012 16:14:27 +0200 (CEST) Subject: Re: Ping: always supply a mode to plus_constant Mime-Version: 1.0 (Apple Message framework v1257) From: Tristan Gingold In-Reply-To: Date: Mon, 14 May 2012 16:14:21 +0200 Cc: Richard Guenther , "H.J. Lu" , GCC Patches , Eric Botcazou Message-Id: <5C3163C7-CDA6-4C65-BEDE-230F6BE8BD6C@adacore.com> References: <87sjfhcer6.fsf@talisman.home> To: Richard Sandiford X-IsSubscribed: yes 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 On May 14, 2012, at 3:23 PM, Richard Sandiford wrote: > Richard Guenther writes: >> On Sun, May 6, 2012 at 12:23 AM, H.J. Lu wrote: >>> On Thu, May 3, 2012 at 11:15 AM, Richard Sandiford >>> wrote: >>>> Ping for this patch to always supply a mode to plus_constant: >>>> >>>> http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00892.html >>>> >>>> I've done a diff of the changes since the original test revision >>>> (which was r186448 FWIW) and there's only been one plus_constant- >>>> related change since then: Alan's rs6000 prologue/epilogue fixes. >>>> I'd repeat the original testing before committing. >>>> >>> >>> This caused: >>> >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53249 >> >> It also casuses IA64 build to fail for me: >> >> /gcc/spec/sb-terbium-head-64/gcc/gcc/config/ia64/ia64.c: In function >> 'ia64_emit_probe_stack_range': >> /gcc/spec/sb-terbium-head-64/gcc/gcc/config/ia64/ia64.c:3279: error: >> incompatible type for argument 1 of 'plus_constant' >> /gcc/spec/sb-terbium-head-64/gcc/gcc/config/ia64/ia64.c:3279: warning: >> passing argument 2 of 'plus_constant' makes pointer from integer >> without a cast >> /gcc/spec/sb-terbium-head-64/gcc/gcc/config/ia64/ia64.c:3279: error: >> too few arguments to function 'plus_constant' >> /gcc/spec/sb-terbium-head-64/gcc/gcc/config/ia64/ia64.c:3330: error: >> incompatible type for argument 1 of 'plus_constant' >> ... > > I think this was: > > 2012-05-10 Eric Botcazou > Tristan Gingold > > * doc/md.texi (Standard Names): Document probe_stack_address. > * explow.c (emit_stack_probe): Handle probe_stack_address. > * config/ia64/ia64.md (UNSPECV_PROBE_STACK_ADDRESS): New constant. > (UNSPECV_PROBE_STACK_RANGE): Likewise. > (probe_stack_address): New insn. > (probe_stack_range): Likewise. > * config/ia64/ia64.c: Include common/common-target.h. > (ia64_compute_frame_size): Mark r2 and r3 as used if static stack > checking is enabled. > (ia64_emit_probe_stack_range): New function. > (output_probe_stack_range): Likewise. > (ia64_expand_prologue): Invoke ia64_emit_probe_stack_range if static > builtin stack checking is enabled. > (rtx_needs_barrier) : Handle UNSPECV_PROBE_STACK_RANGE > and UNSPECV_PROBE_STACK_ADDRESS. > (unknown_for_bundling_p): New predicate. > (group_barrier_needed): Use important_for_bundling_p. > (ia64_dfa_new_cycle): Use unknown_for_bundling_p. > (issue_nops_and_insn): Likewise. > (bundling): Likewise. > (final_emit_insn_group_barriers): Likewise. > * config/ia64/ia64-protos.h (output_probe_stack_range): Declare. > * config/ia64/hpux.h (STACK_CHECK_STATIC_BUILTIN): Define. > (STACK_CHECK_PROTECT): Likewise. > * config/ia64/linux.h (STACK_CHECK_STATIC_BUILTIN): Likewise. > > which went in a few days after my patch. The following patch fixes the build (not reg-tested, but looks obvious): 2012-05-14 Tristan Gingold * config/ia64/ia64.c (ia64_expand_prologue): Adjust calls to plus_constant. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index e10db35..4c6050f 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3277,7 +3277,7 @@ ia64_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size, int sol) size is at least 4096 - (96 + 2) * 8 = 3312 bytes, which is enough. Also compute the address of the last probe for the memory stack (which grows towards lower addresses). */ - emit_insn (gen_rtx_SET (VOIDmode, r3, plus_constant (r3, 4095))); + emit_insn (gen_rtx_SET (VOIDmode, r3, plus_constant (Pmode, r3, 4095))); emit_insn (gen_rtx_SET (VOIDmode, r2, gen_rtx_PLUS (Pmode, stack_pointer_rtx, r2))); @@ -3329,12 +3329,12 @@ ia64_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size, int sol) for (i = 2 * PROBE_INTERVAL; i < size; i += PROBE_INTERVAL) { emit_insn (gen_rtx_SET (VOIDmode, r2, - plus_constant (r2, -PROBE_INTERVAL))); + plus_constant (Pmode, r2, -PROBE_INTERVAL))); emit_stack_probe (r2); } emit_insn (gen_rtx_SET (VOIDmode, r2, - plus_constant (r2, + plus_constant (Pmode, r2, (i - PROBE_INTERVAL) - size))); emit_stack_probe (r2); } @@ -3395,7 +3395,8 @@ ia64_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size, int sol) if (size != rounded_size) { emit_insn (gen_rtx_SET (VOIDmode, r2, - plus_constant (r2, rounded_size - size))); + plus_constant (Pmode, + r2, rounded_size - size))); emit_stack_probe (r2); } }