From patchwork Mon May 29 00:41:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9752685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A95CD6038E for ; Mon, 29 May 2017 00:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D94926E4F for ; Mon, 29 May 2017 00:42:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F37C27F7F; Mon, 29 May 2017 00:42:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE24A26E4F for ; Mon, 29 May 2017 00:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750838AbdE2AmC (ORCPT ); Sun, 28 May 2017 20:42:02 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36365 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbdE2AmC (ORCPT ); Sun, 28 May 2017 20:42:02 -0400 Received: by mail-wm0-f66.google.com with SMTP id k15so13999125wmh.3 for ; Sun, 28 May 2017 17:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5e4JwGaAwKl6mqz27QCgO5sKN3MfvT3xYtnF2Xlr+TI=; b=MjAgGltMtvwjlK56b/mfxIsdFn9H6uSMado1HwgDpUywZEip3eNZ9lUvh1ZHGFrO+D Y27s5Kyym9+USq2QsNg6wz1mBApWuzL56gpBbnCGyjUE755XruUksqkmV6erTRMXQawP FqYty8lNLasBxEouDRdwCHh83nGWWnWOgsPfx+sOvt8fjDhFu1zcDCInhm9kZruQGX4p ljAS/EqEXrPd2hgGqk2q2VZ5uVh0jpHpqQu1t3ujwtrw+IIGfHGq7NLINDuOlIs/AU6l 4MOSCsDSMm7Uz9D0U/PK9zWQid5eT021P4ZidMW4Jq+9Tx2vXOdOzC9Zuf9GNxYFgrHM lIpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5e4JwGaAwKl6mqz27QCgO5sKN3MfvT3xYtnF2Xlr+TI=; b=jgjn6fis1An3mUrDOnWI6mUBoOAXFnm7fqh/jdHiIPyW5G69rw5OGezcL0blM7xHhM PVz3ftKfYrdycjG4XItN3lMlKPxPQCowVLd7fLZBikZGgsq4q4fF5K4fMqSrw5PiWTu/ f68VbX83Zxr/WXPipXjJfAu7F3Y4jjo/X+Wj95QiR73xyGRitDwkwWG6chPuEVO7x755 pPT37iNmkGt1q/Y2txIaL9SBPxLwupvkW72rsf40dqR1jPTra+NeaN+IKFZXDf0OkucS JfFGa1h2zgq0VKp5BuEFZMXXnzntucI5EuC1tcNyX426KxKNq1WVTvYQFhhOs1U/qBI8 Ae/g== X-Gm-Message-State: AODbwcBfjXzA0CEOB1s8LhpoMXsg/t/BYQME8fhSYd4Fr7D6iv8YxZwQ JYnDQPhJnyc2dmkIvq0= X-Received: by 10.223.130.151 with SMTP id 23mr3842175wrc.16.1496018520568; Sun, 28 May 2017 17:42:00 -0700 (PDT) Received: from localhost.localdomain (9.56-241-81.adsl-dyn.isp.belgacom.be. [81.241.56.9]) by smtp.gmail.com with ESMTPSA id 203sm15235681wmv.18.2017.05.28.17.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 May 2017 17:42:00 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH] cgcc: fix __DECIMAL_DIG__ Date: Mon, 29 May 2017 02:41:53 +0200 Message-Id: <20170529004153.3951-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There seems to be a mixup about how to calculate __DECIMAL_DIG__ especially for PPC. Fix it by using the correct values: 21 for 80 bit long double (i386) and 36 for 128 bits long double (all the others). Signed-off-by: Luc Van Oostenryck --- cgcc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cgcc b/cgcc index c29fa587e..456369655 100755 --- a/cgcc +++ b/cgcc @@ -258,25 +258,25 @@ sub add_specs { } elsif ($spec eq 'sparc') { return (' -D__sparc=1 -D__sparc__=1' . &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . - &float_types (1, 1, 33, [24,8], [53,11], [113,15]) . + &float_types (1, 1, 36, [24,8], [53,11], [113,15]) . &define_size_t ($m64 ? "long unsigned int" : "unsigned int") . ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4')); } elsif ($spec eq 'sparc64') { return (' -D__sparc=1 -D__sparc__=1 -D__sparcv9__=1 -D__sparc64__=1 -D__arch64__=1 -D__LP64__=1' . &integer_types (8, 16, 32, 64, 64, 128) . - &float_types (1, 1, 33, [24,8], [53,11], [113,15]) . + &float_types (1, 1, 36, [24,8], [53,11], [113,15]) . &define_size_t ("long unsigned int") . ' -D__SIZEOF_POINTER__=8'); } elsif ($spec eq 'x86_64') { return (' -D__x86_64=1 -D__x86_64__=1' . ($m32 ? '' : ' -D__LP64__=1') . &integer_types (8, 16, 32, $m32 ? 32 : 64, 64, 128) . - &float_types (1, 1, 33, [24,8], [53,11], [113,15]) . + &float_types (1, 1, 36, [24,8], [53,11], [113,15]) . &define_size_t ($m32 ? "unsigned int" : "long unsigned int") . ' -D__SIZEOF_POINTER__=' . ($m32 ? '4' : '8')); } elsif ($spec eq 'ppc') { return (' -D__powerpc__=1 -D_BIG_ENDIAN -D_STRING_ARCH_unaligned=1' . &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . - &float_types (1, 1, 21, [24,8], [53,11], [113,15]) . + &float_types (1, 1, 36, [24,8], [53,11], [113,15]) . &define_size_t ($m64 ? "long unsigned int" : "unsigned int") . ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4')); } elsif ($spec eq 's390x') {