From patchwork Tue Jan 26 02:39:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 573052 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 A58CF1402C0 for ; Tue, 26 Jan 2016 13:40:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=w6kt1A6r; 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:from :to:cc:subject:date:message-id; q=dns; s=default; b=hpI9b1ydkjKx hAzcFK6VLs7YZ2vJMo0da166J4RDVueOIZoxt1DN0bhub8AC+OLBcVYN87QEm6fW +j49R7UbNtHExaffuEQ2M6fokuZ1635TO58LvZ81PqEDH3zO3EVdaqhcxoHZ/715 qRydmwExrxRtAAWyeCsb7v578ZkGVl8= 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:from :to:cc:subject:date:message-id; s=default; bh=bYF3HOQ6Y4eZWPiJtI mWn2alsGg=; b=w6kt1A6rNQhxSmcWJyH7bMXs80Z80t3XQOaleiBDJzBvvsOpqF gdxlAoezrRn70Z4Y7hJA5uiVXG6BvVEOdFpnIHaSYjplkX3/nxdoZPCuXSPFGw7c ntp7UkrBxcB2DQXbxwCMQWpYdofWNmSyAZA2cu3e3aBVkyODJOVl/c6Qo= Received: (qmail 101942 invoked by alias); 26 Jan 2016 02:40:00 -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 101922 invoked by uid 89); 26 Jan 2016 02:39:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=sk:output_, Hx-languages-length:1189, Low, 20160126 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Jan 2016 02:39:54 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 0E84B1C0677; Tue, 26 Jan 2016 02:39:49 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] rs6000: Put back the 's' output modifier Date: Tue, 26 Jan 2016 02:39:44 +0000 Message-Id: X-IsSubscribed: yes It turns out the 's' output modifier is used in some glibc math code, and is in an installed header even. So let's put it back, it is much less of a burden supporting it a bit longer than to deal with the fallout. (It is also being fixed for glibc.) Tested on powerpc64-linux-gcc; is this okay for mainline? Segher 2016-01-26 Segher Boessenkool * config/rs6000/rs6000.c (print_operand): Rollback 's' removal. --- gcc/config/rs6000/rs6000.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ba4aeab..2a3a441 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -19949,6 +19949,14 @@ print_operand (FILE *file, rtx x, int code) fprintf (file, "%d", 128 >> (REGNO (x) - CR0_REGNO)); return; + case 's': + /* Low 5 bits of 32 - value */ + if (! INT_P (x)) + output_operand_lossage ("invalid %%s value"); + else + fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 31); + return; + case 't': /* Like 'J' but get to the OVERFLOW/UNORDERED bit. */ gcc_assert (REG_P (x) && GET_MODE (x) == CCmode);