From patchwork Sat May 8 01:47:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12245521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32359C433B4 for ; Sat, 8 May 2021 02:04:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C616F6140E for ; Sat, 8 May 2021 02:04:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C616F6140E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfCKp-0007IV-U4 for qemu-devel@archiver.kernel.org; Fri, 07 May 2021 22:04:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfC58-0004Rf-2E for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:38 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:37543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfC4r-0003dE-IC for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:37 -0400 Received: by mail-pf1-x432.google.com with SMTP id b15so9152597pfl.4 for ; Fri, 07 May 2021 18:48:20 -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 :mime-version:content-transfer-encoding; bh=qte4K79lCpY0AmN2YUzdHn4+5EUkv6ETvmLEVo/dFmc=; b=JH2aEN4ZqIL/iOdwfWrKgMfSk/aLY1x6rO0gC4ew+UAFVNc9BW8LiNBOGo91dEAkXm ooyDbuJxWMZpWiWnP6PkSA4Un//SyxZvqbzTREJSqh6sjFO2LhEIcI8mZrpPO8SZYd69 rqYtPugg1uKZjqhxuNpXsBoGoJ+g3bTN1nFwa9RDMQbxoSwlvW9dPd8FaGLB1CvI1mj5 F6eHCGt7fIXJMT/6CfssFU7UsZoE5p/ZWfD0sne/WTIBZzMlPmkXt3oEvJ96p8fWmo/m NzkP1x7uds2BHnbFFrju71hrMmkUy4Cij2MdmTKFxXPj9ueMvGRO0iqZx5KJA9qzjbeP +J8Q== 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:mime-version:content-transfer-encoding; bh=qte4K79lCpY0AmN2YUzdHn4+5EUkv6ETvmLEVo/dFmc=; b=mCdjQbgUzsbT3hGSbkUsWgfLOMULOj95CxfME9CKBntZZo4UnIl0LFX4zhQwSX0Y0T R1ibBvD22ibN/3S3NFRgYqjyFC2k6btUXoHUt66kCfpgd9UGD7w2rVarfI3AHqSGbwxK edreehh/tM54Uh4MNLbF7xPIWv53ILl82iJhHrNgVAZ+256682ZDOq2Vr+rFitVHzDJg WS4jzU/10o1Ss9JoWVTGouYzKV1eMIg2s+Oz6e0vVxRlV7oGCPnd15yeIIa9eWJfDpx+ ZDyZ8rKORc/xbZ7OpucCKjNnnQ9Hl03Xex8TCb/X8jlpUiSY/9+wuSnxrRjfS9lfy0Xw o+HQ== X-Gm-Message-State: AOAM531nBXDm9eehUccBvLmJAiyr4M8aWiGh/zRvFmjrgaNOXbjigKGW Kr/QjQAOm+IVtvfcHXuQwNI0MzotRz5n9w== X-Google-Smtp-Source: ABdhPJy7w6q8MkrWwxB5epPsnWXuhXkDVkuqStSuhQHoSsrcDUEnQ/kljg7M9bcJbQ5MIFMbrpz3gw== X-Received: by 2002:a62:aa04:0:b029:28e:f2ee:f7a8 with SMTP id e4-20020a62aa040000b029028ef2eef7a8mr13726888pff.62.1620438500101; Fri, 07 May 2021 18:48:20 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id t4sm5819681pfq.165.2021.05.07.18.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 18:48:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 25/72] softfloat: Rearrange FloatParts64 Date: Fri, 7 May 2021 18:47:15 -0700 Message-Id: <20210508014802.892561-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210508014802.892561-1-richard.henderson@linaro.org> References: <20210508014802.892561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, david@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Shuffle the fraction to the end, otherwise sort by size. Add frac_hi and frac_lo members to alias frac. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- fpu/softfloat.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 2123453d40..2d6f61ee7a 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -511,10 +511,19 @@ static inline __attribute__((unused)) bool is_qnan(FloatClass c) */ typedef struct { - uint64_t frac; - int32_t exp; FloatClass cls; bool sign; + int32_t exp; + union { + /* Routines that know the structure may reference the singular name. */ + uint64_t frac; + /* + * Routines expanded with multiple structures reference "hi" and "lo". + * In this structure, the one word is both highest and lowest. + */ + uint64_t frac_hi; + uint64_t frac_lo; + }; } FloatParts64; #define DECOMPOSED_BINARY_POINT 63