From patchwork Tue Feb 7 16:37:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 139972 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 9F7C31007D3 for ; Wed, 8 Feb 2012 03:37:32 +1100 (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=1329237453; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=SYBgg6K js4drvj0miKodXsP9JCI=; b=kR4ZGMCSD3rIritGBwbggPlLAdO/LBUrD+o4/+e 8KN2vEyqrs5XNTjvV45X7CsNxoAqwdFhxjdTaXOSccTQrh4tbwQbZofS97IJhd8T 2a8R1PFKXA2S5rtwwgk0KWluOv54PpjHSE3Xw3w5XH85JTL14glMX+D1UfSZRzKE hpIQ= 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:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=AQSjUF0UV/nSlpKYKo3sDS+N0v3uFGTt4XKETJ3eEAu1TJj+N9Q6yIPKher3Tu KJmA7l+69i22Tnbt8LfQ0Yh0skk5XxeG35/mJQlbJjbWHdMXShrugsh+HXUtPCiq tAhrVFmuExjVYDP/YiOydl8t84MzGfX49qnl4YzLUrSQc=; Received: (qmail 15620 invoked by alias); 7 Feb 2012 16:37:24 -0000 Received: (qmail 15427 invoked by uid 22791); 7 Feb 2012 16:37:22 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-gy0-f175.google.com (HELO mail-gy0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Feb 2012 16:37:07 +0000 Received: by ghbf19 with SMTP id f19so3407921ghb.20 for ; Tue, 07 Feb 2012 08:37:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.2.7 with SMTP id e7mr9865088ani.33.1328632626455; Tue, 07 Feb 2012 08:37:06 -0800 (PST) Received: by 10.146.124.2 with HTTP; Tue, 7 Feb 2012 08:37:06 -0800 (PST) Date: Tue, 7 Feb 2012 17:37:06 +0100 Message-ID: Subject: [PATCH 4.8 v2, i386]: Make CCZ mode compatible with CCGOC and CCGO modes From: Uros Bizjak To: Richard Henderson Cc: gcc-patches@gcc.gnu.org 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 Tue, Feb 7, 2012 at 1:59 PM, Uros Bizjak wrote: > Attached patch declares CCZmode compatible with CCGOC, CCGO and CCNO modes. Actually, CCZ mode is not compatible with CCNO mode, since the later only declares that overflow flag is not set. CCGOC and CCGO declare garbage in overflow (and carry in case of CCGOC) flag, so implicitly declare that CCZ flag is valid. Following this reasoning, CCZ mode should be compatible with CCGOC and CCGO modes. 2012-02-07 Uros Bizjak * config/i386/i386.c (ix86_cc_modes_compatible): Declare CCZmode compatible with CCGOCmode and CCGCmode. Attached patch was bootstrapped and regression tested on x86_64-pc-linux-gnu. Uros. Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 183968) +++ config/i386/i386.c (working copy) @@ -17778,6 +17778,11 @@ ix86_cc_modes_compatible (enum machine_mode m1, en || (m1 == CCGOCmode && m2 == CCGCmode)) return CCGCmode; + if (m1 == CCZmode && (m2 == CCGCmode || m2 == CCGOCmode)) + return m2; + else if (m2 == CCZmode && (m1 == CCGCmode || m1 == CCGOCmode)) + return m1; + switch (m1) { default: