From patchwork Fri Apr 29 09:29:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 616667 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 3qx7j06jBtz9t74 for ; Fri, 29 Apr 2016 19:30:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=EVFtONyH; 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=Mrw3qi2/HtzoQGA1KS 4lxHawaFWojUA6isAOqNf1DKwqKFOZF7dPHDR02AVmGmOkK6q2P7pbbpRYVaOCVJ ZCmKyYE9eXtt6KQgks5olRBtdfAo9QLew3z3doHWIBcIkml6Sr7fSoeksNT1KKd0 V7yq2o4eV3cPev+ITX0jkoo0k= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=nVeJBhxUiLrsvNqJ1vaLxcG4 CNg=; b=EVFtONyH83A7a6lc5tdyhCosTDqVwbpQkQopDCJicbEX4uyy/AUVRN7V qyQjqLj/WgyyR0Oc+RiNKClNiy7HHzZLCzR7vSUjrBlbD+lCvSXidqtDwigYLU6i FLtt4NJU8JQKUALyJo6GzH5chIV4lV92GGNfGtlWzkHk+DsoF0w= Received: (qmail 42715 invoked by alias); 29 Apr 2016 09:30:08 -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 42686 invoked by uid 89); 29 Apr 2016 09:30:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=(unknown), Hx-languages-length:1397 X-HELO: mail-yw0-f174.google.com Received: from mail-yw0-f174.google.com (HELO mail-yw0-f174.google.com) (209.85.161.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 29 Apr 2016 09:29:56 +0000 Received: by mail-yw0-f174.google.com with SMTP id t10so175477598ywa.0 for ; Fri, 29 Apr 2016 02:29:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=OFjvJk2vw46mapU18VpEwG63dkUJQf98QN9eW00yqqA=; b=EkaOBXeokYHrw1XfeVTXXd7ox1XUJULl1KyOiyQsa2jFao9qUQDJAIlbrouMc9okUW nka5yBaugaIGd6ZxXsU251hG3cON2NSYdo1Vmd8LHIfLOQgF64fn+11YJbrh7IFiC2pI U/zSGopWOAemddAlr0e07Pi/8Jb2CL+YSKM8q60vOBUfHQnLCt0mrr/pYoWKQg0Cuzqs MsK3bx9KzueuQNPSWKmi7bXLTmsRyzMQio7LntsBSMmwPN+qxHANwyKAI+jLazB6+ry7 PBH2ihUZDRhVQMy1o9MCuUGJc+nfQVYwtQK3VyHh6sZOsyj8yGK+z6z5/vLEzt8KjWaL G4ig== X-Gm-Message-State: AOPr4FVDnvpOtNbvKyglqcZIyrG+ldG6IdxPzWiUhNZ2ApUjyWI/Q9m/ILHFSdpBfJXrqA71pR1El2w5qzn3lQ== MIME-Version: 1.0 X-Received: by 10.176.64.104 with SMTP id h95mr10769430uad.84.1461922194772; Fri, 29 Apr 2016 02:29:54 -0700 (PDT) Received: by 10.103.76.220 with HTTP; Fri, 29 Apr 2016 02:29:54 -0700 (PDT) In-Reply-To: <3466465.kPQ0hp1mLX@polaris> References: <1744658.Bp6bspGrA0@polaris> <3466465.kPQ0hp1mLX@polaris> Date: Fri, 29 Apr 2016 11:29:54 +0200 Message-ID: Subject: Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{, _WRITE} peepholes to all integer modes From: Uros Bizjak To: Eric Botcazou Cc: "gcc-patches@gcc.gnu.org" On Fri, Apr 29, 2016 at 9:58 AM, Eric Botcazou wrote: >> We can put it back, but prehaps implemented as unspec, so it won't >> interfere with peepholes? > > No strong opinion, as long as the final assembly is the same as before. I'm testing the attached patch. Does it fix your ada failures? Uros. Index: i386.md =================================================================== --- i386.md (revision 235620) +++ i386.md (working copy) @@ -88,6 +88,7 @@ UNSPEC_SET_GOT_OFFSET UNSPEC_MEMORY_BLOCKAGE UNSPEC_STACK_CHECK + UNSPEC_PROBE_STACK ;; TLS support UNSPEC_TP @@ -17552,6 +17553,23 @@ DONE; }) +(define_expand "probe_stack" + [(parallel + [(set (match_operand 0 "memory_operand") + (unspec [(const_int 0)] UNSPEC_PROBE_STACK)) + (clobber (reg:CC FLAGS_REG))])]) + +;; Use OR for stack probes, this is shorter. +(define_insn "*probe_stack_" + [(set (match_operand:W 0 "memory_operand" "=m") + (unspec:W [(const_int 0)] UNSPEC_PROBE_STACK)) + (clobber (reg:CC FLAGS_REG))] + "" + "or{}\t{$0, %0|%0, 0}" + [(set_attr "type" "alu1") + (set_attr "mode" "") + (set_attr "length_immediate" "1")]) + (define_insn "adjust_stack_and_probe" [(set (match_operand:P 0 "register_operand" "=r") (unspec_volatile:P [(match_operand:P 1 "register_operand" "0")]