From patchwork Thu Oct 17 18:51:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176736 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1363995ill; Thu, 17 Oct 2019 12:13:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCHwyFUra7kaXh5xmtgjst5Mfi8+HCSpEKJ91cbgh0k53ylH/rFmh+8Pe8TrKmd2Ddcty1 X-Received: by 2002:a17:906:948d:: with SMTP id t13mr5140465ejx.112.1571339625117; Thu, 17 Oct 2019 12:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571339625; cv=none; d=google.com; s=arc-20160816; b=X9Uwf1+o8VJ3RCjg9FksYl1pR1m/RJgGucrdkUIsSnwYZpQ3MZZ++96us1nV8wQG7S 7paX7LjU0K0QcTPH0Fu8vWYSx1nyyVOoZWgR/A2m6Mo7fLRksgQsE1WnAy7TGbEKK2xP 3rLc9AZShfQjUffflB9LDweXJKzRobY5LCJ8foI0fdD5zdHZIT7h1/ugcmMyFdaDEs4Z mfSyv75iKwbZybKS3TcYI8UFtXQm7gMn6J4XYZaWB8duXpvJz1F+V02csT2T8DYvwgK4 +yA6txdfpIrWzlLWWZspzxuZcYX5GRtvec/4xuIOo+vOjvIDoMO0K7DiaBYRH2Acj50T fSiw== 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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=pmjZzGTXOVT8pn7wHTEUItGNPxQghjudfizNzwliW0GQQHffgTTGbLfWT0MdelYMVJ ebrddXFkuEXATTfUEtQRshVsoq8H+b86TN9I9mm2EAoaI8QLYI8cX4ahUdpsDqofgtHq uxXlrttEoDkabO3eLc/6s+7LVAN48aGVK5SxoEqPPBoyDv6J4EE/AxT3fKcLuY7+4CTc I6bU1Jn6tll8y0kcZkO7JtoW0SHcYYJSGHu+v4M0KBjLhmVIEZzfLJ8IowM3FLCdURXN 4pvM01lFF0JMgDMJlGc3n+wM8EY/YI0EOjdSJ3Qtfzd485sBVolgy97XfBhcKeY00xjA 5TYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eomd+q7F; 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 pw28si1931162ejb.43.2019.10.17.12.13.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 12:13:45 -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=eomd+q7F; 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]:57478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLBDT-0001rL-VC for patch@linaro.org; Thu, 17 Oct 2019 15:13:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35341) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLAs8-0001JS-P6 for qemu-devel@nongnu.org; Thu, 17 Oct 2019 14:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLAs6-0000wn-GP for qemu-devel@nongnu.org; Thu, 17 Oct 2019 14:51:40 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:34705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLAs6-0000vY-5a for qemu-devel@nongnu.org; Thu, 17 Oct 2019 14:51:38 -0400 Received: by mail-pf1-x441.google.com with SMTP id b128so2231681pfa.1 for ; Thu, 17 Oct 2019 11:51:37 -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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=eomd+q7FBtX57jhaP+godJma/1o5Zf+oYg3UXznfKR4wPos0bFbOWEftx1M4k/jng9 OCuj3KKdkctf4snN8cQYDZ8ywrDSgde+8yPLdhi1plV4Wp7h69ws3ws3ptAfD3M9gZbF RovGtP40Tr2tRKNZ3MuJ8YfqNaHirYSrM1A/xOBwIBGGkfwxHfYTtc+52+22Dy5+c4lC ivlBD5pQnLUfC2zH9Dl29Z4HJO1RIhKs0l4C/ei5FGgNBm12OAAhK2J6a6JGfU6FK8U8 rF8ISlV+ouGyA0DHwzlyC1b+Vc862MaRASAbBNlkfXCcoqfvbnEiCsbAbCx8yS1rFEG7 LADw== 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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=l5xFd2AuVELp/e+2Sl/V/BQqisQtBPeP/NcPNKODKcB4VEJrOh/qj+iMCPoj7mPD/X s8bBj64F215PWUq6XYisDcd/aCCDJxMYzLCqARB4fMkrqGqE1f0VkS4OEVZvzjgSlmhB aD5fAe7qxZwYvUkWcxe6MwXKCklcLVcpVApYqN98YBcP9y39ROhrtOsYnATwqcbcHX1A v9SgPj6bfUWQF4TYOdHV2KhaAeKsPhG40zj04XMgEuj5RUTwoo0csjr8rG+TADEqyW7h s/yq6aRuQkfnGLE4M5Ff2nEFESkmwaMMqKTQi9ma8nQ0+RQt1ea/o3a0xOZ14BbPUMe/ o4yg== X-Gm-Message-State: APjAAAXCbDat04Af5Rs/gBUo0WSeuTRSLYpQDPz8HsnjIPSXKW2JoTT3 hUxlfc7X/oomjAtjU4qEijhlURU2PPs= X-Received: by 2002:a65:6898:: with SMTP id e24mr4081018pgt.358.1571338296203; Thu, 17 Oct 2019 11:51:36 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id s97sm5009256pjc.4.2019.10.17.11.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 11:51:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 18/20] target/arm: Rebuild hflags at CPSR writes Date: Thu, 17 Oct 2019 11:51:08 -0700 Message-Id: <20191017185110.539-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191017185110.539-1-richard.henderson@linaro.org> References: <20191017185110.539-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 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: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index ccc2cecb46..b529d6c1bf 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 */