From patchwork Sat Sep 21 04:32:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174174 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp248123ill; Fri, 20 Sep 2019 21:33:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8EY0Mq3AnSHbGQzoEpkWPuYp2wFS7ojRPLeNtenEsngavy7o59PFw0dq4kAmfJl/BUk3R X-Received: by 2002:a17:906:5644:: with SMTP id v4mr21676772ejr.52.1569040428894; Fri, 20 Sep 2019 21:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040428; cv=none; d=google.com; s=arc-20160816; b=rGtdSKM/OT0G7nu/tOzxvXP9JmuWcjCmq31PKdJ41ZcP7TeHhtdn6Pcs2laWD7dAgP Pprr9q25f9/b6sT5lKbPfb66lre/8Pl9KeVvQEgxq0c0ui9aen1FjLzz8Lk3dOgxVMxE i5zzRL4E8q5YdnwtXV+7iLWAHr0ccPOever1Xf+BH31seWIz33eSfxk29cpgmfz5P/Yr pk4+IIAelyQGDf3j9eJiCxmQ9AG8YuiJQMAm0KMVAzQidY2/6E271rhjQV/exJ3Iws6z LpT5bYLtdu725tecMlB2b9RK9MCGUsrlxwo3DuvyEx7rdeEdnqW5znBkaq2yRZbpzhHO hmqQ== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=b9hvT4KM2rHH/vsMDbpWRcPXcj5oYyVhJm17BHsajzk=; b=fycWKC8zjRZnLt/77J627bsQm7V4Ee6rUDpvLyzNUI9oT/4meYgmm6FNYUNQJDBQVa TX+b76ir9GGOKq1h11HeA2Xy7tCzgZIVJNpIEn/svV4kQdHps6IFwFfx+LTcTOOaE5le 4Vy+TS7cSeLYhyMuCdE+z91J6+zOlRRJRC/QY6oXKwV/qaHqHiPBZo656myoHHoD/Yoa 9mWTiYZunNC4VyhzEO16L72zl59jflfK7MKSI00fyMUbbDCbwlUtxGUTDyaH4e1Q2yFT 7VCtje2wNudyc7A3byE5KCb8PdH1I2/1OPpQKNG+OlwaXFPTbhEr55pAamKqfKSAcVqt 1eAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oLFJL9GX; 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=pass (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 a7si2096674ejx.258.2019.09.20.21.33.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:33:48 -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=pass header.i=@linaro.org header.s=google header.b=oLFJL9GX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5f-0003KO-Og for patch@linaro.org; Sat, 21 Sep 2019 00:33:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40463) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX54-0003JE-Pt for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX4x-0006OQ-Ja for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:07 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:36626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX4w-0006N3-MJ for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:03 -0400 Received: by mail-pl1-x644.google.com with SMTP id f19so4150458plr.3 for ; Fri, 20 Sep 2019 21:33:02 -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=b9hvT4KM2rHH/vsMDbpWRcPXcj5oYyVhJm17BHsajzk=; b=oLFJL9GXQvvNWFVixLW67J3Rg01HY92uuAArV94f51S6MObOMeWnJXllwd+xEsL2vO PnKCY5AMAqA++FVwJr+bHYu9nxEjIJX0i61zNr15WN2ep3jWB5BCLbZBcs1AAfiTdmrl b2N5vD8FF3OdLQ/XwdRev7fVcE9K0Xn2S7CHwgr046a2fOApext+cZLV0ql9TOC9Rnsd +XdnzVWNR9N/dnUORZr3ajHTRQOopmBDGrSnnrZLPGKmmE5XugDXCfoQ+pH81iKEgBFC saWGkZ6gihQUFbv2P2S2Hpn/0HJWTd1qiXklcbnzVYa1DZnch42vrsewApUC9jLiXiTh xfqg== 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=b9hvT4KM2rHH/vsMDbpWRcPXcj5oYyVhJm17BHsajzk=; b=brzTrqsA9PqRNmv2D92FqrKiwq1oLUa5jRN8bc2XFizoWzSe0RiRP62c3D/JSLq8ek 9B5wq2FT1iEBgAfTDma9MLh1x1kB5zHW/jZ4zfFlEHxjaRQQeJuL58235ILmZG6Op10h d2/CzFiPimU3BQUQBjWPqu8TjDxo9hatTj5RGN656N8/8mZM9v8N9djNqpKYP1r7kz3R SOOSocOakTKfmKk9Y4c6/Ixi1aYj/iziiqApHfs609Nw4VmjxgOHFGCPRvKaMqXRanyh fd4/DtTq9UoIuih/pprHsYQg0U82Km98ORY5uNeylZCfyaN5T7ZjhllPaK1/mgaHHLBk tBgA== X-Gm-Message-State: APjAAAXHty8sai8IpH5hNzKnz1RoMhaWDInYx0YFot7FGlzukydrNfB1 wvD2ThRA4fLIoVWTU0E6RMwzL0Quv/U= X-Received: by 2002:a17:902:8d98:: with SMTP id v24mr18471880plo.265.1569040380988; Fri, 20 Sep 2019 21:33:00 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 1/7] target/alpha: Use array for FPCR_DYN conversion Date: Fri, 20 Sep 2019 21:32:50 -0700 Message-Id: <20190921043256.4575-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::644 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a bit more straight-forward than using a switch statement. No functional change. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 19cda0a2db..6c1703682e 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -36,6 +36,13 @@ uint64_t cpu_alpha_load_fpcr(CPUAlphaState *env) void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) { + static const uint8_t rm_map[] = { + [FPCR_DYN_NORMAL >> FPCR_DYN_SHIFT] = float_round_nearest_even, + [FPCR_DYN_CHOPPED >> FPCR_DYN_SHIFT] = float_round_to_zero, + [FPCR_DYN_MINUS >> FPCR_DYN_SHIFT] = float_round_down, + [FPCR_DYN_PLUS >> FPCR_DYN_SHIFT] = float_round_up, + }; + uint32_t fpcr = val >> 32; uint32_t t = 0; @@ -48,22 +55,7 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) env->fpcr = fpcr; env->fpcr_exc_enable = ~t & FPCR_STATUS_MASK; - switch (fpcr & FPCR_DYN_MASK) { - case FPCR_DYN_NORMAL: - default: - t = float_round_nearest_even; - break; - case FPCR_DYN_CHOPPED: - t = float_round_to_zero; - break; - case FPCR_DYN_MINUS: - t = float_round_down; - break; - case FPCR_DYN_PLUS: - t = float_round_up; - break; - } - env->fpcr_dyn_round = t; + env->fpcr_dyn_round = rm_map[(fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT]; env->fpcr_flush_to_zero = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0; From patchwork Sat Sep 21 04:32:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174178 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp250920ill; Fri, 20 Sep 2019 21:38:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0hGVbZakmoFOZnNKWdQ51kFdBfWrSy99/6zgmphyqf9hkIg2v+/0twTSL+TnlY8ROlEtw X-Received: by 2002:a05:6402:1501:: with SMTP id f1mr25655876edw.76.1569040694311; Fri, 20 Sep 2019 21:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040694; cv=none; d=google.com; s=arc-20160816; b=HFtonN2s57E+d3/AAAbj/TOsYgyJD3cZmt4RjtZOSshDWJ+M0ENg+TSU+Xs1m86IUx /9WEsLm9py11ZAW99lkTn1w/tfMjYubQH9Hf45dxoAQKxJdx+4aKk+NF1etOUvq91ArH IcXRbIky0O4sFPzu68cmVmlBlogvydanuDnp1606f3fiIlBMk1ORq72W7/EQLVnR67A4 qOcNnAhLOSIXjJDtMDwwY8XBAFnSvpkJs3NjA9w5RM0kiNus1Y+aEuJqnPzUJ63+YLF9 fFKa+nPnLZCQzACfAoMfI5+l85J1oG3wFg3OAuEiqO7mIUSqZQ95vXqDz5z7x2tRQ9y9 rjgQ== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=N9p66J3CyRGSggPL0jEHpJ6N3kmg+tOoU7mSBRlNkcw=; b=Pl/S5uipWaLZ+rQ/83gawEdgM1tEJJUkGLTRKmOUtZET2Nnm2nhXuna18cFcBuXF08 fUb5L4SIiv/hSZYx9ytrqqcXw4Zhux9OGgkf6lqY63lFznCUUhjMPgl1G8Gp8ma8hQbm SawF2GcSNXm/1tGcIjCoZPNzvHpY5DWCEQsalbZig77b1rm7KBSoqZJgpyB659b/oxUy jwWDmJoQ5Gt48yW+Usu5nbQ92KUvNT+bkUqe9Wc19CHXtECbPUBMOhurTzEqdkO2GXMZ i7dpsC7EJZPg0v7qRN6F6ViUSY+l+Rve7zNnHUynZV/gJKXH46W1w3EeajyZsm9tprRB nL4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xpIFQJxm; 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=pass (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 b34si2945472edb.439.2019.09.20.21.38.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:38:14 -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=pass header.i=@linaro.org header.s=google header.b=xpIFQJxm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX9w-0007Vq-W9 for patch@linaro.org; Sat, 21 Sep 2019 00:38:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40496) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX56-0003JV-Gv for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX4z-0006Ph-8w for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:09 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:36572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX4y-0006P0-BZ for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:04 -0400 Received: by mail-pg1-x544.google.com with SMTP id h17so2438035pgb.3 for ; Fri, 20 Sep 2019 21:33:04 -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=N9p66J3CyRGSggPL0jEHpJ6N3kmg+tOoU7mSBRlNkcw=; b=xpIFQJxm3uzfSkSTraENbc8HtBffhVBVKmU/3hlMOLXFXvjpL6AzMM+qNg189A2EeY fdtVTTt8TLNtwvaSJ1/AI5r6bObjANZEVNdC4TgptegNcjnmu8Zm57eTJF168rxlxWmf AST4BhMwUUJPcU8SHg3k3AcSkBYU1jjTEwepy/ylmICHZSvvqUQq00qaYHR7jGafC2YP muTWddnz9Vf3T/nZCln6ChE26s5D7tFvPhGN+ItauFVjI9gDT6IjAnNyMkSNjHUCsOCw tsfrWWTCtyv0BayoYkNMhuPU3OJxzRYv2GwW4s1F+akwwBI0JAqKJDidRC4cuCXHFW3s Al6g== 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=N9p66J3CyRGSggPL0jEHpJ6N3kmg+tOoU7mSBRlNkcw=; b=YkRdA272t9JxToo0Kc4voe9qdGS9NfS2f4sA1pug/bs2Wgun7FUWBWtzZ4HC4QnE1D 3rnRQy+UQtflicfZm8Vd1mf6x4MbUsaK0VsaCldHN5lYcuDL7nWQDWz8kcL5MJS6obJy +5gO7p+zosvgARfeJGv2/FlAEFkJF0lqjmWDrQlij/CyytCUnSAnQ2ti/PFlQS3RWBIj ktY/kHBRrEuzPrdJAVbJViU5k3KkBqYxzVdSGlP2HgvsbAibfg7jBe8YP+AkyryZgNfz N55Odb9FPBy0Ejmq84GzS6bFPnncQmTh+I0IPJgSo1Nh+dtTjk/y0X/kF6tPOwNqoDkH 1yrA== X-Gm-Message-State: APjAAAXaDu1uN655VzDUow0TUJJmNqkPk7MqYZQBKP2UT5H5HmfvhOXa DQ+Ywy6ah5+Kwa4FtdpBVjzNtmY9Wi4= X-Received: by 2002:a63:1521:: with SMTP id v33mr18854563pgl.9.1569040382707; Fri, 20 Sep 2019 21:33:02 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 2/7] target/alpha: Fix SWCR_MAP_UMZ Date: Fri, 20 Sep 2019 21:32:51 -0700 Message-Id: <20190921043256.4575-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::544 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We were setting the wrong bit. The fp_status.flush_to_zero setting is overwritten by either the constant 1 or the value of fpcr_flush_to_zero depending on bits within an fp insn. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 6c1703682e..10602fb339 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -71,7 +71,7 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) env->fp_status.flush_inputs_to_zero = 1; } if (env->swcr & SWCR_MAP_UMZ) { - env->fp_status.flush_to_zero = 1; + env->fpcr_flush_to_zero = 1; } env->fpcr_exc_enable &= ~(alpha_ieee_swcr_to_fpcr(env->swcr) >> 32); #endif From patchwork Sat Sep 21 04:32:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174176 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp249428ill; Fri, 20 Sep 2019 21:35:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwGO1BZtLiTW9CTTKaNzDM0bl8y5cZsxzdZUldpxJleHxu+UoUPNEuABVXvbx08BxGYNgV X-Received: by 2002:a05:6402:17eb:: with SMTP id t11mr24904903edy.97.1569040558563; Fri, 20 Sep 2019 21:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040558; cv=none; d=google.com; s=arc-20160816; b=JS0e6dErzncNAuc/FS+Yua6/EjEIT27RbP1BWZXCrG8iADBmx0ARJ8Dr2+/Mnjr2e0 let5E96JUxy7H9kziYZp1L3WN9G1y4PuRCIS3FsjFCKm8X6uIQhrq2Fs6goS7ljcBy75 8MreYteu/4nrkT93wDdM7YmdZGIwh0WlF7Rkhwl0Cysp33/rHow1CXCu/bVmRDkVZRw8 J3W2hrGvwBcf+3JDbPylSNxUQmDlbGV078syCYdPQvJaINc1DTnI8Ntrt16w31ah4p6h dPMyxraT4DMHCfNPS7r0q+YAqJK3lq7/QN4Q2yd2oNPuznWTogaT+9PPHf+IPC+Ph30U Pe+g== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=N6+9fuZx1kzSXVJeSDepo9XmkdWGsxo7WFnloubWcfk=; b=EfYqDK2u5eqjSSX9JLVEI/6xYdRnZSUfA4Q2WJ+YOfFRUO0Ei7Q2s6ANLGzYcLAiou gj9amTuynYO8w3RU0xp6IBvKmFTHSbGEpTk1RmydKlFanx/yYSrNr1T2brsCdiY4ZmgB Ubw2/6Ms0s/5PUeL9tnWNqBcK1pMiURgDLfKIeihWNPdh/+cmpZJzvlrukAwMTX/Rs8F bAihPuYxtQ0tdRkrO1mwzvqvy7QAHIxbbKxbOy+cDncPhbSCn1PwHxO6UpqzkXHmZxzi p7Ymn02w0wNZ5I0cFTodWuIC9+mz6okDAYntiZuTb8UtuMeX1fd+4BPaQ4/5vJQWky0N napg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z0hMLBXV; 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=pass (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 h91si2785806edd.270.2019.09.20.21.35.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:35:58 -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=pass header.i=@linaro.org header.s=google header.b=z0hMLBXV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX7k-0003Xx-Ex for patch@linaro.org; Sat, 21 Sep 2019 00:35:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40654) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5K-0003RG-55 for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006YC-9I for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:40856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5E-0006PW-Je for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:20 -0400 Received: by mail-pg1-x543.google.com with SMTP id w10so4977403pgj.7 for ; Fri, 20 Sep 2019 21:33:05 -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=N6+9fuZx1kzSXVJeSDepo9XmkdWGsxo7WFnloubWcfk=; b=z0hMLBXVgkFabCj2zb7KnZQh8Ji4In3fIndCAOvLm2DJdOjdeNN3x3fbxYngDYttXd CqVx/U2H1QgguP5l39H7hOpWZOybYOhSmxzCUtEAu2fcyLe+k8iwsoz34Je3A3qW1Ilh 6aqH9bW/flNiyCjayuw8+IuhmmFqy3IrmIlG9KQmokLIk3FCOxqd6WZIgFXrK8w4NnvJ WM4FKHq3cXuEyUb0JCg4Nna3U/CS2wB++AekEGH/OaXSJkm5BXFsqg+BbogQWCz5TIZA nEOrCWP7fQ5Em49CMIGDtHzj4sH8FrM/p6sFEZze1t8tQrLn9X2p+q9Ej1SoFfFwEQFu 67uw== 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=N6+9fuZx1kzSXVJeSDepo9XmkdWGsxo7WFnloubWcfk=; b=qQ0OYF3ucTozBYQSjonlO7YsGuDJ8d5wEIP7n+sVL7AYei9a8ZTLB/aRHp6Bf+svX0 /pq0RzQFU7RP6KuYktMw84ZaH7a6X+8g6lzeS6GUmfnvByBltgKsuEzWCWSzPVdhNtsL tN7jiAbJ/j3VwSY4SIuq6s59zjVqCVxEzPhmj4tGOjrO/uo0kC4CDGJShBHsOpD8BYZZ O7x4yIMIxeUoaNiKqVaBZf6TtuWcYdNVtTyNJ2kiYrrbXVF21m25f3357KQbMY3Ccg9Z /n6v2mKVEDSg10rJCRYVmeafyBLU9oLx9OGR1Ry+gxyoX8zjBMJMvNMjVVsfuWGXg1Mx pU6w== X-Gm-Message-State: APjAAAU8xFJb3ZgtW3k6EPTERPeSk+P2dk2Htu4I4RVcUzXo4yBRORTn 8sY0QXs3IPlcGEaPKRwnf4HE8b1QsSA= X-Received: by 2002:a62:3c1:: with SMTP id 184mr21929919pfd.209.1569040384062; Fri, 20 Sep 2019 21:33:04 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 3/7] target/alpha: Fix SWCR_TRAP_ENABLE_MASK Date: Fri, 20 Sep 2019 21:32:52 -0700 Message-Id: <20190921043256.4575-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::543 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The CONFIG_USER_ONLY adjustment blindly mashed the swcr exception enable bits into the fpcr exception disable bits. However, fpcr_exc_enable has already converted the exception disable bits into the exception status bits in order to make it easier to mask status bits at runtime. Instead, merge the swcr enable bits with the fpcr before we convert to status bits. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) -- 2.17.1 diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 10602fb339..e21c488aa3 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -46,19 +46,8 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) uint32_t fpcr = val >> 32; uint32_t t = 0; - t |= CONVERT_BIT(fpcr, FPCR_INED, FPCR_INE); - t |= CONVERT_BIT(fpcr, FPCR_UNFD, FPCR_UNF); - t |= CONVERT_BIT(fpcr, FPCR_OVFD, FPCR_OVF); - t |= CONVERT_BIT(fpcr, FPCR_DZED, FPCR_DZE); - t |= CONVERT_BIT(fpcr, FPCR_INVD, FPCR_INV); - + /* Record the raw value before adjusting for linux-user. */ env->fpcr = fpcr; - env->fpcr_exc_enable = ~t & FPCR_STATUS_MASK; - - env->fpcr_dyn_round = rm_map[(fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT]; - - env->fpcr_flush_to_zero = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); - env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0; #ifdef CONFIG_USER_ONLY /* @@ -67,13 +56,29 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) * which point the kernel's handler would emulate and apply * the software exception mask. */ + uint32_t soft_fpcr = alpha_ieee_swcr_to_fpcr(env->swcr) >> 32; + fpcr |= soft_fpcr & FPCR_STATUS_MASK; +#endif + + t |= CONVERT_BIT(fpcr, FPCR_INED, FPCR_INE); + t |= CONVERT_BIT(fpcr, FPCR_UNFD, FPCR_UNF); + t |= CONVERT_BIT(fpcr, FPCR_OVFD, FPCR_OVF); + t |= CONVERT_BIT(fpcr, FPCR_DZED, FPCR_DZE); + t |= CONVERT_BIT(fpcr, FPCR_INVD, FPCR_INV); + + env->fpcr_exc_enable = ~t & FPCR_STATUS_MASK; + + env->fpcr_dyn_round = rm_map[(fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT]; + + env->fpcr_flush_to_zero = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); + env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0; +#ifdef CONFIG_USER_ONLY if (env->swcr & SWCR_MAP_DMZ) { env->fp_status.flush_inputs_to_zero = 1; } if (env->swcr & SWCR_MAP_UMZ) { env->fpcr_flush_to_zero = 1; } - env->fpcr_exc_enable &= ~(alpha_ieee_swcr_to_fpcr(env->swcr) >> 32); #endif } From patchwork Sat Sep 21 04:32:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174177 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp250882ill; Fri, 20 Sep 2019 21:38:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLgrxDhwpf4Ju8lstytPzx09kRaqAn0043xA/s2LCABxqpQ2DJDkCJL+/4GL1Yqwk4Y0oY X-Received: by 2002:a17:906:fc2:: with SMTP id c2mr5921216ejk.261.1569040690669; Fri, 20 Sep 2019 21:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040690; cv=none; d=google.com; s=arc-20160816; b=08zrMJ7X4Sux9oMGPCFDp0TOIr50pQnV0+ZW2ZB4b73ZJl23qRMw49JHdfMdXVbeSW 1nnQpvIb7eHe4JMtQaYMQHCVV8YuB5HX4LUY8NYlD1CwZRXGy1hzw9FkFh2HIf2JLy5C XkT74heiTFMUI39Zjaj4lMPrmVj1GMwb5j1dhYhRz61vg8FcRLaAjB52Ml5i9yuxH9KK 4OXuvYyrR0zB6wDQNpJPzI+eDIou0U0a0p3N17xH09QwzuQiQ80mtLy0xslevbdngMqe bcCkR36sxjLwJ/QjCfDUiBi/a0B1L6839uBoKJEhlOLq+BEMpIgfQ4hhja1JqNxLMIHb U93g== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=8832rs/gjYJtK2KCkPzbjErZga7EWVI26gkEzFEjWFQ=; b=L3hV/o6bBZoO6wm7M5e9FHhC7KCntfRa+pZ9GEpJKesjlja649D50JKvQXSDYGAkx+ 0sf++pnMC9jwkR/uAvAAGuorwqZhRRZjIbMNUZG9+OejVOz3TP01RNtrfPKfz5tZQbvA R61iJM8xPIRb+mJoACTG4x+eetEr6pkx6UcN6EKpuA5i77Gdi3hHPMRR7Wilv76GIB22 /uuDotTvkVjtT/VKFN55bOjsUgssGIS+nLu8VTfCfiZMSOa1HeEhYlH7hQieUosG90Bo 0Jo4NhICdgmegl00MuwcVnbM21FlPe/PtjuKVZjlCY7/wchDdWXtzw2K80XvFqO0wZGq hZGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PO0GiQse; 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=pass (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 i40si2619329eda.225.2019.09.20.21.38.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:38:10 -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=pass header.i=@linaro.org header.s=google header.b=PO0GiQse; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX9t-0007Nq-2n for patch@linaro.org; Sat, 21 Sep 2019 00:38:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40660) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5K-0003RY-BL for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006Y3-8Q for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:47014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5E-0006QK-HN for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:20 -0400 Received: by mail-pf1-x444.google.com with SMTP id q5so5852658pfg.13 for ; Fri, 20 Sep 2019 21:33:07 -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=8832rs/gjYJtK2KCkPzbjErZga7EWVI26gkEzFEjWFQ=; b=PO0GiQse2Tt2buMzBBQF17lZ2BDMqCf8+qVTGxSzCAQzsfwfnbeZvlxMEzupWX6wLH 5j1MdnUOo5gN83hnqC8x1HzuoI5Z4GUpQTb/4RLZ/devOLCueelWgLKzGlt8RRiuMLWw sI0fbHFdgZVUIB3KdZSys4UamvIKkcqXiQ5GwCNeC6b+3T9t7IIjFC9hcVn2j3PauHs8 lKCBtyemq+6SX1W0ao6sx5uzHbzkJ8lgf4XTGbugaW/Z/x2AGoK+4iaPbEj1mz0/mQlZ R25hB3gjt3iSDkBzd37NQjjP1/mBdX6goqqU73oYR/DWVAjLYcEK+DmiBmsaPqowPMsi zV8g== 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=8832rs/gjYJtK2KCkPzbjErZga7EWVI26gkEzFEjWFQ=; b=tVuv9+jTzqDyo7UxB13nPk+Z6JRpdphZt/agZSwyAGaJF8E2OidnOIc+eeHFbtzeqZ eEVpX7pBqC1arzTG0cIDe4a6gxaxcXUklloFC7XSSwEUD62jivProMB5KywWnm1WKswq dzT4rRpFOnrin6Pdel43XPnZwV2ZYJ+9WErP1ckho2WG9YZB1lxjtDsgXHVdoDCd7p0q 1bgrTH/PeswywmjygkYirTOls5KPZyMKWIm6elR2ibqsp95O5O6SPAV7meY3TaF7wmjg c89e27StsPTSxWQzt8V0vzzV9bwumbZceZAGx8VH/P2Zo0ccG18btEC57jCLazghfn5L BHBg== X-Gm-Message-State: APjAAAWE7Crtgu/bP7EbYGy32dOz034GZlytCUmHcu4SiO5JJLNQv1cK URI9LxTgOTBOO51lsr9sFY0ZJUterVU= X-Received: by 2002:a63:1f1f:: with SMTP id f31mr18413877pgf.353.1569040385641; Fri, 20 Sep 2019 21:33:05 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 4/7] target/alpha: Handle SWCR_MAP_DMZ earlier Date: Fri, 20 Sep 2019 21:32:53 -0700 Message-Id: <20190921043256.4575-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::444 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Since we're converting the swcr to fpcr format for exceptions, it's trivial to add FPCR_DNZ to the set of fpcr bits overriden. No functional change. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.17.1 diff --git a/target/alpha/helper.c b/target/alpha/helper.c index e21c488aa3..2f959c65ef 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -57,7 +57,7 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) * the software exception mask. */ uint32_t soft_fpcr = alpha_ieee_swcr_to_fpcr(env->swcr) >> 32; - fpcr |= soft_fpcr & FPCR_STATUS_MASK; + fpcr |= soft_fpcr & (FPCR_STATUS_MASK | FPCR_DNZ); #endif t |= CONVERT_BIT(fpcr, FPCR_INED, FPCR_INE); @@ -73,9 +73,6 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) env->fpcr_flush_to_zero = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0; #ifdef CONFIG_USER_ONLY - if (env->swcr & SWCR_MAP_DMZ) { - env->fp_status.flush_inputs_to_zero = 1; - } if (env->swcr & SWCR_MAP_UMZ) { env->fpcr_flush_to_zero = 1; } From patchwork Sat Sep 21 04:32:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174175 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp248672ill; Fri, 20 Sep 2019 21:34:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe6Cqalq3qhzYSzf0E/L14M22J5Xv40tZJbuUFdmdojC8fZQ/1gl8kyZUkmCPOVYamCdEi X-Received: by 2002:a50:ac0a:: with SMTP id v10mr25593371edc.83.1569040480570; Fri, 20 Sep 2019 21:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040480; cv=none; d=google.com; s=arc-20160816; b=irJS7JjvcncA9jEylDSlQzVhcO9lQpG2sHsEWHZT9kQFLyx3MGOYuHgRKk7+B/Ifxs aFzKDBtcd0rUXVaThGxrgSEl7vyeKJ/7O3+EqslpPECmYVMt56e3qNo8ItiCFVX2VT+Y Nqr3fgFvVCqBOUEioKfwF3Zk7gzi9fBECeMSxHHeror9Vh5TKARLu0iAGhHU1y/05u34 1mMT9LvTcBQO7+bXXoJs8JpjdLaSVoQNTzc9LRy608fxEXlOu0/A9WzzKt6DhrqwdY39 9r80qL5A+sNEZcvIynBJH9qhlmBSA6bcr6lHCYbCN9+UHXqgatJvOj3lu9d8dHMshI+n s7ow== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=e9wUlJNq9/BSGM/fpYcG0qtVD5/JBFR6vCeczUn1tOI=; b=JO7Em1IkChOf+EshSUjaw9O8qUstvrujBqpCNpYNQNy57EBQeWjvuLrYAHFNzHKE76 6S8Vu2r+zvWN6n1rGMTIfqoBw1e2ROxooFbV9u2dpJQsD04Nlz4k0g1g/hYPIZlP9XO6 ezqRgK1zg04VZTYNbiwBWoZivYMp34NybeG+romYaUrNOSvgUDrdpWUI6om+/vAkSnMK FbpmDuKznQKb4JN3sSJ7iwknVp8x8OVBhg+G+MO1s+Qv37OKFxp2SbTh3+ZSgFKJx94o Yx9WOgIiwPs3qiFvqWh47kU2OKPxiYhu3BGppIP36eJaiIyTfbcalSWQoRp6W1+aADHn EAUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ID4a1Ib9; 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=pass (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 k63si2888837edc.347.2019.09.20.21.34.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:34:40 -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=pass header.i=@linaro.org header.s=google header.b=ID4a1Ib9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX6U-0003XN-PM for patch@linaro.org; Sat, 21 Sep 2019 00:34:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40656) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5K-0003RK-5o for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006YO-G4 for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:37196) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5E-0006Qg-Lv for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:21 -0400 Received: by mail-pg1-x543.google.com with SMTP id c17so4987282pgg.4 for ; Fri, 20 Sep 2019 21:33:08 -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=e9wUlJNq9/BSGM/fpYcG0qtVD5/JBFR6vCeczUn1tOI=; b=ID4a1Ib96z8s01zTwAh4sEYfjen+2ce6KRW+9NxASiLytDC25rFt+YdjDhL07suSVy WrTyHSfvdeTtsq4LoYeou9pQ4ONyD4LZdYtw+eY8jQl9U4Io3/BODxyN+IC6/nk61LaB iUPoKBpXd5SiZfyCB4q+UvSzOZH1lIXiIdJZQEiM/C/4cBvp74K0Ptm2nkFiyhfYueXs ZVgoDM3dQ5ZECl/SiabkXgJzI9vvHUMdvaD5yVPGHN/1wckxGjENCpp1Z84se8GQUU/G 3T4utZBajWSDYCE3yaVQ0zOG90KtHLrXpAmJNcAoSJTE57r3yDTmSli/hOUJ/maQ/luI Y6Ig== 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=e9wUlJNq9/BSGM/fpYcG0qtVD5/JBFR6vCeczUn1tOI=; b=BS77s4Uy5FtRHtRkIdKoRCZITikQr2Nb4Z0QH5/SNxh8tHMnUEaPtT4NqRyh/xAjQV 9a+Soo7Rt3ATmztN8sj6+u7HStqQdWXpMnDZGkBUYgIm0xdB8Y97TjxOtI51UHWkVAV6 ejgQ7Yih1b1iLH+frrN5OjsRipi8XYGV8pkdprZhAQ+OaSrQUXRyS3RWshKM91czEI3a xLE/dmQ7hJ1Dl42kdjqoWHr1q9Cf5zaC00fHeDG2I7D4A44kXuHG0PRO4MQj5LeImgdS l25LcYF4R8cDE2s/ZSkMnXoFCqZieHR1uRByvEDdIVm4q006cjy/mUsD4OhEygojq8H8 m5LQ== X-Gm-Message-State: APjAAAUZlJC4TMwFn+sRRS32r0FuvYnf7Cq9boMOepI8/VrYWOSdL6E1 0yQI6UFjggt39uekqnA3fjXM2YM8uVI= X-Received: by 2002:a63:e512:: with SMTP id r18mr11722947pgh.117.1569040386897; Fri, 20 Sep 2019 21:33:06 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 5/7] target/alpha: Write to fpcr_flush_to_zero once Date: Fri, 20 Sep 2019 21:32:54 -0700 Message-Id: <20190921043256.4575-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::543 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Tidy the computation of the value; no functional change. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 2f959c65ef..1b3479738b 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -69,14 +69,13 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) env->fpcr_exc_enable = ~t & FPCR_STATUS_MASK; env->fpcr_dyn_round = rm_map[(fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT]; - - env->fpcr_flush_to_zero = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0; + + t = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ); #ifdef CONFIG_USER_ONLY - if (env->swcr & SWCR_MAP_UMZ) { - env->fpcr_flush_to_zero = 1; - } + t |= (env->swcr & SWCR_MAP_UMZ) != 0; #endif + env->fpcr_flush_to_zero = t; } uint64_t helper_load_fpcr(CPUAlphaState *env) From patchwork Sat Sep 21 04:32:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174180 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp253089ill; Fri, 20 Sep 2019 21:41:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk9/KBMc2Ab3/34NWrjrAUbtAScjUX+E3KhQwy8kxYve5as9kz76yiJTo5kFSqpuYwhbjw X-Received: by 2002:aa7:c5c1:: with SMTP id h1mr25398001eds.10.1569040903179; Fri, 20 Sep 2019 21:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040903; cv=none; d=google.com; s=arc-20160816; b=pMS8xJeS3gejtNH2mRWygoWQSXc2N10rzV7/3z/akKeNxwHZhljnuk7fddh4UZftSA p+tE1iB6WXsBpltz90RRady8JHbcAPMamwbnpTOvjbFku8Vk1Av/91fQyOl6UKi1ma8x a/msEcM5L5xxvyMQ1C8QXCAkxTGoHsPdXmgdjsNy2VhWR7S8Vg5rRjqyxcB+yOATZAEv 4HFqVX97MoWrU51wcaahqOk47yUNqi9ksPznid42MfxED7qKy07sow93CMKpSvilTNun R6aVlAniWrWXjdpXVrBZ6PzvL32CNbQI+weZXGzZdmKFF9ArkdVqZI6USzsTqYofAwut 5BnA== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=iewsVnys2Gcdd+SCmsGbUpMYolQhwlf4rPEKBnWRuzJm3HuXH8mY9CXUU+d+puhS4k YR+HY41Fkabzt34Hr1bgffAAFeNhmfoRMQKJoG2h2FyZElYmn+YJJaeix58b9PqbJSO/ hWfehUgQsi+uoT5HO0eVVz6ePRtUV0h5RlFsnN9m958FaVwbiWaYmXiZ+8/fXwtr7dCy 2c/pcSVWzv+1ypDp20W3AJYLg99fLaGZJLorfhlhntG4+aJcYvBl1sZilj2nvF0+W9Eh TfhVfDowHcxh0t1AEPzWph9RsywUlObax8tXB++Bb1zg0EqCsPyntx8MQiivfjmbR6FS 16CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W6TlkkmR; 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=pass (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 c4si2014633ejb.183.2019.09.20.21.41.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:41:43 -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=pass header.i=@linaro.org header.s=google header.b=W6TlkkmR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBXDK-0002NA-3H for patch@linaro.org; Sat, 21 Sep 2019 00:41:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5K-0003R9-0h for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006Xt-42 for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:41511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5E-0006R7-HU for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:20 -0400 Received: by mail-pl1-x644.google.com with SMTP id t10so4136681plr.8 for ; Fri, 20 Sep 2019 21:33:09 -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=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=W6TlkkmRUo8U+sKO+9O8huqeCjEkeVuFYHPwo1VRE8I61vhfsMZyE81CNh5nXf7SuO QSGuWaIm/HZsHpLkX21TygExtQi0MwQo0zTyfw+pfmdq7VsgpIAFXE1PhP/CcqHFt4dG yLVRleLCnNdjQecZPR9jSm/T5yinzn2QqpxH62gGckopHa1pvNxyD47xol+buMzBNtfI PcvPXOMVHd3UjUFx8UvqoMjigQyJoDhpFjtcZs4vi/rAyHTJE7vTml58eVPzbSzuhKc9 ssOOTL2ZY3GAKK57+cE2ruwd0fI5RotF+phYxpljhXhtXZzpXrh08UQNGAE1seP3HQLy 306w== 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=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=XHmrMak2wq8cM3/dlm8NMM/2bm3azqLz65ztcjZuth8NV55jzJYIJM9uRDAdQePn46 GpqriLMbg3NYvYxFPUUJaUcdkGWX/DVdqr5uPJvN15UBihTSdwqBHjKd7ceU0ICpTK7B 9AV0+bUxagVYOChHt3hqRV+EiIl9ekffOmuB809rdTR8+6f8n45WJvCjzQ6rM+PFgE5B s9HMA3XJIuYYzxukTD4io5O2g8oY9Se9sdkrUA3yKHG3XRam5GLjMVb29/Tg2MUohv6L 32XZa0b7dRO00XbHz0GN/LI9EZltwS6i2rosxN88QVscljWoonylydFoPEzwlbtO3wqO xu4Q== X-Gm-Message-State: APjAAAXfrdEBTnJzC27hez1b2rWOBCvhX06+4eUvRWLd343OT87P2brQ Bi3+f2M3xd6wzRguaIUa5KgrZUOuRNs= X-Received: by 2002:a17:902:ac98:: with SMTP id h24mr21012369plr.64.1569040388609; Fri, 20 Sep 2019 21:33:08 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 6/7] target/alpha: Mask IOV exception with INV for user-only Date: Fri, 20 Sep 2019 21:32:55 -0700 Message-Id: <20190921043256.4575-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::644 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The kernel masks the integer overflow exception with the software invalid exception mask. Include IOV in the set of exception bits masked by fpcr_exc_enable. Fixes the new float_convs test. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 Reviewed-by: Alex Bennée Tested-by: Alex Bennée diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 1b3479738b..55d7274d94 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -58,6 +58,13 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) */ uint32_t soft_fpcr = alpha_ieee_swcr_to_fpcr(env->swcr) >> 32; fpcr |= soft_fpcr & (FPCR_STATUS_MASK | FPCR_DNZ); + + /* + * The IOV exception is disabled by the kernel with SWCR_TRAP_ENABLE_INV, + * which got mapped by alpha_ieee_swcr_to_fpcr to FPCR_INVD. + * Add FPCR_IOV to fpcr_exc_enable so that it is handled identically. + */ + t |= CONVERT_BIT(soft_fpcr, FPCR_INVD, FPCR_IOV); #endif t |= CONVERT_BIT(fpcr, FPCR_INED, FPCR_INE); From patchwork Sat Sep 21 04:32:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174179 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp250995ill; Fri, 20 Sep 2019 21:38:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaPQXUfasJn+EZL5DJV/sLU6nyv5+kByJJIhGzG2L28JSS0zljTsMd+QB9XilDtAwfOdvo X-Received: by 2002:aa7:cf81:: with SMTP id z1mr25675554edx.224.1569040700789; Fri, 20 Sep 2019 21:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040700; cv=none; d=google.com; s=arc-20160816; b=QWliBSkEObh1mW7afYQg2z8aRhqzVcKfaR8zGVdg0UpOQVUP0l7F2EZoTzXBinVO9o ABoV/nzMF/rrfQXWrleyiEHShAR99rPR9lyyeBiaz4FRSWmMmAV0xt36KaBF9AU5dV/V e9TA4qOVD+lTbNLC7If/u0pYkevCljVHMLfjbO+k2iApodTFAHcVVeqs7LSdTJnZ9GRp D2g+tTEmocLdyp/brVb6MRoI6iuky5oEoAHSco8PS3g/PX+dzSWasJeVIqJSyRVzwunf PVPKagdGo6/6nMEdjpjQ5T8yG/1Trb179ltlWs+D+ZbkXfJmUMfQUjwAxha1glf2t0Vb qtaQ== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=j5P0Q5UZ/JVwqVpHHBVM78hUGXGLlaTuJMYDTaeD+qA=; b=r0+PAwSxUk1UqR21DKZiNJPa5OlOt/1M66WDG1k+WWRoLu9ORk5FtdTzN3Z8A4HgKI uZErzWMQQbw0z9cdsbKQ9IJhjeqB93ptIAeXOVut4mqAmmFU/aV+Vd8hoMKfLE+hPfDn yJaJKcVu2hKTwEil8Tdal+E+zYZu+RFp1X34o2Yceoy7RrG7J3B7MxbzOSBKzd2+D2lA IyWCCRRwRX6YzGYxakqLw5TL6KDZji6ucYs1SQKM+LJKUMobn7AaKk5et8va5V8y5W7L WvA3377fVQWaFv4xs9AXSKSGAXOTQOBMagdYut0tlQIyMkoS/GTFf6hSRflayk1M1QDf OImg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BMJ54MLx; 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=pass (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 o32si2871356edb.63.2019.09.20.21.38.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:38:20 -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=pass header.i=@linaro.org header.s=google header.b=BMJ54MLx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBXA3-0007ni-Dj for patch@linaro.org; Sat, 21 Sep 2019 00:38:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5J-0003QK-BL for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006Yp-U8 for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46843) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5F-0006RU-3f for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:21 -0400 Received: by mail-pl1-x642.google.com with SMTP id q24so4117830plr.13 for ; Fri, 20 Sep 2019 21:33:11 -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=j5P0Q5UZ/JVwqVpHHBVM78hUGXGLlaTuJMYDTaeD+qA=; b=BMJ54MLxkX1dTZRUonVXJWKeestfVpBv5/kMqOEKO6alJkvUfBi4rLy5dJwdB2eIzh r3xZYISy2d0PwZHooSga2tEUh4uzjOGA76zjqF9EsJS18zp0vnwU1sRyCN/b9OX2sZ9P ifTUjfuTTNjoHexZxcQ0r5L72DfW2tJpzUA18mM2VmE61zohNFrDA3hQNmwkRbfSNt8Y wn0KKuwU/cVgpYYqL2gRXMCgRQ3DtaCnHq0z7CQu7fhvUCj45OyJVklVNd9+ncBqia9L tnFY/QWDFCtbWwgEABHh6ovSf3wSQ1ON+G80cp6iqvt4Vxsaj9jSQN7qCIsU5R4uz63J 8Mmw== 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=j5P0Q5UZ/JVwqVpHHBVM78hUGXGLlaTuJMYDTaeD+qA=; b=Mvxk5NQdMiC02kXC5a7peBdp8ptKZoAIsfCnTjsCubN0laFKRY5zNhpwmI4KNSSvqC HaGFIe6Q63ANmuvo0+/8tEQ69KVPYZQOakePeEaDqZXS17rYf+gY8lXRnVpA7P89xcyU 3HumoLgNbxnqcf8CC0/KUDMRp3srlGpvJkoF1v0Yr2U3IyRaaKtK9Oax0X0DY3A1++BZ 4TduE4lVNABRmuhUgAgoptYbibjxe1f542epGfEyPwPsYBoegbvgouAl81BxDsiLS5Qw NvviuDE5UAWGHuI+1AKxpf0hDL3mr80ODk28Dv3QOCU8dI0BxZ4Q2dHCvtvMBAwDs3eY r3BA== X-Gm-Message-State: APjAAAWs9zPN5Tqm46sgfGvuvwIO5uKkOJyampwVTh/md6je5ZR/KOsp 8KB1Rz2nSZXb2nCg3D8y0W9tzDAjrpY= X-Received: by 2002:a17:902:ff02:: with SMTP id f2mr20289697plj.126.1569040389790; Fri, 20 Sep 2019 21:33:09 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 7/7] target/alpha: Tidy helper_fp_exc_raise_s Date: Fri, 20 Sep 2019 21:32:56 -0700 Message-Id: <20190921043256.4575-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::642 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove a redundant masking of ignore. Once that's gone it is obvious that the system-mode inner test is redundant with the outer test. Move the fpcr_exc_enable masking up and tidy. No functional change. Signed-off-by: Richard Henderson --- target/alpha/fpu_helper.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c index 62a066d902..df8b58963b 100644 --- a/target/alpha/fpu_helper.c +++ b/target/alpha/fpu_helper.c @@ -90,25 +90,18 @@ void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t ignore, uint32_t regno) uint32_t exc = env->error_code & ~ignore; if (exc) { env->fpcr |= exc; - exc &= ~ignore; -#ifdef CONFIG_USER_ONLY - /* - * In user mode, the kernel's software handler only - * delivers a signal if the exception is enabled. - */ - if (!(exc & env->fpcr_exc_enable)) { - return; - } -#else + exc &= env->fpcr_exc_enable; /* * In system mode, the software handler gets invoked * for any non-ignored exception. + * In user mode, the kernel's software handler only + * delivers a signal if the exception is enabled. */ +#ifdef CONFIG_USER_ONLY if (!exc) { return; } #endif - exc &= env->fpcr_exc_enable; fp_exc_raise1(env, GETPC(), exc, regno, EXC_M_SWC); } }