From patchwork Tue Oct 22 13:31:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 177180 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp4895060ill; Tue, 22 Oct 2019 06:52:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgJfbZJnMX86ePEMPEXjtpMt1+v3lwSJZm5u4qLDdvEFJ6lW5erba3CDA6WmKherV8Bfvk X-Received: by 2002:a05:620a:74f:: with SMTP id i15mr3131149qki.265.1571752346685; Tue, 22 Oct 2019 06:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571752346; cv=none; d=google.com; s=arc-20160816; b=v2qv091qj6HQt0YPr6CTPGU02XHIJjTgg8Aez+Jf4IA1XA0mIsEy5JZ9zpyiiZ91ow 4tdorHnoPpizRXmrjIB6coxxAn0bD3ebkOtyF7ggjCVw/idzPbJaotziIdW1+V2pmN2l WchDbVR8vkBC2zkOzGvD8J5he7fIUf8tQu1xjtGpu+2jpTbFF2IO5/q4JcAHU+GGULrZ 7FEh3D9AN6vnD1XJiI73IczC++dEDjmiZT7stHoyTrKODLr0gLVupwqAqiBuXHNgVUAY uJYmaU2ln6LRXMTaz/DAphGYSPcYajKil77l1bK6ZKWl8GBj4ElWajL4FgCdSTa+8iAh hQsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=1/mAfeRaj2VT53r9QN+14J2AmI4c8ehCDN6UkkQabK4=; b=l304rJUVUQaA24dIO6xqcWuBue4wF0N3PUcD5nQm3y6IF2Dfy2Fa8ZgXyXgGGpwZgk kGCuoHNg+1ZZKJm+iNt+wgw0WLgkTVeRxDtYtCk6tox09x1XAtvRoBwQlYEo+pzuOJVY VLlkpRN1e7kdBIY+oRypQ0UA9ldG4OfYLkCJzRXt0V2xfijPgwa7SnDdQEdH4/ov++3D 8eazHvsiqmFexJEEVtD6FI8zsRhmraI5J3tOgjJTB0kpPwtrTuQNopV8goQVBD1Zd03y G0SlZJbS/pgyyNak/WPuRCQX7vVVVSaF8G8/GtKc96yK51hIoZxns9Vs2kqRyhXfCIqP K1Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=enBx5zVx; 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 n3si1467165qtl.93.2019.10.22.06.52.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2019 06:52:26 -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=enBx5zVx; 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]:57760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMuaH-0000bn-TJ for patch@linaro.org; Tue, 22 Oct 2019 09:52:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37076) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMuHF-0003Hg-SC for qemu-devel@nongnu.org; Tue, 22 Oct 2019 09:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMuHE-0001Tf-Mq for qemu-devel@nongnu.org; Tue, 22 Oct 2019 09:32:45 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:37696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMuHE-0001TR-Ee for qemu-devel@nongnu.org; Tue, 22 Oct 2019 09:32:44 -0400 Received: by mail-wm1-x329.google.com with SMTP id f22so16202883wmc.2 for ; Tue, 22 Oct 2019 06:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1/mAfeRaj2VT53r9QN+14J2AmI4c8ehCDN6UkkQabK4=; b=enBx5zVx+83+XF2X/YJOZV2t9Bs3wsA1pK942z6am0+LU/m1FmZpBPSd1Eis+y5FMW z1VxqfNiOqY2uqZDR22wa/iEXoI319KDMUDnkAwaUscDnjyMLxcyu5fThVqYsCrj304Z fYcMILNVHTZdlemXhH8fTaL5uwaSgXKZDiR8R79H8ybAcH+VroO/RP7mWxBko/a4e/U8 5cnMgqHflIN5MQVyg4WLlBT5sEwg/uQzfggCSijlhgGhFbAGchavVHCc+nQSOecm7Qmu CgBO1UpwiLENKkRqw5WUDWMjZuRFuko6oTQEAGLp+cFjbq8fB480uOQkVYUHwmzO6+Am Eoqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1/mAfeRaj2VT53r9QN+14J2AmI4c8ehCDN6UkkQabK4=; b=rFWCjLM8uehtvx0a6w9+4zoEmGnVdUzd1PJDhE14EZ8xWATLSR5gRn3wYTFS7wTS/d mSxFts2LQ6Gz1G/p/HIHnd9q4+ix8JL2UOnmAyIBu11fNBvUJcxOBWFDKVmUVsies7lb lpOVqUv8pKp8XI+k9qwdw9aO8zYC8eW13sTfndJWY2P0PDxCtUho/MBY8M7jsxPwpvQN X40+W56E/buJJw4NaFF4nOFaBLUKK3F4XsoFAl6lZpuPPao3bEGk6O3tJWRqdEu0U2+0 jlQYFL3xuFn3F0Y+kkR7cMwLKqquRkV18xRx1F4fLvcnZc6nQw3UzXolunm9y0UYVnWK Gdqw== X-Gm-Message-State: APjAAAX6w2iC5CahZpv1WEfiDEyqQwWYo2x2QmNtugmSOqvX+LN26ja2 zya7Npca8jH+PRrV/h12HFfGROVHpvM= X-Received: by 2002:a7b:c186:: with SMTP id y6mr3251012wmi.67.1571751162933; Tue, 22 Oct 2019 06:32:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id r2sm20263856wma.1.2019.10.22.06.32.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 06:32:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 28/41] target/arm: Rebuild hflags at CPSR writes Date: Tue, 22 Oct 2019 14:31:21 +0100 Message-Id: <20191022133134.14487-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191022133134.14487-1-peter.maydell@linaro.org> References: <20191022133134.14487-1-peter.maydell@linaro.org> 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::329 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20191018174431.1784-19-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index ccc2cecb467..b529d6c1bf7 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -224,6 +224,7 @@ uint32_t HELPER(usat16)(CPUARMState *env, uint32_t x, uint32_t shift) void HELPER(setend)(CPUARMState *env) { env->uncached_cpsr ^= CPSR_E; + arm_rebuild_hflags(env); } /* Function checks whether WFx (WFI/WFE) instructions are set up to be trapped. @@ -387,6 +388,8 @@ uint32_t HELPER(cpsr_read)(CPUARMState *env) void HELPER(cpsr_write)(CPUARMState *env, uint32_t val, uint32_t mask) { cpsr_write(env, val, mask, CPSRWriteByInstr); + /* TODO: Not all cpsr bits are relevant to hflags. */ + arm_rebuild_hflags(env); } /* Write the CPSR for a 32-bit exception return */