From patchwork Tue Aug 13 12:49:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 171183 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp861306ily; Tue, 13 Aug 2019 05:50:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy05CEClIpCDylKNj8oApZAdk47o/3cDyosig7gSUpj4HTWSOyABaE7TWaPlb8o9Drjao/ X-Received: by 2002:a17:906:5c4e:: with SMTP id c14mr34701402ejr.73.1565700611601; Tue, 13 Aug 2019 05:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565700611; cv=none; d=google.com; s=arc-20160816; b=Y2lcA1xNsOhxgqVWVNVN2hTfkKxMDFAv9bQCblO7Pk4vvV9kfpu2KIqXiJIV1a0Akl fN0BQ83FITDk9X+QP1pwbbyAKDn0H8BgdZGalwdOr5Uw2BJGj5Wou/46uzByjYGeJ8T+ xe5R5pAZW0BW/WtPNd3J6HYz2mHKRMzHCA0VJJw1Cq14UeYha6jtTGPYSskRFZgaNezc XEI1ZspZJZGBKBGwImGqDv11Ckz5fYTx3vhfW6sAI6RogfO/4jm1fCY/OgMHAQC/90fA xZ5xtr8iS/zUtNmw1Won40atXlofXDzBlZ2h7b5WVUrwJomefJlncQ8ebK0XjJXZ8oSm S0NQ== 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 :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature; bh=unFrNW8YfxZI1kq8HWXajrX3RMWsmQKNT0d1Tt9LFB8=; b=guPu1N6q/Sbzs9D99qlZjxi6h4LFDUbhmLsKx3CSDYN5EQsUp894KGsnNG4E1XLuir F7LHJFUadyTU9L+8RT72IHV1yOWEDU4JQ/xz6GTEncsNxWOKIsKKlhotQHj7qv/p7QOK lWP+IexS6xbbEF7i1JYW3TWCHMPiLzpsOcgK8tsblss2gRmLUV9TQdpuBoS5Yuzy+CF+ rCgoU465xozWvbEuwDBwJgN7XNT2UtRxAdwG6H9xHZR/mrcpwViAFbjBc4Cf3YzJXU/E 5sl7ueWK607nRuXynlwBU1zpDrWm2Zocw2oOUmMLi3TYt7xppDWL+NUp97rUVUQG+uI2 CX1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iFCo8LrV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e22si37582943ejq.52.2019.08.13.05.50.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 05:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iFCo8LrV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:51978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWFe-0002Gz-Js for patch@linaro.org; Tue, 13 Aug 2019 08:50:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53531) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWFK-0002Ge-SX for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxWFJ-0000cY-OI for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:50 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxWFJ-0000b8-H5 for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:49 -0400 Received: by mail-wm1-x344.google.com with SMTP id p74so1390930wme.4 for ; Tue, 13 Aug 2019 05:49:49 -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:mime-version :content-transfer-encoding; bh=unFrNW8YfxZI1kq8HWXajrX3RMWsmQKNT0d1Tt9LFB8=; b=iFCo8LrVPNTQOzLrHt815uTI01WSZ45df/p+FNtIET6BxTKpeUQE7MWBLo2JsGce+t j02VTXAZ4EHBUqVc25T3MUbXhKy6itgDmqRHMMBGMn9ei+KlnFd/pFxPn3zX1Lf1PTAO mBzioRGFcInW14vTWSE+fKiIYoW3eFrkLr8FPFtzihePn+EBnwrXeKReM9L7wDpN8aaL zSQcQWxvbtYmLAs9602JNe5yBsUoe5dNBy+qiPc7oUn4s5YYIwfmDaFQ0sy7KpNX3ofY b+vOI4bauzsA8shlO6eMWEKy0SIBVyqpG6R4LDvm/grE9X7ABIJ6ePrOuusqDOudpO7a Syig== 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:mime-version :content-transfer-encoding; bh=unFrNW8YfxZI1kq8HWXajrX3RMWsmQKNT0d1Tt9LFB8=; b=gy8Gyw6sLPtSXi7aZjC0sx6XjdQZE9I6OsMUy8cSsgx/5sZgd+9TI5oenMl30BHvh2 lRJMYJ3ExldyJiFnT3ad/94qruNrRsL9n6zZT6nSfHF/4kHfg/sWcUcTEqUmTMsSqiqh kB0rrQo8oBANqHOd163TsHwPFLLDBG7o1zAyb4ZLJte0CKjkAqaoD+1BR2981r+hrR42 hKKdscpy595Q+EmBD8APkxPxi48/zarqihcycUw7SzJtz/gF/Dz3LDxtzxUKm34gRM+N gAk+QJIcWCSBTUf2gR/pAiF6snkV0lV8nWcrgoA/th2HU4yACvZoYUM1xBAslgI7q0nl Ey4g== X-Gm-Message-State: APjAAAXunC5xWbgwuwruBUhLtHzPYVkOoryi4wV3KPWMCRuObThs9pHm 7nxfpPvU24kIk7ab6jlNsvl+Zg== X-Received: by 2002:a05:600c:22c6:: with SMTP id 6mr3004283wmg.5.1565700587891; Tue, 13 Aug 2019 05:49:47 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p7sm1440339wmh.38.2019.08.13.05.49.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 05:49:47 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E15BE1FF87; Tue, 13 Aug 2019 13:49:46 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 13 Aug 2019 13:49:33 +0100 Message-Id: <20190813124946.25322-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v3 00/13] softfloat updates (include tweaks, rm LIT64) 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: =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, Another iteration of updates for softfloat. Instead of moving the LIT64() macro from one file to another we convert the uses to the stdint.h macro. I did eliminate one of the uses by converting the squash_input_denormal functions to the new style code. However as you can see with the follow-up patch it bloated the code a little. I'd like to convert the x80 and 128bit FP functions to the new style but the challenge is seeing how we can get greater re-use of the common functions without bloating the generated code. However if we can do that we should eliminate a class of bugs in the current code. There are a bunch of minor checkpatch complaints as all touched lines haven't been fully converted to the proper brace style but I avoided do that to make the patch more readable. The following patches need review: 01 - fpu replace LIT64 usage with UINT64_C for special 02 - fpu convert float 16 32 64 _squash_denormal to ne 03 - fpu optimise float 16 32 64 _squash_denormal HACK 04 - fpu use min max values from stdint.h for integral 05 - fpu replace LIT64 with UINT64_C macros 06 - target m68k replace LIT64 with UINT64_C macros 07 - fpu remove the LIT64 macro Alex Bennée (13): fpu: replace LIT64 usage with UINT64_C for specialize constants fpu: convert float[16/32/64]_squash_denormal to new modern style fpu: optimise float[16/32/64]_squash_denormal (HACK?) fpu: use min/max values from stdint.h for integral overflow fpu: replace LIT64 with UINT64_C macros target/m68k: replace LIT64 with UINT64_C macros fpu: remove the LIT64 macro fpu: move inline helpers into a separate header fpu: make softfloat-macros "self-contained" fpu: rename softfloat-specialize.h -> .inc.c target/mips: rationalise softfloat includes target/riscv: rationalise softfloat includes targets (various): use softfloat-helpers.h where we can ...pecialize.h => softfloat-specialize.inc.c} | 26 +- fpu/softfloat.c | 262 ++++++++---------- include/fpu/softfloat-helpers.h | 132 +++++++++ include/fpu/softfloat-macros.h | 8 +- include/fpu/softfloat.h | 65 +---- linux-user/mips/cpu_loop.c | 1 + target/alpha/helper.c | 2 +- target/m68k/softfloat.c | 98 +++---- target/microblaze/cpu.c | 2 +- target/mips/cpu.h | 8 +- target/mips/internal.h | 7 + target/mips/msa_helper.c | 1 + target/mips/op_helper.c | 1 + target/riscv/cpu.c | 1 + target/riscv/cpu.h | 2 +- target/riscv/fpu_helper.c | 1 + target/s390x/cpu.c | 2 +- target/sh4/cpu.c | 3 +- target/tricore/helper.c | 2 +- target/unicore32/cpu.c | 1 - 20 files changed, 342 insertions(+), 283 deletions(-) rename fpu/{softfloat-specialize.h => softfloat-specialize.inc.c} (98%) create mode 100644 include/fpu/softfloat-helpers.h -- 2.20.1