From patchwork Mon Sep 4 17:32:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 9937485 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 6BF996089F for ; Mon, 4 Sep 2017 17:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36B45287E8 for ; Mon, 4 Sep 2017 17:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BAD7287F2; Mon, 4 Sep 2017 17:46:05 +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.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E7B4287EF for ; Mon, 4 Sep 2017 17:46:03 +0000 (UTC) Received: from localhost ([::1]:55052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dovR6-0000yd-OL for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Sep 2017 13:45:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dovQP-0000xv-AM for qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:44:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dovQK-0006bO-EC for qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:44:41 -0400 Received: from mout.gmx.net ([212.227.15.18]:65074) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dovQK-0006a3-3g for qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:44:36 -0400 Received: from localhost.localdomain ([185.58.161.191]) by mail.gmx.com (mrgmx001 [212.227.17.184]) with ESMTPSA (Nemesis) id 0M0y8F-1dUFRA39aB-00vB2a; Mon, 04 Sep 2017 19:44:31 +0200 From: Kamil Rytarowski To: laurent@vivier.eu Date: Mon, 4 Sep 2017 19:32:26 +0200 Message-Id: <20170904173226.25252-1-n54@gmx.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170904164659.26915-1-n54@gmx.com> References: <20170904164659.26915-1-n54@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K0:4iaAswwRcxn20D6g65kxNiHXIzKo8vvNh/2a4qaYBa6iyJz4Pd6 wALsPyRzSeDo0pVHohFEUdS1SBpBg9Bnq26KCjhgyaQvwE3ojC48XpT6OWuvsnYco+CPzzR gmXzw3wVh2wvNThpn3cM9mKTcrI6QiudaydxY0puk/qfSd5hgi2GGA7rmTI1DDyMCSxXPeI dycVJWbGDG5mQo6kt3gFQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:XEz+71JMvuc=:VSSBo8z438J1/FhOoCehb9 IfE4IwHFUog7FBNBymJkwCnOjFKJxnkByd89p4TirUQMU79lg6CZwStUqKfBw5kRGo7dAg5PL Fggu3OJa8nqPGwJKmsqNfPUCx5nc4wlqlj1nLkSURRVMZ+6usTTo4MZVGdcjRC9w7nnlQxwpI hrqL8bMK03LJLscDyeHBieiShU2GH1AKEGdRhNKnqohnrPzuRiRe1rTaypB8kCsOuD2LgECsx bIx9AWwN0PhXxcBaPX/SLoeusy3d7Et1JX7WRMf1eb/S2hEG73lainhrnXwN+AhK/HwHthr4o 9k88/ND4yImn49kPvbW3Ar/OT7P2kBnE3N0jw+gMVVLbTEp6+S6g3+82W5dujsd/1qfLiTXg6 L60FvYceWarERqqty0u/wgnCMCVepjp2rqowE+YwFwHxJvDCuWj0sHwbIynC3CGJkMSYfvY4H IjzocCholp0T/3dZgG1gHRVYqfmAkiGrh6E1OqWZ2t/Aiqx1+S9OasEw/+EkWiZsnW9RW4r+i RZ/+6hH0AWD35u3CJd4FwE0t22qXehMcHyVIRcsciCFgNH54wHJgOY/l8exwrj3itHJUCbsrS efn25vsNj/eMxsimb2KQNZFBBnq8awcG1P0i/V7vTXKFSuVhoS0TymQ8zzxo+Z6C0sD2QD1/T E9b0wAhzeSSlMzDo9zKsqBCSCdh9gyHBjATsTaPsfUFo6vuGOjyMfWtMSDrCAD9dIloQcVV+l h6oiPkQfg+2IYbBsf7ccuuUM0UoAXqrO0zB0sSIGpKotlyj1RhAevtG0ZcWJjqFv2yyWyOJiu rAAI9GztmON0P7m3Ji6i0HhGaSi1Nl65V2jKCRTPqzDlxUwkVc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 Subject: [Qemu-devel] [PATCH v3] target/m68k: Switch fpu_rom from make_floatx80() to make_floatx80_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Kamil Rytarowski , qemu-devel@nongnu.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP GCC 4.7.2 on SunOS reports that the values assigned to array members are not real constants: target/m68k/fpu_helper.c:32:5: error: initializer element is not constant target/m68k/fpu_helper.c:32:5: error: (near initialization for 'fpu_rom[0]') rules.mak:66: recipe for target 'target/m68k/fpu_helper.o' failed Convert the array to make_floatx80_init() to fix it. Replace floatx80_pi-like constants with make_floatx80_init() as they are defined as make_floatx80(). This fixes build on SmartOS (Joyent). Signed-off-by: Kamil Rytarowski Reviewed-by: Philippe Mathieu-Daudé --- target/m68k/fpu_helper.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index bdfc537c68..b3d50d1e01 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -29,28 +29,28 @@ */ static const floatx80 fpu_rom[128] = { - [0x00] = floatx80_pi, /* Pi */ - [0x0b] = make_floatx80(0x3ffd, 0x9a209a84fbcff798ULL), /* Log10(2) */ - [0x0c] = make_floatx80(0x4000, 0xadf85458a2bb4a9aULL), /* e */ - [0x0d] = make_floatx80(0x3fff, 0xb8aa3b295c17f0bcULL), /* Log2(e) */ - [0x0e] = make_floatx80(0x3ffd, 0xde5bd8a937287195ULL), /* Log10(e) */ - [0x0f] = floatx80_zero, /* Zero */ - [0x30] = floatx80_ln2, /* ln(2) */ - [0x31] = make_floatx80(0x4000, 0x935d8dddaaa8ac17ULL), /* ln(10) */ - [0x32] = floatx80_one, /* 10^0 */ - [0x33] = make_floatx80(0x4002, 0xa000000000000000ULL), /* 10^1 */ - [0x34] = make_floatx80(0x4005, 0xc800000000000000ULL), /* 10^2 */ - [0x35] = make_floatx80(0x400c, 0x9c40000000000000ULL), /* 10^4 */ - [0x36] = make_floatx80(0x4019, 0xbebc200000000000ULL), /* 10^8 */ - [0x37] = make_floatx80(0x4034, 0x8e1bc9bf04000000ULL), /* 10^16 */ - [0x38] = make_floatx80(0x4069, 0x9dc5ada82b70b59eULL), /* 10^32 */ - [0x39] = make_floatx80(0x40d3, 0xc2781f49ffcfa6d5ULL), /* 10^64 */ - [0x3a] = make_floatx80(0x41a8, 0x93ba47c980e98ce0ULL), /* 10^128 */ - [0x3b] = make_floatx80(0x4351, 0xaa7eebfb9df9de8eULL), /* 10^256 */ - [0x3c] = make_floatx80(0x46a3, 0xe319a0aea60e91c7ULL), /* 10^512 */ - [0x3d] = make_floatx80(0x4d48, 0xc976758681750c17ULL), /* 10^1024 */ - [0x3e] = make_floatx80(0x5a92, 0x9e8b3b5dc53d5de5ULL), /* 10^2048 */ - [0x3f] = make_floatx80(0x7525, 0xc46052028a20979bULL), /* 10^4096 */ + [0x00] = make_floatx80_init(0x4000, 0xc90fdaa22168c235LL), /* Pi */ + [0x0b] = make_floatx80_init(0x3ffd, 0x9a209a84fbcff798ULL), /* Log10(2) */ + [0x0c] = make_floatx80_init(0x4000, 0xadf85458a2bb4a9aULL), /* e */ + [0x0d] = make_floatx80_init(0x3fff, 0xb8aa3b295c17f0bcULL), /* Log2(e) */ + [0x0e] = make_floatx80_init(0x3ffd, 0xde5bd8a937287195ULL), /* Log10(e) */ + [0x0f] = make_floatx80_init(0x0000, 0x0000000000000000LL), /* Zero */ + [0x30] = make_floatx80_init(0x3ffe, 0xb17217f7d1cf79acLL), /* ln(2) */ + [0x31] = make_floatx80_init(0x4000, 0x935d8dddaaa8ac17ULL), /* ln(10) */ + [0x32] = make_floatx80_init(0x3fff, 0x8000000000000000LL), /* 10^0 */ + [0x33] = make_floatx80_init(0x4002, 0xa000000000000000ULL), /* 10^1 */ + [0x34] = make_floatx80_init(0x4005, 0xc800000000000000ULL), /* 10^2 */ + [0x35] = make_floatx80_init(0x400c, 0x9c40000000000000ULL), /* 10^4 */ + [0x36] = make_floatx80_init(0x4019, 0xbebc200000000000ULL), /* 10^8 */ + [0x37] = make_floatx80_init(0x4034, 0x8e1bc9bf04000000ULL), /* 10^16 */ + [0x38] = make_floatx80_init(0x4069, 0x9dc5ada82b70b59eULL), /* 10^32 */ + [0x39] = make_floatx80_init(0x40d3, 0xc2781f49ffcfa6d5ULL), /* 10^64 */ + [0x3a] = make_floatx80_init(0x41a8, 0x93ba47c980e98ce0ULL), /* 10^128 */ + [0x3b] = make_floatx80_init(0x4351, 0xaa7eebfb9df9de8eULL), /* 10^256 */ + [0x3c] = make_floatx80_init(0x46a3, 0xe319a0aea60e91c7ULL), /* 10^512 */ + [0x3d] = make_floatx80_init(0x4d48, 0xc976758681750c17ULL), /* 10^1024 */ + [0x3e] = make_floatx80_init(0x5a92, 0x9e8b3b5dc53d5de5ULL), /* 10^2048 */ + [0x3f] = make_floatx80_init(0x7525, 0xc46052028a20979bULL), /* 10^4096 */ }; int32_t HELPER(reds32)(CPUM68KState *env, FPReg *val)