From nobody Tue Feb 10 20:07:34 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538590282505452.324411593076; Wed, 3 Oct 2018 11:11:22 -0700 (PDT) Received: from localhost ([::1]:51683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7lcH-0005GB-4b for importer@patchew.org; Wed, 03 Oct 2018 14:11:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7lYf-0002f5-VH for qemu-devel@nongnu.org; Wed, 03 Oct 2018 14:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7lYb-0005Am-Ta for qemu-devel@nongnu.org; Wed, 03 Oct 2018 14:07:37 -0400 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]:43579) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7lYb-000478-KP for qemu-devel@nongnu.org; Wed, 03 Oct 2018 14:07:33 -0400 Received: by mail-oi1-x230.google.com with SMTP id s69-v6so5288521oie.10 for ; Wed, 03 Oct 2018 11:07:20 -0700 (PDT) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id f84-v6sm677709oia.44.2018.10.03.11.07.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Oct 2018 11:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g1slopZ4qkafsxJ+xoE1KW0cUVFz+tpfz7X9jI7y1Jo=; b=RJRkHG6R1Ihk37M6a2dBUc9Iz39O3K8sRBWf6c0wGk8kwT2W4ZHgSXkZrD/09VpMlY 08+N+Q6VowGi/17l19gh2NtkG7f3yOmTRjVhEHcuE7HnUISugSkhp6QU3ogdjTbL0c7K dY5n34Rd2BfM/9Z5KHe6qqn9I0PngRJG1vzkw= 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:in-reply-to :references; bh=g1slopZ4qkafsxJ+xoE1KW0cUVFz+tpfz7X9jI7y1Jo=; b=HQ8scOStwH5xUtd8FY25RVGSGRxZXLTlr0xfWt3s4UG8EVnJe4haO5K3LUrpLK4wa4 XZ+WOckNt3Zt7eoFgv8Rd4POFB5ZDxQOnwDw/mV312COW7ortn3NiNuldh/XZgvRBizA ROhV2giDS065+N+3YtKU8TGQ//10a3xbLnIJUTX0AM8PJ4S7MC9uA0R696spdqYis30Y di2LS+m1o7FY9/iQoc+f7LmkeFpj6SJ4awzsJGLWWh906kCcBZVEiUkOiYcoa9VjLlH9 chve7uBWp3PTI5d0GMpjCEhH5PVeEPkKTTjkomWytcMeKvIBy5J5ERxmCyuEqF0PSOj+ fkTQ== X-Gm-Message-State: ABuFfohDZb2QK3HfG/Tzqp7DiNcbsTBoUIpNbX2PLN+6Uedym9mhiXUd bNQ+SumYhpZ4NDuvOqE0IkF+n48T0iLckA== X-Google-Smtp-Source: ACcGV63I0urqnWrKfIJvsyHonfD8Ak0eEjbh/cE+2kmuhVw8LtaGJCkiQXtOWZ4gecTuy/z+RqG1PA== X-Received: by 2002:aca:3546:: with SMTP id c67-v6mr1366160oia.249.1538590039070; Wed, 03 Oct 2018 11:07:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 3 Oct 2018 13:07:09 -0500 Message-Id: <20181003180711.19335-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181003180711.19335-1-richard.henderson@linaro.org> References: <20181003180711.19335-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::230 Subject: [Qemu-devel] [PATCH v2 2/4] softfloat: Specialize udiv_qrnnd for x86_64 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: cota@braap.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The ISA has a 128/64-bit division instruction. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index 03312471b2..6d58615709 100644 --- a/include/fpu/softfloat-macros.h +++ b/include/fpu/softfloat-macros.h @@ -622,6 +622,11 @@ static inline uint64_t estimateDiv128To64(uint64_t a0,= uint64_t a1, uint64_t b) static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t n1, uint64_t n0, uint64_t d) { +#if defined(__x86_64__) + uint64_t q; + asm("divq %4" : "=3Da"(q), "=3Dd"(*r) : "0"(n0), "1"(n1), "rm"(d)); + return q; +#else uint64_t d0, d1, q0, q1, r1, r0, m; =20 d0 =3D (uint32_t)d; @@ -661,6 +666,7 @@ static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t= n1, =20 *r =3D r0; return (q1 << 32) | q0; +#endif } =20 /*------------------------------------------------------------------------= ---- --=20 2.17.1