From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5747 invoked by alias); 25 Jun 2008 19:04:00 -0000 Received: (qmail 5738 invoked by uid 22791); 25 Jun 2008 19:04:00 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jun 2008 19:03:40 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id BABE945B1C; Wed, 25 Jun 2008 21:03:37 +0200 (CEST) From: Andreas Schwab To: "Gunnar Von Boehn" Cc: gcc-patches@gcc.gnu.org Subject: Re: Fix for GCC Bugzilla Bug 36133 References: X-Yow: Is this ANYWHERE, USA? Date: Wed, 25 Jun 2008 19:05:00 -0000 In-Reply-To: (Gunnar Von Boehn's message of "Tue, 24 Jun 2008 17:57:34 +0200") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg01600.txt.bz2 "Gunnar Von Boehn" writes: > Maybe I can summarize the question again. > When I understood your question correctly then it was: > "Does it make sense to mark the CC as invalid after a shift instruction." > Your point was that a shift will "trash" the carry flag. > If the CC is marked as valid GCC will but BCC instructions after the shift. > If the CC is marked as invalid then GCC will put a TST before the BCC > instruction to regenerate the conditions codes. You need to argue on the RTL insns that can be generated. I cannot prove that there will never be a bgtu/bltu insn following the lshiftr insn. If that can happen your change would introduce a wrong-code bug. In any case, the right place to change that is in notice_update_cc anyway. > AFAIK GCC 2.9 did behave correctly in this matter. I don't know what gcc 2.9 refers to, but the handling of lshiftr in notice_update_cc was changed 5 years ago, presumably because of a wrong-code bug (I cannot find any reference in the gcc-patches archive). Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."