From patchwork Wed Oct 27 02:38:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 69314 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 80F66B70DE for ; Wed, 27 Oct 2010 13:39:33 +1100 (EST) Received: (qmail 30599 invoked by alias); 27 Oct 2010 02:39:31 -0000 Received: (qmail 30591 invoked by uid 22791); 27 Oct 2010 02:39:30 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_VZ, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Oct 2010 02:39:26 +0000 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id o9R2dO9Q012608 for ; Tue, 26 Oct 2010 19:39:24 -0700 Received: from qyk38 (qyk38.prod.google.com [10.241.83.166]) by wpaz1.hot.corp.google.com with ESMTP id o9R2dIgO013851 for ; Tue, 26 Oct 2010 19:39:23 -0700 Received: by qyk38 with SMTP id 38so3346866qyk.2 for ; Tue, 26 Oct 2010 19:39:23 -0700 (PDT) Received: by 10.229.237.129 with SMTP id ko1mr442897qcb.4.1288147163130; Tue, 26 Oct 2010 19:39:23 -0700 (PDT) Received: from coign.google.com ([66.135.114.72]) by mx.google.com with ESMTPS id k15sm8088641qcu.11.2010.10.26.19.39.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Oct 2010 19:39:22 -0700 (PDT) From: Ian Lance Taylor To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Subject: Re: PATCH: Fix split_stack_return In-Reply-To: (H. J. Lu's message of "Tue, 26 Oct 2010 19:15:15 -0700") References: <20101026211731.GA3834@intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Date: Tue, 26 Oct 2010 19:38:40 -0700 Message-ID: MIME-Version: 1.0 X-System-Of-Record: true 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 "H.J. Lu" writes: > I found the problem when I am working on my vzeroupper change. > The bad "split_stack_return" pattern makes it impossible for me > to work on vzeroupper since gcc kept generating "ret $2" > for my vzeroupper pattern. The split_stack_return issue wasted > my time and blocked my vzeroupper change, which I want to finish during > gcc summit. That is why I committed my change. I'm sorry for blocking your change. Still, we have an approval system for a reason. Does this patch fix your problem? Ian Index: gcc/config/i386/i386.md =================================================================== --- gcc/config/i386/i386.md (revision 165994) +++ gcc/config/i386/i386.md (working copy) @@ -261,6 +261,7 @@ UNSPECV_WRFSBASE UNSPECV_WRGSBASE UNSPECV_RDRAND + UNSPECV_SPLIT_STACK_RETURN ]) ;; Constants to represent pcomtrue/pcomfalse variants @@ -11751,8 +11752,8 @@ ;; In order to support the call/return predictor, we use a return ;; instruction which the middle-end doesn't see. (define_insn "split_stack_return" - [(unspec [(match_operand:SI 0 "const_int_operand" "")] - UNSPEC_STACK_CHECK)] + [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")] + UNSPECV_SPLIT_STACK_RETURN)] "" { if (operands[0] == const0_rtx)