From nobody Mon Feb 9 16:34:02 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499240515178453.62390767404725; Wed, 5 Jul 2017 00:41:55 -0700 (PDT) Received: from localhost ([::1]:44611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSewb-0004qA-UU for importer@patchew.org; Wed, 05 Jul 2017 03:41:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeXA-00054n-5f for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSeX9-0007wk-58 for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:36 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:35912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSeX8-0007uj-Uc for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:35 -0400 Received: by mail-wr0-x242.google.com with SMTP id 77so49088394wrb.3 for ; Wed, 05 Jul 2017 00:15:34 -0700 (PDT) Received: from 640k.lan (94-39-191-51.adsl-ull.clienti.tiscali.it. [94.39.191.51]) by smtp.gmail.com with ESMTPSA id y35sm22202793wrc.51.2017.07.05.00.15.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 00:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=1YWVu8t2x0HGh43WK51jgINtsgyH/VH5eKsUAVUhM3Q=; b=YcJq/vezvCqcNUxGUXTSMKI1B02I5hZBE/2OAAVtAqQAMlcCMmLQtoK4fAyyW+Bksx T49224GV6ESEh+86fW1t0MGM8RCnOQ9W3DD2Vv4pkuJiXeWsv+PfPXXupyURdh5FV1m4 tOfNwRGBe/BLraR2TtNVfRCVMAZ+fI+dX9oEtbzp+36qA6JDKIzhUWR0FM3s5PDW5Lb+ E0W9jzsZ2EjxRxTnzuw3OcqGwXJBom64A/iReN37IAyl7SS+gBGH3M8XicIQ0tjXHOgC xItLZ9rc7EkxdWAgdlGAcg7HUnAlwo7bL6olFp2Y+4+XhfbsceEphfhkAh1VjyS5fXqq W4lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=1YWVu8t2x0HGh43WK51jgINtsgyH/VH5eKsUAVUhM3Q=; b=Hm4seehia7pYfuObvXhRROqcY7AZ3VA4FYGi4pgqEUrbxhUOcAV9RAf/YQ0iNtffqe cXsRnwzuCsJ50S1hwtgMy2qvzW6zbvEwNy3cOLPDDcLHGFoGj+ACeTGfdjbOwrP79sLS +GmK8wF0rosXo0lp3IthIKERHNa3OWBBxugJ+W2j4/66EdXVuuVlr9jbH9xSRyRGhR69 O26yvpPK1emvq45UN03Vea5evecDp/oHPRR288PR6A/adb87d9zJnMGsWu4dxK1H0EV2 r+XbMMtKJsNIufw2bvMcs0cGtHVb+UHYL+KsRadU5UXd2twMvtiFH4+BD6TYYtYn6juN Ezqw== X-Gm-Message-State: AKS2vOx3KIgnuHJl0C7E2Hfn6F+FENUS+6F18uktKJJIOj9ADFF6qLAR GRTyr6/XTjcgGxlrL5o= X-Received: by 10.223.164.80 with SMTP id e16mr40598660wra.24.1499238933855; Wed, 05 Jul 2017 00:15:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 09:14:41 +0200 Message-Id: <1499238885-26161-39-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1499238885-26161-1-git-send-email-pbonzini@redhat.com> References: <1499238885-26161-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL 38/42] target/i386: make cpu_get_fp80()/cpu_set_fp80() static 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: Yang Zhong Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Yang Zhong Move cpu_get_fp80()/cpu_set_fp80() from fpu_helper.c to machine.c because fpu_helper.c will be disabled if tcg is disabled in the build. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 2 -- target/i386/fpu_helper.c | 18 ------------------ target/i386/machine.c | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c5e143e..8d9ba36 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1418,8 +1418,6 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigne= d int selector, =20 /* op_helper.c */ /* used for debug or cpu save/restore */ -void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f); -floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper); =20 /* cpu-exec.c */ /* the following helpers are only usable in user mode simulation as diff --git a/target/i386/fpu_helper.c b/target/i386/fpu_helper.c index 69ea33a..34fb5fc 100644 --- a/target/i386/fpu_helper.c +++ b/target/i386/fpu_helper.c @@ -1539,24 +1539,6 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx, u= int64_t mask) raise_exception_ra(env, EXCP0D_GPF, GETPC()); } =20 -void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f) -{ - CPU_LDoubleU temp; - - temp.d =3D f; - *pmant =3D temp.l.lower; - *pexp =3D temp.l.upper; -} - -floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper) -{ - CPU_LDoubleU temp; - - temp.l.upper =3D upper; - temp.l.lower =3D mant; - return temp.d; -} - /* MMX/SSE */ /* XXX: optimize by storing fptt and fptags in the static cpu state */ =20 diff --git a/target/i386/machine.c b/target/i386/machine.c index 8c7a822..53587ae 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -142,6 +142,24 @@ typedef struct x86_FPReg_tmp { uint16_t tmp_exp; } x86_FPReg_tmp; =20 +static void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f) +{ + CPU_LDoubleU temp; + + temp.d =3D f; + *pmant =3D temp.l.lower; + *pexp =3D temp.l.upper; +} + +static floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper) +{ + CPU_LDoubleU temp; + + temp.l.upper =3D upper; + temp.l.lower =3D mant; + return temp.d; +} + static void fpreg_pre_save(void *opaque) { x86_FPReg_tmp *tmp =3D opaque; --=20 1.8.3.1