From patchwork Fri Oct 18 17:44:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176929 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1194424ill; Fri, 18 Oct 2019 11:00:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpQNeQ0i2IxVcW9+iNRiud69gWo50KC0M58A3v4VpFx+AzKyzmS3u+91bfKQSZiQPH1RIO X-Received: by 2002:ac8:5044:: with SMTP id h4mr11423397qtm.5.1571421627978; Fri, 18 Oct 2019 11:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571421627; cv=none; d=google.com; s=arc-20160816; b=UB0Yb9yU7of2eAcNLoH7oyF3HuP9EmW7ZUw/eBK+aiCRAXQhqVZthFnW1hD+wTMQin lKYXBCEIt2SAGoyVzZLY+xamJL7qluV4tTfNv9k/TWjliNxpocg2VBdFoKHofC5DUUDl 7rw95S1GTuzqI08Huv49Z/6IWhOgKDJiWwAoRMuO+b8E3o+x2n4GhEJLUwXhPp1k7r3C 2LikOj/poUoqQgIbnCjjjde1LAvxCQI8jE2OHfeKGnJKODfc2Tk+8oE3lvwhT+AONLzH 4Mr0L/WSMW5L/glLD8GK4PWIWsGqK8ux0qYe9u/I9xr8ECgxYBhayV3pzsoJrJEDj1YN voGg== 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=Jvma1dLqOXczxB5j6Th1sB75yi2a8Yz/KFtrvoZC09TEKZdvy6stXq7adKQwp8OGg3 MdZzJUelC0XHFJgQUwS9PoUgeA7n9PdOOP7l5p7Pe1Y59hFrQgZdXDB3k+22v2bEaGyN DF5ei7f7qaGspMLlIzyVHBWL+G3A1JOR/en4nO+l7f5wCCFnR2ZF77xQdaEvFy6Enm+f uXw9b6jpYckqyKbtq9bjJsNi3OtfLCKRgeG/s3ZU4y39meNCD0wo4Mv1xSbLGFzxi7AK FqTgjOV5mpVOVe48OGu+toJNLO/CJl7cE3l6s4u15bWURiBtq9KMtH9qkN5uhu6wMK+T vY3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pATM9ssF; 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 i15si648573qte.131.2019.10.18.11.00.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 11:00:27 -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=pATM9ssF; 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]:44532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLWY6-0007Xc-Ux for patch@linaro.org; Fri, 18 Oct 2019 14:00:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59457) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLWJ7-0006oz-U4 for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLWJ6-0005cl-NH for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:57 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:45802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLWJ6-0005c9-I8 for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:56 -0400 Received: by mail-pg1-x544.google.com with SMTP id r1so3739500pgj.12 for ; Fri, 18 Oct 2019 10:44:56 -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=pATM9ssFkxdigDI20QfMiusWkLq9ZFxqjeIY84nbG+ObLMz20Bk5mN8NBKXHLAtYCK SqSxE4tOdn6VrESxF94B1nPMlHxkEi+ROiz9wEXeruDUOJvEz1m8LPuvpAgiE27FzrcV Q875XXTvOR1tnKjLjl6hkAg7+a/SL9rt+XXKaQM/1Xzf4QovmWHlpMpCvx6lmxD2tdcI uWbYbNHtH27PEHBekoL9PEDQM8qatIauBE2asth1uVJ7PX9CPQvtyZwRWAnRNRa0JMJN S/uEHGcknS5SONOXKK+djAeyziJIJQtNLLqBrX+WCcrKNMivoe8f6qB+rKJvL7SoXwS8 RZaA== 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=XWMevuYojBWFxaTOfZ01/itFW90111sU8D292cWS9SAyDQIFjEZQJAvnN0ffWjr2wx kvUurmuyld4GO9Qrg1+AdsCdDAkvIZeu4Bl28mQZJxMDJ05GPtVA+8Ud9VdwGgKpL/Rl E+lnh8wKkN4UPVaoxJMp1d2JDTp6hseAmCvOzEe7XXUqNcdTOJf/AR+DVloJjiq/A3I2 FOiXEm5fQ9BSJdKIMkAoZmXmnCgZQ3nE/eD/I1bhMg16rNv/TA8yB25X7tP69IF5Q4PX vdpHYX2P6aX9Q16jktwnbijWUUca/k7FK4zSJk+hwSZpLdheJtUfBfmKYtGBzhCD00WC wCLQ== X-Gm-Message-State: APjAAAXOy/0ixdaka+LGr4oXjEYg6ufi5u66ZvCIeRxplJycc2GcIqEx CIl+YeGCZ/iElURWIcnAud5T6/n7J1k= X-Received: by 2002:a63:3104:: with SMTP id x4mr11264412pgx.135.1571420695215; Fri, 18 Oct 2019 10:44:55 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d20sm7857534pfq.88.2019.10.18.10.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:44:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v8 18/22] target/arm: Rebuild hflags at CPSR writes Date: Fri, 18 Oct 2019 10:44:27 -0700 Message-Id: <20191018174431.1784-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191018174431.1784-1-richard.henderson@linaro.org> References: <20191018174431.1784-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::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: 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 */