Message ID | 20181004175700.20847-4-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1287910lji; Thu, 4 Oct 2018 11:01:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV608FYMtaI0tbJeb6qh7+g4ZiLelsU9IgcNVhP0qFjOnfEN++I5EL6VX3bJXn72woNoENF7e X-Received: by 2002:a37:a49:: with SMTP id 70-v6mr5980271qkk.63.1538676112910; Thu, 04 Oct 2018 11:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538676112; cv=none; d=google.com; s=arc-20160816; b=NdHzGpK7fCMOj/6rHgVE3OXF1epuWxFPUTtFYpZpau8v8oDPQqKa0jgliSrAe9GyPF gM1XVqx/XGdY5Qd/wGKFITTfqHLxEjjlABF+dGFnN8haxQqqYkkZvH87zrSeqgAPA/9i 47i9xQ4Uk3w4Ay5wpxcmYVCS92lrBp8fis/QPJlf7X2sP9stdH+6s2GmKoReUZuPL3+8 kNFw0t2bJ6vwFHyppOD+GOM+JG627bWmHAK86SBdgc/KodiUbMKrkJtOZU8oW7tJkyhU ydjn5qqx0efU7cLHkYot5VLC4nbvH555W9EcQ4bh1hEqQ1S5aoQfBtnfhY09Sq13V5ZF h8Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=xKPvW5IjWZu4Fj5tr9JMUkuXW0J49HylPrXBi7VJgeY=; b=tzuVUr9ew66A3Wz8wedPuownfyhOXB5rPoaPrchuJTfn5EmB+Pjo9GEPZCca9D8/Tx STtviyY6v+OvmkiCFnDPKDisbeQV17REJqKe0GA04g+mrj/UTvrrSTleRM3rBzcW1l18 vWFBbWKMmwJN5gKgGWW/M1mmtsPIGMaqof4T/oFs6FceXXB3OHysGvnw309naGV4itTI 4S382yEkJ9iDgeUrzwMkflWtIYmcOriWZ7ZGBj21mj2kLHQL9tRO+9pAMIQ0pwIXL0pA jR2aHtLpAJsxLzbAock7AwI1Ik/P4phakCZLHmh4EyJtBCQiDxWUjRLWyFOQJgQozZIv xS1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IbfK+tzH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 34-v6si3317426qtp.70.2018.10.04.11.01.52 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 04 Oct 2018 11:01:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IbfK+tzH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1g87we-0001E5-6q for patch@linaro.org; Thu, 04 Oct 2018 14:01:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g87sH-0006Du-BT for qemu-devel@nongnu.org; Thu, 04 Oct 2018 13:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g87s7-0005le-9d for qemu-devel@nongnu.org; Thu, 04 Oct 2018 13:57:17 -0400 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:36017) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g87s6-0005kf-P0 for qemu-devel@nongnu.org; Thu, 04 Oct 2018 13:57:10 -0400 Received: by mail-ot1-x342.google.com with SMTP id c18-v6so10085890otm.3 for <qemu-devel@nongnu.org>; Thu, 04 Oct 2018 10:57:10 -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=xKPvW5IjWZu4Fj5tr9JMUkuXW0J49HylPrXBi7VJgeY=; b=IbfK+tzHzKB8j1kIu/vo26T8zGw1fVMwsDBbSsLTwsEYQstb5PWXxEeaRszc/E4ioo 0LWZgVY3o2mZiZBCj853aKMhZdL4ThwWZv9AJyAJT1p+zuWhODAylvSJENL3GZ1CzYpM Pwl6mJvxgfmdXaT44oa3nPqq0S7LqP/Vm8JS8= 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=xKPvW5IjWZu4Fj5tr9JMUkuXW0J49HylPrXBi7VJgeY=; b=mTo4dRsvM9TB9wFebhC5DktTTFP7BrSnBLo5bVggRctCV2wDx5SRmVgl6BxaQ5KjeY BX2dWzUYEKlS2SM4M0kVtNqSN+aiu/GfOM2cfwEEaRpSwej7x9Vwk/k4uSRxa1p1ftTA 6iZVy/IkFLo6laTpLoVSbFWncOWE32IzB7+BgHToLsPrS1SJO5ZRwAcApNAE+gUDIxz+ cdGXmDinOHEpvBUZ79sLcAab+p2id+c6qC2ALpzHW46QnMUh8BsHelsPz1M5QHkyzvKy VIU+/IDKvQqmyheBvpAPqCibEzO5szI7gOsQqbYz8D4p49ZldYzugQZh9viDYNA+Rd3v bgKA== X-Gm-Message-State: ABuFfohPtaJ9WLEoqZwH766BVaauYPPxb6fj5xtT4cSi/nH7HigLwKyB PVHkpeIgh3zLSHsx9q5B15JGYYEME/iTLA== X-Received: by 2002:a9d:5148:: with SMTP id u8mr4103456oti.5.1538675829712; Thu, 04 Oct 2018 10:57:09 -0700 (PDT) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id f84-v6sm1830649oia.44.2018.10.04.10.57.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Oct 2018 10:57:08 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 4 Oct 2018 12:56:59 -0500 Message-Id: <20181004175700.20847-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181004175700.20847-1-richard.henderson@linaro.org> References: <20181004175700.20847-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::342 Subject: [Qemu-devel] [PATCH v3 3/4] softfloat: Specialize udiv_qrnnd for s390x X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: cota@braap.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
softfloat: Fix division
|
expand
|
diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index 39eb08b4f1..eafc68932b 100644 --- a/include/fpu/softfloat-macros.h +++ b/include/fpu/softfloat-macros.h @@ -641,6 +641,12 @@ static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t n1, uint64_t q; asm("divq %4" : "=a"(q), "=d"(*r) : "0"(n0), "1"(n1), "rm"(d)); return q; +#elif defined(__s390x__) + /* Need to use a TImode type to get an even register pair for DLGR. */ + unsigned __int128 n = (unsigned __int128)n1 << 64 | n0; + asm("dlgr %0, %1" : "+r"(n) : "r"(d)); + *r = n >> 64; + return n; #else uint64_t d0, d1, q0, q1, r1, r0, m;
The ISA has a 128/64-bit division instruction. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/fpu/softfloat-macros.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1