From patchwork Fri Nov 19 16:04:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 519244 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp2718356imj; Fri, 19 Nov 2021 08:07:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuDTVgZUD91OHgnZ0ZBPsVg/XJAfOLSFPh1XMjP8kQeuknDeR8as3ovXG/ovBFFCcgWa1A X-Received: by 2002:a05:6122:c8b:: with SMTP id ba11mr117574319vkb.3.1637338032442; Fri, 19 Nov 2021 08:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637338032; cv=none; d=google.com; s=arc-20160816; b=qMjkKBeu9r2xteSZc9GNXxOGBIboi4P6xaQuSiyli3snKFHlZJ7xjNyVj6Y3N0dB8I R0nuq0Yy8HMDWl5y4nP3qmntB9g/Sa/NU5QZlaI3fFeK5dZCpfZVrAgqkF2I4FJrvJyP Yb20Q7NSUnWd0815aelufK4YzKTgutWI9an5ckojrsoDrDlR/9F0SGWZUjp8PIUe6ZuH KGQzRAbpWKBOMboRuqQ5F4MIFWbL9QVYyB9hDXAdfwR6H8uHGFcueteosi3c7tsM25UX ivOrDjuZx440pl9ELq0sjcrHZ6/GCodcx17Bv0dmZHdvZ7AlMOGYitYzIPt3xqnVU9AI SZJQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6+kbNIKcCXK0907P7ugOR11mTD7P22rtbPbpDrzrWQA=; b=yL5Ngf/JJnFVYQtBsDFS5swGhhA1drtfxx22zkBUoqi16xPoZw55Q2+d2nxEYD/F1s 2VkHqwNUPX7YeBvS3206DWBVRRZsbwI0e/jSalXYCcghH1qv7B+nXCn9f6CRPIwSt2iZ 1Zk/9fIMZsLHzbTatnKVPF1c3IANcioQhNkBiubiOPNXWBmkizYSi/C3ih/PAbCZVS5w usYwm5S9LSJ6jTqx8riVtBAdTiQUjXZFR3jA4JjNxSE2qFQWzdfyucPF7wVL4FyaolU9 U89vkF/cUxlHdFPYyYzFOOrAN1VCuITPB5IOkux96vq8gXXpPj8vPqITNtg0l8jH/wwi 9SNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oA4RRY7P; 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 33si662034vkn.39.2021.11.19.08.07.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Nov 2021 08:07:12 -0800 (PST) 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=oA4RRY7P; 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]:52372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo6Pv-0005fw-1c for patch@linaro.org; Fri, 19 Nov 2021 11:07:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo6OA-0004qx-Vn for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:23 -0500 Received: from [2a00:1450:4864:20::42e] (port=45965 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo6O6-00046m-GY for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:22 -0500 Received: by mail-wr1-x42e.google.com with SMTP id w29so18927155wra.12 for ; Fri, 19 Nov 2021 08:05:10 -0800 (PST) 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=6+kbNIKcCXK0907P7ugOR11mTD7P22rtbPbpDrzrWQA=; b=oA4RRY7Pw/L6IOWd/1jDHcgayjN8IT6UW1MRHH2eGrRNnbjwmKjzlzmlarC0VGRimS vsUaVZ+FIHbvK0T36Js8HO1cLg2vDaAkpCa2XlqYT/VahWyynuCeSgwk3MGbmDn29xd6 THhmWnEcWv1jIy9jAHLhBHOdT9W9UU6626rHTzo3h/vQGahPntrBAZqZkIuhP89VoQXG aa1oWY5478hmeZClOtSQuOTXroi4ieCkWgmaF+SFfmoiOu7qk1JbQY9kaLNH0K5DsnAI PM0GBSTq0iWxJjh4lmuBhrUTNqON5qbAG5jPFlhkgsECvsayY9K6Qxetnn1emn44+cVB wb3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6+kbNIKcCXK0907P7ugOR11mTD7P22rtbPbpDrzrWQA=; b=DlANyDqr+zXhj244QHZehLplD6Z3MOhw+jAGKrX43G2ugcDCZN9VKRyfeTZFNSmK3i x6MY5kBiXdtGfILWVkD6GQ95VjTj48jTYX1wAR706p/BDiJVpq4qvEJnnQkv9KsqE16i TyiqN4eJSM5WWH5DJNlDP3IZ+OQ6RETBSCSHK1DK4DrSQmwoHZScg1yV51JFpcsJTKlJ DITIODQl00GrpUotEijsTALQVYO3nbKQY4GHsd6TL7a71/Rt4e2Oxg4Jn+zW14EiU0xe eTIIUcKgBzmL304UsMf0Wl/kcToDj9soj7tfVjzun/ARkdxVOUEr3Twv9ybkRFNMnhYd Bp3Q== X-Gm-Message-State: AOAM530L19Ix9cXGRxa37es6FPquVVge3ZiL7VL72JLeBPuvFn2s1oTa ghs3nq0eAStJXruNyI+kcH+sozpOmZGyi1tsmB4= X-Received: by 2002:a5d:424c:: with SMTP id s12mr8400938wrr.370.1637337908849; Fri, 19 Nov 2021 08:05:08 -0800 (PST) Received: from localhost.localdomain (165.red-37-158-79.dynamicip.rima-tde.net. [37.158.79.165]) by smtp.gmail.com with ESMTPSA id q84sm14044877wme.3.2021.11.19.08.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:05:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/35] softfloat: Extend float_exception_flags to 16 bits Date: Fri, 19 Nov 2021 17:04:28 +0100 Message-Id: <20211119160502.17432-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119160502.17432-1-richard.henderson@linaro.org> References: <20211119160502.17432-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com, alex.bennee@linaro.org, clg@kaod.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We will shortly have more than 8 bits of exceptions. Repack the existing flags into low bits and reformat to hex. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/fpu/softfloat-types.h | 16 ++++++++-------- include/fpu/softfloat.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 5bcbd041f7..65a43aff59 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -145,13 +145,13 @@ typedef enum __attribute__((__packed__)) { */ enum { - float_flag_invalid = 1, - float_flag_divbyzero = 4, - float_flag_overflow = 8, - float_flag_underflow = 16, - float_flag_inexact = 32, - float_flag_input_denormal = 64, - float_flag_output_denormal = 128 + float_flag_invalid = 0x0001, + float_flag_divbyzero = 0x0002, + float_flag_overflow = 0x0004, + float_flag_underflow = 0x0008, + float_flag_inexact = 0x0010, + float_flag_input_denormal = 0x0020, + float_flag_output_denormal = 0x0040, }; /* @@ -171,8 +171,8 @@ typedef enum __attribute__((__packed__)) { */ typedef struct float_status { + uint16_t float_exception_flags; FloatRoundMode float_rounding_mode; - uint8_t float_exception_flags; FloatX80RoundPrec floatx80_rounding_precision; bool tininess_before_rounding; /* should denormalised results go to zero and set the inexact flag? */ diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index a249991e61..0d3b407807 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -100,7 +100,7 @@ typedef enum { | Routine to raise any or all of the software IEC/IEEE floating-point | exception flags. *----------------------------------------------------------------------------*/ -static inline void float_raise(uint8_t flags, float_status *status) +static inline void float_raise(uint16_t flags, float_status *status) { status->float_exception_flags |= flags; }